[Commits] 09cea87: MDEV-17148 DROP DATABASE throw "Directory not empty" after changed lower_case_table_names.
by holyfoot@askmonty.org 01 Feb '19
by holyfoot@askmonty.org 01 Feb '19
01 Feb '19
revision-id: 09cea8703f3ec4e4f9e23855a339c9e3d5e84d3b (mariadb-10.2.21-50-g09cea87)
parent(s): 7c7161a1bd150e61f530933f096a8035932071af
committer: Alexey Botchkov
timestamp: 2019-02-01 17:10:27 +0400
message:
MDEV-17148 DROP DATABASE throw "Directory not empty" after changed lower_case_table_names.
No need to lowercase table names on case-sensitive file systems, as the
cache won't contain the 'lowercased' table anyway. And it prevents the
UPPERCASE.frm from being deleted.
---
mysql-test/r/lowercase_table.result | 4 ++++
mysql-test/t/lowercase_table.test | 12 ++++++++++++
sql/sql_db.cc | 8 ++++++--
3 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/mysql-test/r/lowercase_table.result b/mysql-test/r/lowercase_table.result
index ac7d3e6..823ffa7 100644
--- a/mysql-test/r/lowercase_table.result
+++ b/mysql-test/r/lowercase_table.result
@@ -127,3 +127,7 @@ Database (mysql_TE%)
mysql_test
drop database mysql_TEST;
End of 10.0 tests
+create database db1;
+create table t1 (a int);
+drop database db1;
+drop table t1;
diff --git a/mysql-test/t/lowercase_table.test b/mysql-test/t/lowercase_table.test
index c339105..e0dcb6c 100644
--- a/mysql-test/t/lowercase_table.test
+++ b/mysql-test/t/lowercase_table.test
@@ -118,3 +118,15 @@ show databases like "mysql_TE%";
drop database mysql_TEST;
--echo End of 10.0 tests
+
+#
+# MDEV-17148 DROP DATABASE throw "Directory not empty" after changed lower_case_table_names.
+#
+
+let $datadir=`select @@datadir`;
+create database db1;
+create table t1 (a int);
+copy_file $datadir/test/t1.frm $datadir/db1/T1.frm;
+drop database db1;
+drop table t1;
+
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index e94303f..0e554e2 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -1107,8 +1107,12 @@ static bool find_db_tables_and_rm_known_files(THD *thd, MY_DIR *dirp,
table_list->table_name_length= table->length;
table_list->open_type= OT_BASE_ONLY;
- /* To be able to correctly look up the table in the table cache. */
- if (lower_case_table_names)
+ /*
+ On the case-insensitive file systems table is opened
+ with the lowercased file name. So we should lowercase
+ as well to look up the cache properly.
+ */
+ if (lower_case_file_system)
table_list->table_name_length= my_casedn_str(files_charset_info,
table_list->table_name);
1
0
revision-id: 2af362f8bd73ab259cc7458e883db6b0d9ea99cf (mariadb-10.1.37-81-g2af362f8bd7)
parent(s): 100fd3e4c66a6e066e1ba5e2b1dafccbee301c2e
author: Jan Lindström
committer: Jan Lindström
timestamp: 2019-02-01 14:50:17 +0200
message:
Dev commit.
---
include/mysql/service_wsrep.h | 3 +++
mysql-test/suite/galera/t/galera_kill_applier.cnf | 10 ++++++++++
mysql-test/suite/galera/t/galera_kill_applier.test | 14 ++++++--------
sql/sql_plugin_services.ic | 3 ++-
sql/wsrep_dummy.cc | 3 +++
sql/wsrep_mysqld.cc | 1 -
sql/wsrep_thd.cc | 9 +++++++++
storage/innobase/handler/ha_innodb.cc | 6 ++++--
storage/innobase/include/trx0trx.h | 4 ++--
storage/innobase/trx/trx0trx.cc | 3 +++
storage/xtradb/handler/ha_innodb.cc | 6 ++++--
storage/xtradb/include/trx0trx.h | 4 ++--
storage/xtradb/trx/trx0trx.cc | 2 ++
13 files changed, 50 insertions(+), 18 deletions(-)
diff --git a/include/mysql/service_wsrep.h b/include/mysql/service_wsrep.h
index b51f154422f..6a83feaff55 100644
--- a/include/mysql/service_wsrep.h
+++ b/include/mysql/service_wsrep.h
@@ -111,6 +111,7 @@ extern struct wsrep_service_st {
int (*wsrep_trx_order_before_func)(MYSQL_THD, MYSQL_THD);
void (*wsrep_unlock_rollback_func)();
void (*wsrep_set_data_home_dir_func)(const char *data_dir);
+ my_bool (*wsrep_thd_is_applier_func)(THD *thd);
} *wsrep_service;
#ifdef MYSQL_DYNAMIC_PLUGIN
@@ -153,6 +154,7 @@ extern struct wsrep_service_st {
#define wsrep_trx_order_before(T1,T2) wsrep_service->wsrep_trx_order_before_func(T1,T2)
#define wsrep_unlock_rollback() wsrep_service->wsrep_unlock_rollback_func()
#define wsrep_set_data_home_dir(A) wsrep_service->wsrep_set_data_home_dir_func(A)
+#define wsrep_thd_is_applier(T) wsrep_service->wsrep_thd_is_applier_func(T)
#define wsrep_debug get_wsrep_debug()
#define wsrep_log_conflicts get_wsrep_log_conflicts()
@@ -211,6 +213,7 @@ void wsrep_thd_set_conflict_state(THD *thd, enum wsrep_conflict_state state);
bool wsrep_thd_ignore_table(THD *thd);
void wsrep_unlock_rollback();
void wsrep_set_data_home_dir(const char *data_dir);
+my_bool wsrep_thd_is_applier(THD *thd);
#endif
diff --git a/mysql-test/suite/galera/t/galera_kill_applier.cnf b/mysql-test/suite/galera/t/galera_kill_applier.cnf
new file mode 100644
index 00000000000..f2563e66f2e
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_kill_applier.cnf
@@ -0,0 +1,10 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+wsrep_provider_options='base_port=(a)mysqld.1.#galera_port;pc.ignore_sb=true'
+auto_increment_offset=1
+
+[mysqld.2]
+wsrep_provider_options='base_port=(a)mysqld.2.#galera_port;pc.ignore_sb=true'
+auto_increment_offset=2
+
diff --git a/mysql-test/suite/galera/t/galera_kill_applier.test b/mysql-test/suite/galera/t/galera_kill_applier.test
index 48a411d2cf2..5e4a587fe57 100644
--- a/mysql-test/suite/galera/t/galera_kill_applier.test
+++ b/mysql-test/suite/galera/t/galera_kill_applier.test
@@ -39,17 +39,10 @@ GRANT SELECT on test.* TO foo@localhost;
#
--connection node_2
---disable_query_log
---eval KILL $applier_thread
---enable_query_log
-
---source include/restart_mysqld.inc
-
---connection node_2
--let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE != 'wsrep aborter idle' OR STATE IS NULL LIMIT 1`
--disable_query_log
---eval KILL QUERY $applier_thread
+--eval KILL $applier_thread
--enable_query_log
--let $aborter_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep aborter idle' LIMIT 1`
@@ -61,6 +54,11 @@ GRANT SELECT on test.* TO foo@localhost;
--source include/restart_mysqld.inc
--connection node_2
+--let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE != 'wsrep aborter idle' OR STATE IS NULL LIMIT 1`
+
+--disable_query_log
+--eval KILL QUERY $applier_thread
+--enable_query_log
--let $aborter_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep aborter idle' LIMIT 1`
diff --git a/sql/sql_plugin_services.ic b/sql/sql_plugin_services.ic
index 95301a5fbe8..a0d42c04dba 100644
--- a/sql/sql_plugin_services.ic
+++ b/sql/sql_plugin_services.ic
@@ -180,7 +180,8 @@ static struct wsrep_service_st wsrep_handler = {
wsrep_trx_is_aborting,
wsrep_trx_order_before,
wsrep_unlock_rollback,
- wsrep_set_data_home_dir
+ wsrep_set_data_home_dir,
+ wsrep_thd_is_applier,
};
static struct thd_specifics_service_st thd_specifics_handler=
diff --git a/sql/wsrep_dummy.cc b/sql/wsrep_dummy.cc
index 5837ab4bed5..1f130e2b9a2 100644
--- a/sql/wsrep_dummy.cc
+++ b/sql/wsrep_dummy.cc
@@ -20,6 +20,9 @@
my_bool wsrep_thd_is_BF(THD *, my_bool)
{ return 0; }
+my_bool wsrep_thd_is_applier(THD *)
+{ return 0; }
+
int wsrep_trx_order_before(THD *, THD *)
{ return 0; }
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc
index 47aea6d3824..85112967b7b 100644
--- a/sql/wsrep_mysqld.cc
+++ b/sql/wsrep_mysqld.cc
@@ -2469,7 +2469,6 @@ extern "C" void wsrep_thd_set_exec_mode(THD *thd, enum wsrep_exec_mode mode)
thd->wsrep_exec_mode= mode;
}
-
extern "C" void wsrep_thd_set_query_state(
THD *thd, enum wsrep_query_state state)
{
diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc
index eb26da61282..492a3b67c68 100644
--- a/sql/wsrep_thd.cc
+++ b/sql/wsrep_thd.cc
@@ -596,6 +596,15 @@ my_bool wsrep_thd_is_BF(THD *thd, my_bool sync)
return status;
}
+my_bool wsrep_thd_is_applier(THD *thd)
+{
+ my_bool ret = FALSE;
+ if (thd) {
+ ret = thd->wsrep_applier;
+ }
+ return ret;
+}
+
extern "C"
my_bool wsrep_thd_is_BF_or_commit(void *thd_ptr, my_bool sync)
{
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 702f84a52d1..ca76c31cb68 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -4928,7 +4928,8 @@ static void innobase_kill_query(handlerton*, THD* thd, enum thd_kill_levels)
break;
#endif
case TRX_SERVER_ABORT:
- if (!wsrep_thd_is_BF(trx->mysql_thd, FALSE)) {
+ if (!wsrep_thd_is_BF(trx->mysql_thd, FALSE)
+ || wsrep_thd_is_applier(trx->mysql_thd)) {
lock_mutex_enter();
}
/* fall through */
@@ -4943,7 +4944,8 @@ static void innobase_kill_query(handlerton*, THD* thd, enum thd_kill_levels)
break;
#endif
case TRX_SERVER_ABORT:
- if (!wsrep_thd_is_BF(trx->mysql_thd, FALSE)) {
+ if (!wsrep_thd_is_BF(trx->mysql_thd, FALSE)
+ || wsrep_thd_is_applier(trx->mysql_thd)) {
lock_mutex_exit();
}
/* fall through */
diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h
index fe16b8272b8..33d2442c471 100644
--- a/storage/innobase/include/trx0trx.h
+++ b/storage/innobase/include/trx0trx.h
@@ -698,9 +698,9 @@ lock_sys->mutex and sometimes by trx->mutex. */
enum trx_abort_t {
TRX_SERVER_ABORT = 0,
#ifdef WITH_WSREP
- TRX_WSREP_ABORT,
+ TRX_WSREP_ABORT = 1,
#endif
- TRX_REPLICATION_ABORT
+ TRX_REPLICATION_ABORT = 2
};
struct trx_t{
diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc
index f36aabba8b4..88b56f7efb7 100644
--- a/storage/innobase/trx/trx0trx.cc
+++ b/storage/innobase/trx/trx0trx.cc
@@ -168,6 +168,9 @@ trx_create(void)
#ifdef WITH_WSREP
trx->wsrep_event = NULL;
#endif /* WITH_WSREP */
+
+ trx->abort_type = TRX_SERVER_ABORT;
+
return(trx);
}
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index d3be5155d27..86299432244 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -5532,7 +5532,8 @@ static void innobase_kill_query(handlerton*, THD* thd, enum thd_kill_levels)
break;
#endif
case TRX_SERVER_ABORT:
- if (!wsrep_thd_is_BF(trx->mysql_thd, FALSE)) {
+ if (!wsrep_thd_is_BF(trx->mysql_thd, FALSE)
+ || wsrep_thd_is_applier(trx->mysql_thd)) {
lock_mutex_enter();
}
/* fall through */
@@ -5547,7 +5548,8 @@ static void innobase_kill_query(handlerton*, THD* thd, enum thd_kill_levels)
break;
#endif
case TRX_SERVER_ABORT:
- if (!wsrep_thd_is_BF(trx->mysql_thd, FALSE)) {
+ if (!wsrep_thd_is_BF(trx->mysql_thd, FALSE)
+ || wsrep_thd_is_applier(trx->mysql_thd)) {
lock_mutex_exit();
}
/* fall through */
diff --git a/storage/xtradb/include/trx0trx.h b/storage/xtradb/include/trx0trx.h
index 77afde4c35c..0390b1a838a 100644
--- a/storage/xtradb/include/trx0trx.h
+++ b/storage/xtradb/include/trx0trx.h
@@ -747,9 +747,9 @@ lock_sys->mutex and sometimes by trx->mutex. */
enum trx_abort_t {
TRX_SERVER_ABORT = 0,
#ifdef WITH_WSREP
- TRX_WSREP_ABORT,
+ TRX_WSREP_ABORT = 1,
#endif
- TRX_REPLICATION_ABORT
+ TRX_REPLICATION_ABORT = 2
};
struct trx_t{
diff --git a/storage/xtradb/trx/trx0trx.cc b/storage/xtradb/trx/trx0trx.cc
index 17cba81daf3..3a594dac4ce 100644
--- a/storage/xtradb/trx/trx0trx.cc
+++ b/storage/xtradb/trx/trx0trx.cc
@@ -304,6 +304,8 @@ trx_create(void)
trx->wsrep_event = NULL;
#endif /* WITH_WSREP */
+ trx->abort_type = TRX_SERVER_ABORT;
+
return(trx);
}
1
0
revision-id: 8aa4cff7b5bd3876138dbaf12cbcc7402c95cfa0 (mariadb-galera-10.0.37-5-g8aa4cff7b5b)
parent(s): 448c35a4c57b1739d72f28fa3412bed0011b60ac
author: Jan Lindström
committer: Jan Lindström
timestamp: 2019-02-01 13:41:23 +0200
message:
Revert incorrect merge.
---
mysql-test/r/alter_table.test | 1908 ------------------------------
mysql-test/r/grant.test | 2291 ------------------------------------
mysql-test/r/lowercase_fs_off.test | 124 --
mysql-test/r/sp-security.test | 1069 -----------------
mysql-test/r/type_float.test | 417 -------
5 files changed, 5809 deletions(-)
diff --git a/mysql-test/r/alter_table.test b/mysql-test/r/alter_table.test
deleted file mode 100644
index aea1a880a81..00000000000
--- a/mysql-test/r/alter_table.test
+++ /dev/null
@@ -1,1908 +0,0 @@
-if (`select plugin_auth_version < "5.6.26" from information_schema.plugins where plugin_name='innodb'`)
-{
- --skip Not fixed in XtraDB below 5.6.26
-}
---source include/have_innodb.inc
-#
-# Test of alter table
-#
---disable_warnings
-drop table if exists t1,t2;
-drop database if exists mysqltest;
---enable_warnings
-
-create table t1 (
-col1 int not null auto_increment primary key,
-col2 varchar(30) not null,
-col3 varchar (20) not null,
-col4 varchar(4) not null,
-col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null,
-col6 int not null, to_be_deleted int);
-insert into t1 values (2,4,3,5,"PENDING",1,7);
-alter table t1
-add column col4_5 varchar(20) not null after col4,
-add column col7 varchar(30) not null after col5,
-add column col8 datetime not null, drop column to_be_deleted,
-change column col2 fourth varchar(30) not null after col3,
-modify column col6 int not null first;
-select * from t1;
-drop table t1;
-
-create table t1 (bandID MEDIUMINT UNSIGNED NOT NULL PRIMARY KEY, payoutID SMALLINT UNSIGNED NOT NULL);
-insert into t1 (bandID,payoutID) VALUES (1,6),(2,6),(3,4),(4,9),(5,10),(6,1),(7,12),(8,12);
-alter table t1 add column new_col int, order by payoutid,bandid;
-select * from t1;
-alter table t1 order by bandid,payoutid;
-select * from t1;
-drop table t1;
-
-# Check that pack_keys and dynamic length rows are not forced.
-
-CREATE TABLE t1 (
-GROUP_ID int(10) unsigned DEFAULT '0' NOT NULL,
-LANG_ID smallint(5) unsigned DEFAULT '0' NOT NULL,
-NAME varchar(80) DEFAULT '' NOT NULL,
-PRIMARY KEY (GROUP_ID,LANG_ID),
-KEY NAME (NAME));
-#show table status like "t1";
-ALTER TABLE t1 CHANGE NAME NAME CHAR(80) not null;
---replace_column 8 #
-SHOW FULL COLUMNS FROM t1;
-DROP TABLE t1;
-
-#
-# Test of ALTER TABLE ... ORDER BY
-#
-
-create table t1 (n int);
-insert into t1 values(9),(3),(12),(10);
-alter table t1 order by n;
-select * from t1;
-drop table t1;
-
-CREATE TABLE t1 (
- id int(11) unsigned NOT NULL default '0',
- category_id tinyint(4) unsigned NOT NULL default '0',
- type_id tinyint(4) unsigned NOT NULL default '0',
- body text NOT NULL,
- user_id int(11) unsigned NOT NULL default '0',
- status enum('new','old') NOT NULL default 'new',
- PRIMARY KEY (id)
-) ENGINE=MyISAM;
-
-ALTER TABLE t1 ORDER BY t1.id, t1.status, t1.type_id, t1.user_id, t1.body;
-DROP TABLE t1;
-
-#
-# The following combination found a hang-bug in MyISAM
-#
-
-CREATE TABLE t1 (AnamneseId int(10) unsigned NOT NULL auto_increment,B BLOB,PRIMARY KEY (AnamneseId)) engine=myisam;
-insert into t1 values (null,"hello");
-LOCK TABLES t1 WRITE;
-ALTER TABLE t1 ADD Column new_col int not null;
-UNLOCK TABLES;
-OPTIMIZE TABLE t1;
-DROP TABLE t1;
-
-#
-# Drop and add an auto_increment column
-#
-
-create table t1 (i int unsigned not null auto_increment primary key);
-insert into t1 values (null),(null),(null),(null);
-alter table t1 drop i,add i int unsigned not null auto_increment, drop primary key, add primary key (i);
-select * from t1;
-drop table t1;
-
-#
-# Bug #2628: 'alter table t1 rename mysqltest.t1' silently drops mysqltest.t1
-# if it exists
-#
-create table t1 (name char(15));
-insert into t1 (name) values ("current");
-create database mysqltest;
-create table mysqltest.t1 (name char(15));
-insert into mysqltest.t1 (name) values ("mysqltest");
-select * from t1;
-select * from mysqltest.t1;
---error ER_TABLE_EXISTS_ERROR
-alter table t1 rename mysqltest.t1;
-select * from t1;
-select * from mysqltest.t1;
-drop table t1;
-drop database mysqltest;
-
-#
-# ALTER TABLE ... ENABLE/DISABLE KEYS
-
-create table t1 (n1 int not null, n2 int, n3 int, n4 float,
- unique(n1),
- key (n1, n2, n3, n4),
- key (n2, n3, n4, n1),
- key (n3, n4, n1, n2),
- key (n4, n1, n2, n3) );
-alter table t1 disable keys;
-show keys from t1;
-#let $1=10000;
-let $1=10;
---disable_query_log
-begin;
-while ($1)
-{
- eval insert into t1 values($1,RAND()*1000,RAND()*1000,RAND());
- dec $1;
-}
-commit;
---enable_query_log
-alter table t1 enable keys;
-show keys from t1;
-drop table t1;
-
-#
-# Alter table and rename
-#
-
-create table t1 (i int unsigned not null auto_increment primary key);
-alter table t1 rename t2;
-alter table t2 rename t1, add c char(10) comment "no comment";
-show columns from t1;
-drop table t1;
-
-# implicit analyze
-
-create table t1 (a int, b int);
-let $1=100;
---disable_query_log
-begin;
-while ($1)
-{
- eval insert into t1 values(1,$1), (2,$1), (3, $1);
- dec $1;
-}
-commit;
---enable_query_log
-alter table t1 add unique (a,b), add key (b);
-show keys from t1;
-analyze table t1;
-show keys from t1;
-drop table t1;
-
-#
-# Test of ALTER TABLE DELAYED
-#
-
-CREATE TABLE t1 (i int(10), index(i) ) ENGINE=MyISAM;
-ALTER TABLE t1 DISABLE KEYS;
-INSERT DELAYED INTO t1 VALUES(1),(2),(3);
-ALTER TABLE t1 ENABLE KEYS;
-drop table t1;
-
-#
-# Test ALTER TABLE ENABLE/DISABLE keys when things are locked
-#
-
-CREATE TABLE t1 (
- Host varchar(16) binary NOT NULL default '',
- User varchar(16) binary NOT NULL default '',
- PRIMARY KEY (Host,User)
-) ENGINE=MyISAM;
-
-ALTER TABLE t1 DISABLE KEYS;
-LOCK TABLES t1 WRITE;
-INSERT INTO t1 VALUES ('localhost','root'),('localhost',''),('games','monty');
-SHOW INDEX FROM t1;
-ALTER TABLE t1 ENABLE KEYS;
-UNLOCK TABLES;
-CHECK TABLES t1;
-DROP TABLE t1;
-
-#
-# Test with two keys
-#
-
-CREATE TABLE t1 (
- Host varchar(16) binary NOT NULL default '',
- User varchar(16) binary NOT NULL default '',
- PRIMARY KEY (Host,User),
- KEY (Host)
-) ENGINE=MyISAM;
-
-ALTER TABLE t1 DISABLE KEYS;
-SHOW INDEX FROM t1;
-LOCK TABLES t1 WRITE;
-INSERT INTO t1 VALUES ('localhost','root'),('localhost','');
-SHOW INDEX FROM t1;
-ALTER TABLE t1 ENABLE KEYS;
-SHOW INDEX FROM t1;
-UNLOCK TABLES;
-CHECK TABLES t1;
-
-# Test RENAME with LOCK TABLES
-LOCK TABLES t1 WRITE;
-ALTER TABLE t1 RENAME t2;
-UNLOCK TABLES;
-select * from t2;
-DROP TABLE t2;
-
-#
-# Test disable keys with locking
-#
-CREATE TABLE t1 (
- Host varchar(16) binary NOT NULL default '',
- User varchar(16) binary NOT NULL default '',
- PRIMARY KEY (Host,User),
- KEY (Host)
-) ENGINE=MyISAM;
-
-LOCK TABLES t1 WRITE;
-ALTER TABLE t1 DISABLE KEYS;
-SHOW INDEX FROM t1;
-DROP TABLE t1;
-
-#
-# BUG#4717 - check for valid table names
-#
-create table t1 (a int);
---error ER_WRONG_TABLE_NAME
-alter table t1 rename to ``;
---error ER_WRONG_TABLE_NAME
-rename table t1 to ``;
-drop table t1;
-
-#
-# BUG#6236 - ALTER TABLE MODIFY should set implicit NOT NULL on PK columns
-#
-drop table if exists t1, t2;
-create table t1 ( a varchar(10) not null primary key ) engine=myisam;
-create table t2 ( a varchar(10) not null primary key ) engine=merge union=(t1);
-flush tables;
-alter table t1 modify a varchar(10);
-show create table t2;
-flush tables;
-alter table t1 modify a varchar(10) not null;
-show create table t2;
-drop table if exists t1, t2;
-
-# The following is also part of bug #6236 (CREATE TABLE didn't properly count
-# not null columns for primary keys)
-
-create table t1 (a int, b int, c int, d int, e int, f int, g int, h int,i int, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM;
-insert into t1 (a) values(1);
---replace_column 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
-show table status like 't1';
-alter table t1 modify a int;
---replace_column 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
-show table status like 't1';
-drop table t1;
-create table t1 (a int not null, b int not null, c int not null, d int not null, e int not null, f int not null, g int not null, h int not null,i int not null, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM;
-insert into t1 (a) values(1);
---replace_column 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
-show table status like 't1';
-drop table t1;
-
-#
-# Test that data get converted when character set is changed
-# Test that data doesn't get converted when src or dst is BINARY/BLOB
-#
-set names koi8r;
-create table t1 (a char(10) character set koi8r);
-insert into t1 values ('����');
-select a,hex(a) from t1;
-alter table t1 change a a char(10) character set cp1251;
-select a,hex(a) from t1;
-alter table t1 change a a binary(4);
-select a,hex(a) from t1;
-alter table t1 change a a char(10) character set cp1251;
-select a,hex(a) from t1;
-alter table t1 change a a char(10) character set koi8r;
-select a,hex(a) from t1;
-alter table t1 change a a varchar(10) character set cp1251;
-select a,hex(a) from t1;
-alter table t1 change a a char(10) character set koi8r;
-select a,hex(a) from t1;
-alter table t1 change a a text character set cp1251;
-select a,hex(a) from t1;
-alter table t1 change a a char(10) character set koi8r;
-select a,hex(a) from t1;
-delete from t1;
-
-#
-# Test ALTER TABLE .. CHARACTER SET ..
-#
-show create table t1;
-alter table t1 DEFAULT CHARACTER SET latin1;
-show create table t1;
-alter table t1 CONVERT TO CHARACTER SET latin1;
-show create table t1;
-alter table t1 DEFAULT CHARACTER SET cp1251;
-show create table t1;
-
-drop table t1;
-
-#
-# Bug#2821
-# Test that table CHARACTER SET does not affect blobs
-#
-create table t1 (myblob longblob,mytext longtext)
-default charset latin1 collate latin1_general_cs;
-show create table t1;
-alter table t1 character set latin2;
-show create table t1;
-drop table t1;
-
-#
-# Bug 2361 (Don't drop UNIQUE with DROP PRIMARY KEY)
-#
-
-CREATE TABLE t1 (a int PRIMARY KEY, b INT UNIQUE);
-ALTER TABLE t1 DROP PRIMARY KEY;
-SHOW CREATE TABLE t1;
---error ER_CANT_DROP_FIELD_OR_KEY
-ALTER TABLE t1 DROP PRIMARY KEY;
-DROP TABLE t1;
-
-# BUG#3899
-create table t1 (a int, b int, key(a));
-insert into t1 values (1,1), (2,2);
---error ER_CANT_DROP_FIELD_OR_KEY
-alter table t1 drop key no_such_key;
-alter table t1 drop key a;
-drop table t1;
-
-#
-# BUG 12207 alter table ... discard table space on MyISAM table causes ERROR 2013 (HY000)
-#
-# Some platforms (Mac OS X, Windows) will send the error message using small letters.
-CREATE TABLE T12207(a int) ENGINE=MYISAM;
---replace_result t12207 T12207
---error ER_ILLEGAL_HA
-ALTER TABLE T12207 DISCARD TABLESPACE;
-DROP TABLE T12207;
-
-#
-# Bug #6479 ALTER TABLE ... changing charset fails for TEXT columns
-#
-# The column's character set was changed but the actual data was not
-# modified. In other words, the values were reinterpreted
-# as UTF8 instead of being converted.
-create table t1 (a text) character set koi8r;
-insert into t1 values (_koi8r'����');
-select hex(a) from t1;
-alter table t1 convert to character set cp1251;
-select hex(a) from t1;
-drop table t1;
-
-#
-# Test for bug #7884 "Able to add invalid unique index on TIMESTAMP prefix"
-# MySQL should not think that packed field with non-zero decimals is
-# geometry field and allow to create prefix index which is
-# shorter than packed field length.
-#
-create table t1 ( a timestamp );
---error ER_WRONG_SUB_KEY
-alter table t1 add unique ( a(1) );
-drop table t1;
-
-#
-# Bug #24395: ALTER TABLE DISABLE KEYS doesn't work when modifying the table
-#
-# This problem happens if the data change is compatible.
-# Changing to the same type is compatible for example.
-#
---disable_warnings
-drop table if exists t1;
---enable_warnings
-create table t1 (a int, key(a));
-show indexes from t1;
---echo "this used not to disable the index"
-alter table t1 modify a int, disable keys;
-show indexes from t1;
-
-alter table t1 enable keys;
-show indexes from t1;
-
-alter table t1 modify a bigint, disable keys;
-show indexes from t1;
-
-alter table t1 enable keys;
-show indexes from t1;
-
-alter table t1 add b char(10), disable keys;
-show indexes from t1;
-
-alter table t1 add c decimal(10,2), enable keys;
-show indexes from t1;
-
---echo "this however did"
-alter table t1 disable keys;
-show indexes from t1;
-
-desc t1;
-
-alter table t1 add d decimal(15,5);
---echo "The key should still be disabled"
-show indexes from t1;
-
-drop table t1;
-
---echo "Now will test with one unique index"
-create table t1(a int, b char(10), unique(a));
-show indexes from t1;
-alter table t1 disable keys;
-show indexes from t1;
-alter table t1 enable keys;
-
---echo "If no copy on noop change, this won't touch the data file"
---echo "Unique index, no change"
-alter table t1 modify a int, disable keys;
-show indexes from t1;
-
---echo "Change the type implying data copy"
---echo "Unique index, no change"
-alter table t1 modify a bigint, disable keys;
-show indexes from t1;
-
-alter table t1 modify a bigint;
-show indexes from t1;
-
-alter table t1 modify a int;
-show indexes from t1;
-
-drop table t1;
-
---echo "Now will test with one unique and one non-unique index"
-create table t1(a int, b char(10), unique(a), key(b));
-show indexes from t1;
-alter table t1 disable keys;
-show indexes from t1;
-alter table t1 enable keys;
-
-
---echo "If no copy on noop change, this won't touch the data file"
---echo "The non-unique index will be disabled"
-alter table t1 modify a int, disable keys;
-show indexes from t1;
-alter table t1 enable keys;
-show indexes from t1;
-
---echo "Change the type implying data copy"
---echo "The non-unique index will be disabled"
-alter table t1 modify a bigint, disable keys;
-show indexes from t1;
-
---echo "Change again the type, but leave the indexes as_is"
-alter table t1 modify a int;
-show indexes from t1;
---echo "Try the same. When data is no copied on similar tables, this is noop"
-alter table t1 modify a int;
-show indexes from t1;
-
-drop table t1;
-
-
-#
-# Bug#11493 - Alter table rename to default database does not work without
-# db name qualifying
-#
-create database mysqltest;
-create table t1 (c1 int);
-# Move table to other database.
-alter table t1 rename mysqltest.t1;
-# Assure that it has moved.
---error ER_BAD_TABLE_ERROR
-drop table t1;
-# Move table back.
-alter table mysqltest.t1 rename t1;
-# Assure that it is back.
-drop table t1;
-# Now test for correct message if no database is selected.
-# Create t1 in 'test'.
-create table t1 (c1 int);
-# Change to other db.
-use mysqltest;
-# Drop the current db. This de-selects any db.
-drop database mysqltest;
-# Now test for correct message.
---error ER_NO_DB_ERROR
-alter table test.t1 rename t1;
-# Check that explicit qualifying works even with no selected db.
-alter table test.t1 rename test.t1;
-# Go back to standard 'test' db.
-use test;
-drop table t1;
-
-#
-# BUG#23404 - ROW_FORMAT=FIXED option is lost is an index is added to the
-# table
-#
-CREATE TABLE t1(a INT) ROW_FORMAT=FIXED;
-CREATE INDEX i1 ON t1(a);
-SHOW CREATE TABLE t1;
-DROP INDEX i1 ON t1;
-SHOW CREATE TABLE t1;
-DROP TABLE t1;
-
-#
-# Bug#24219 - ALTER TABLE ... RENAME TO ... , DISABLE KEYS leads to crash
-#
---disable_warnings
-DROP TABLE IF EXISTS bug24219;
-DROP TABLE IF EXISTS bug24219_2;
---enable_warnings
-
-CREATE TABLE bug24219 (a INT, INDEX(a));
-
-SHOW INDEX FROM bug24219;
-
-ALTER TABLE bug24219 RENAME TO bug24219_2, DISABLE KEYS;
-
-SHOW INDEX FROM bug24219_2;
-
-DROP TABLE bug24219_2;
-
-#
-# Bug#24562 (ALTER TABLE ... ORDER BY ... with complex expression asserts)
-#
-
---disable_warnings
-drop table if exists table_24562;
---enable_warnings
-
-create table table_24562(
- section int,
- subsection int,
- title varchar(50));
-
-insert into table_24562 values
-(1, 0, "Introduction"),
-(1, 1, "Authors"),
-(1, 2, "Acknowledgements"),
-(2, 0, "Basics"),
-(2, 1, "Syntax"),
-(2, 2, "Client"),
-(2, 3, "Server"),
-(3, 0, "Intermediate"),
-(3, 1, "Complex queries"),
-(3, 2, "Stored Procedures"),
-(3, 3, "Stored Functions"),
-(4, 0, "Advanced"),
-(4, 1, "Replication"),
-(4, 2, "Load balancing"),
-(4, 3, "High availability"),
-(5, 0, "Conclusion");
-
-select * from table_24562;
-
-alter table table_24562 add column reviewer varchar(20),
-order by title;
-
-select * from table_24562;
-
-update table_24562 set reviewer="Me" where section=2;
-update table_24562 set reviewer="You" where section=3;
-
-alter table table_24562
-order by section ASC, subsection DESC;
-
-select * from table_24562;
-
-alter table table_24562
-order by table_24562.subsection ASC, table_24562.section DESC;
-
-select * from table_24562;
-
---error ER_PARSE_ERROR
-alter table table_24562 order by 12;
---error ER_PARSE_ERROR
-alter table table_24562 order by (section + 12);
---error ER_PARSE_ERROR
-alter table table_24562 order by length(title);
---error ER_PARSE_ERROR
-alter table table_24562 order by (select 12 from dual);
-
---error ER_BAD_FIELD_ERROR
-alter table table_24562 order by no_such_col;
-
-drop table table_24562;
-
-# End of 4.1 tests
-
-#
-# Bug #14693 (ALTER SET DEFAULT doesn't work)
-#
-
-create table t1 (mycol int(10) not null);
-alter table t1 alter column mycol set default 0;
-desc t1;
-drop table t1;
-
-#
-# Bug#25262 Auto Increment lost when changing Engine type
-#
-
-create table t1(id int(8) primary key auto_increment) engine=heap;
-
-insert into t1 values (null);
-insert into t1 values (null);
-
-select * from t1;
-
-# Set auto increment to 50
-alter table t1 auto_increment = 50;
-
-# Alter to myisam
-alter table t1 engine = myisam;
-
-# This insert should get id 50
-insert into t1 values (null);
-select * from t1;
-
-# Alter to heap again
-alter table t1 engine = heap;
-insert into t1 values (null);
-select * from t1;
-
-drop table t1;
-
-#
-# Bug#27507: Wrong DATETIME value was allowed by ALTER TABLE in the
-# NO_ZERO_DATE mode.
-#
-set @orig_sql_mode = @@sql_mode;
-set sql_mode="no_zero_date";
-create table t1(f1 int);
-alter table t1 add column f2 datetime not null, add column f21 date not null;
-insert into t1 values(1,'2000-01-01','2000-01-01');
---error 1292
-alter table t1 add column f3 datetime not null;
---error 1292
-alter table t1 add column f3 date not null;
---error 1292
-alter table t1 add column f4 datetime not null default '2002-02-02',
- add column f41 date not null;
-alter table t1 add column f4 datetime not null default '2002-02-02',
- add column f41 date not null default '2002-02-02';
-select * from t1;
-drop table t1;
-set sql_mode= @orig_sql_mode;
-
-#
-# Some additional tests for new, faster alter table. Note that most of the
-# whole alter table code is being tested all around the test suite already.
-#
-
-create table t1 (v varchar(32));
-insert into t1 values ('def'),('abc'),('hij'),('3r4f');
-select * from t1;
-# Fast alter, no copy performed
-alter table t1 change v v2 varchar(32);
-select * from t1;
-# Fast alter, no copy performed
-alter table t1 change v2 v varchar(64);
-select * from t1;
-update t1 set v = 'lmn' where v = 'hij';
-select * from t1;
-# Regular alter table
-alter table t1 add i int auto_increment not null primary key first;
-select * from t1;
-update t1 set i=5 where i=3;
-select * from t1;
-alter table t1 change i i bigint;
-select * from t1;
-alter table t1 add unique key (i, v);
-select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn');
-drop table t1;
-
-#
-# Bug#6073 "ALTER table minor glich": ALTER TABLE complains that an index
-# without # prefix is not allowed for TEXT columns, while index
-# is defined with prefix.
-#
-create table t1 (t varchar(255) default null, key t (t(80)))
-engine=myisam default charset=latin1;
-alter table t1 change t t text;
-drop table t1;
-
-#
-# Bug #26794: Adding an index with a prefix on a SPATIAL type breaks ALTER
-# TABLE
-#
-CREATE TABLE t1 (a varchar(500));
-
-ALTER TABLE t1 ADD b GEOMETRY NOT NULL, ADD SPATIAL INDEX(b);
-SHOW CREATE TABLE t1;
-ALTER TABLE t1 ADD KEY(b(50));
-SHOW CREATE TABLE t1;
-
-ALTER TABLE t1 ADD c POINT;
-SHOW CREATE TABLE t1;
-
---error ER_WRONG_SUB_KEY
-CREATE TABLE t2 (a INT, KEY (a(20)));
-
-ALTER TABLE t1 ADD d INT;
---error ER_WRONG_SUB_KEY
-ALTER TABLE t1 ADD KEY (d(20));
-
-# the 5.1 part of the test
---error ER_WRONG_SUB_KEY
-ALTER TABLE t1 ADD e GEOMETRY NOT NULL, ADD SPATIAL KEY (e(30));
-
-DROP TABLE t1;
-
-#
-# Bug#18038 MySQL server corrupts binary columns data
-#
-
-CREATE TABLE t1 (s CHAR(8) BINARY);
-INSERT INTO t1 VALUES ('test');
-SELECT LENGTH(s) FROM t1;
-ALTER TABLE t1 MODIFY s CHAR(10) BINARY;
-SELECT LENGTH(s) FROM t1;
-DROP TABLE t1;
-
-CREATE TABLE t1 (s BINARY(8));
-INSERT INTO t1 VALUES ('test');
-SELECT LENGTH(s) FROM t1;
-SELECT HEX(s) FROM t1;
-ALTER TABLE t1 MODIFY s BINARY(10);
-SELECT HEX(s) FROM t1;
-SELECT LENGTH(s) FROM t1;
-DROP TABLE t1;
-
-#
-# Bug#19386: Multiple alter causes crashed table
-# The trailing column would get corrupted data, or server could not even read
-# it.
-#
-
-CREATE TABLE t1 (v VARCHAR(3), b INT);
-INSERT INTO t1 VALUES ('abc', 5);
-SELECT * FROM t1;
-ALTER TABLE t1 MODIFY COLUMN v VARCHAR(4);
-SELECT * FROM t1;
-DROP TABLE t1;
-
-
-#
-# Bug#31291 ALTER TABLE CONVERT TO CHARACTER SET does not change some data types
-#
-create table t1 (a tinytext character set latin1);
-alter table t1 convert to character set utf8;
-show create table t1;
-drop table t1;
-create table t1 (a mediumtext character set latin1);
-alter table t1 convert to character set utf8;
-show create table t1;
-drop table t1;
-
---echo End of 5.0 tests
-
-#
-# Extended test coverage for ALTER TABLE behaviour under LOCK TABLES
-# It should be consistent across all platforms and for all engines
-# (Before 5.1 this was not true as behavior was different between
-# Unix/Windows and transactional/non-transactional tables).
-# See also innodb_mysql.test
-#
---disable_warnings
-drop table if exists t1, t2, t3;
---enable_warnings
-create table t1 (i int);
-create table t3 (j int);
-insert into t1 values ();
-insert into t3 values ();
-# Table which is altered under LOCK TABLES it should stay in list of locked
-# tables and be available after alter takes place unless ALTER contains RENAME
-# clause. We should see the new definition of table, of course.
-lock table t1 write, t3 read;
-# Example of so-called 'fast' ALTER TABLE
-alter table t1 modify i int default 1;
-insert into t1 values ();
-select * from t1;
-# And now full-blown ALTER TABLE
-alter table t1 change i c char(10) default "Two";
-insert into t1 values ();
-select * from t1;
-# If table is renamed then it should be removed from the list
-# of locked tables. 'Fast' ALTER TABLE with RENAME clause:
-alter table t1 modify c char(10) default "Three", rename to t2;
---error ER_TABLE_NOT_LOCKED
-select * from t1;
---error ER_TABLE_NOT_LOCKED
-select * from t2;
-select * from t3;
-unlock tables;
-insert into t2 values ();
-select * from t2;
-lock table t2 write, t3 read;
-# Full ALTER TABLE with RENAME
-alter table t2 change c vc varchar(100) default "Four", rename to t1;
---error ER_TABLE_NOT_LOCKED
-select * from t1;
---error ER_TABLE_NOT_LOCKED
-select * from t2;
-select * from t3;
-unlock tables;
-insert into t1 values ();
-select * from t1;
-drop tables t1, t3;
-
-
-#
-# Bug#18775 - Temporary table from alter table visible to other threads
-#
-# Check if special characters work and duplicates are detected.
---disable_warnings
-DROP TABLE IF EXISTS `t+1`, `t+2`;
---enable_warnings
-CREATE TABLE `t+1` (c1 INT);
-ALTER TABLE `t+1` RENAME `t+2`;
-CREATE TABLE `t+1` (c1 INT);
---error ER_TABLE_EXISTS_ERROR
-ALTER TABLE `t+1` RENAME `t+2`;
-DROP TABLE `t+1`, `t+2`;
-#
-# Same for temporary tables though these names do not become file names.
-CREATE TEMPORARY TABLE `tt+1` (c1 INT);
-ALTER TABLE `tt+1` RENAME `tt+2`;
-CREATE TEMPORARY TABLE `tt+1` (c1 INT);
---error ER_TABLE_EXISTS_ERROR
-ALTER TABLE `tt+1` RENAME `tt+2`;
-SHOW CREATE TABLE `tt+1`;
-SHOW CREATE TABLE `tt+2`;
-DROP TABLE `tt+1`, `tt+2`;
-#
-# Check if special characters as in tmp_file_prefix work.
-CREATE TABLE `#sql1` (c1 INT);
-CREATE TABLE `@0023sql2` (c1 INT);
-SHOW TABLES;
-RENAME TABLE `#sql1` TO `@0023sql1`;
-RENAME TABLE `@0023sql2` TO `#sql2`;
-SHOW TABLES;
-ALTER TABLE `@0023sql1` RENAME `#sql-1`;
-ALTER TABLE `#sql2` RENAME `@0023sql-2`;
-SHOW TABLES;
-INSERT INTO `#sql-1` VALUES (1);
-INSERT INTO `@0023sql-2` VALUES (2);
-DROP TABLE `#sql-1`, `@0023sql-2`;
-#
-# Same for temporary tables though these names do not become file names.
-CREATE TEMPORARY TABLE `#sql1` (c1 INT);
-CREATE TEMPORARY TABLE `@0023sql2` (c1 INT);
-SHOW TABLES;
-ALTER TABLE `#sql1` RENAME `@0023sql1`;
-ALTER TABLE `@0023sql2` RENAME `#sql2`;
-SHOW TABLES;
-INSERT INTO `#sql2` VALUES (1);
-INSERT INTO `@0023sql1` VALUES (2);
-SHOW CREATE TABLE `#sql2`;
-SHOW CREATE TABLE `@0023sql1`;
-DROP TABLE `#sql2`, `@0023sql1`;
-
-#
-# Bug #22369: Alter table rename combined with other alterations causes lost tables
-#
-# This problem happens if the data change is compatible.
-# Changing to the same type is compatible for example.
-#
---disable_warnings
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
---enable_warnings
-CREATE TABLE t1 (
- int_field INTEGER UNSIGNED NOT NULL,
- char_field CHAR(10),
- INDEX(`int_field`)
-);
-
-DESCRIBE t1;
-
-SHOW INDEXES FROM t1;
-
-INSERT INTO t1 VALUES (1, "edno"), (1, "edno"), (2, "dve"), (3, "tri"), (5, "pet");
---echo "Non-copy data change - new frm, but old data and index files"
-ALTER TABLE t1
- CHANGE int_field unsigned_int_field INTEGER UNSIGNED NOT NULL,
- RENAME t2;
-
---error ER_NO_SUCH_TABLE
-SELECT * FROM t1 ORDER BY int_field;
-SELECT * FROM t2 ORDER BY unsigned_int_field;
-DESCRIBE t2;
-DESCRIBE t2;
-ALTER TABLE t2 MODIFY unsigned_int_field BIGINT UNSIGNED NOT NULL;
-DESCRIBE t2;
-
-DROP TABLE t2;
-
-#
-# Bug#28427: Columns were renamed instead of moving by ALTER TABLE.
-#
-CREATE TABLE t1 (f1 INT, f2 INT, f3 INT);
-INSERT INTO t1 VALUES (1, 2, NULL);
-SELECT * FROM t1;
-ALTER TABLE t1 MODIFY COLUMN f3 INT AFTER f1;
-SELECT * FROM t1;
-ALTER TABLE t1 MODIFY COLUMN f3 INT AFTER f2;
-SELECT * FROM t1;
-DROP TABLE t1;
-
-#
-# BUG#29957 - alter_table.test fails
-#
-create table t1 (c char(10) default "Two");
-lock table t1 write;
-insert into t1 values ();
-alter table t1 modify c char(10) default "Three";
-unlock tables;
-select * from t1;
-check table t1;
-drop table t1;
-
-#
-# Bug#33873: Fast ALTER TABLE doesn't work with multibyte character sets
-#
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-CREATE TABLE t1 (id int, c int) character set latin1;
-INSERT INTO t1 VALUES (1,1);
---enable_info
-ALTER TABLE t1 CHANGE c d int;
-ALTER TABLE t1 CHANGE d c int;
-ALTER TABLE t1 MODIFY c VARCHAR(10);
-ALTER TABLE t1 CHANGE c d varchar(10);
-ALTER TABLE t1 CHANGE d c varchar(10);
---disable_info
-DROP TABLE t1;
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-CREATE TABLE t1 (id int, c int) character set utf8;
-INSERT INTO t1 VALUES (1,1);
---enable_info
-ALTER TABLE t1 CHANGE c d int;
-ALTER TABLE t1 CHANGE d c int;
-ALTER TABLE t1 MODIFY c VARCHAR(10);
-ALTER TABLE t1 CHANGE c d varchar(10);
-ALTER TABLE t1 CHANGE d c varchar(10);
---disable_info
-DROP TABLE t1;
-
-#
-# Bug#39372 "Smart" ALTER TABLE not so smart after all.
-#
-create table t1(f1 int not null, f2 int not null, key (f1), key (f2));
-let $count= 50;
---disable_query_log
-begin;
-while ($count)
-{
- EVAL insert into t1 values (1,1),(1,1),(1,1),(1,1),(1,1);
- EVAL insert into t1 values (2,2),(2,2),(2,2),(2,2),(2,2);
- dec $count ;
-}
-commit;
---enable_query_log
-
-select index_length into @unpaked_keys_size from
-information_schema.tables where table_name='t1';
-alter table t1 pack_keys=1;
-select index_length into @paked_keys_size from
-information_schema.tables where table_name='t1';
-select (@unpaked_keys_size > @paked_keys_size);
-
-select max_data_length into @orig_max_data_length from
-information_schema.tables where table_name='t1';
-alter table t1 max_rows=100;
-select max_data_length into @changed_max_data_length from
-information_schema.tables where table_name='t1';
-select (@orig_max_data_length > @changed_max_data_length);
-
-drop table t1;
-
-#
-# Bug #23113: Different behavior on altering ENUM fields between 5.0 and 5.1
-#
-CREATE TABLE t1(a INT AUTO_INCREMENT PRIMARY KEY,
- b ENUM('a', 'b', 'c') NOT NULL);
-INSERT INTO t1 (b) VALUES ('a'), ('c'), ('b'), ('b'), ('a');
-ALTER TABLE t1 MODIFY b ENUM('a', 'z', 'b', 'c') NOT NULL;
-SELECT * FROM t1;
-DROP TABLE t1;
-
-#
-# Test for ALTER column DROP DEFAULT
-#
-
-SET @save_sql_mode=@@sql_mode;
-SET sql_mode=strict_all_tables;
-
-CREATE TABLE t1 (a int NOT NULL default 42);
-INSERT INTO t1 values ();
-SELECT * FROM t1;
-ALTER TABLE t1 ALTER COLUMN a DROP DEFAULT;
---error 1364
-INSERT INTO t1 values ();
-INSERT INTO t1 (a) VALUES (11);
-SELECT * FROM t1 ORDER BY a;
-DROP TABLE t1;
-SET @@sql_mode=@save_sql_mode;
---echo #
---echo # Bug#45567: Fast ALTER TABLE broken for enum and set
---echo #
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-CREATE TABLE t1 (a ENUM('a1','a2'));
-INSERT INTO t1 VALUES ('a1'),('a2');
---enable_info
---echo # No copy: No modification
-ALTER TABLE t1 MODIFY COLUMN a ENUM('a1','a2');
---echo # No copy: Add new enumeration to the end
-ALTER TABLE t1 MODIFY COLUMN a ENUM('a1','a2','a3');
---echo # Copy: Modify and add new to the end
-ALTER TABLE t1 MODIFY COLUMN a ENUM('a1','a2','xx','a5');
---echo # Copy: Remove from the end
-ALTER TABLE t1 MODIFY COLUMN a ENUM('a1','a2','xx');
---echo # Copy: Add new enumeration
-ALTER TABLE t1 MODIFY COLUMN a ENUM('a1','a2','a0','xx');
---echo # No copy: Add new enumerations to the end
-ALTER TABLE t1 MODIFY COLUMN a ENUM('a1','a2','a0','xx','a5','a6');
---disable_info
-DROP TABLE t1;
-
-CREATE TABLE t1 (a SET('a1','a2'));
-INSERT INTO t1 VALUES ('a1'),('a2');
---enable_info
---echo # No copy: No modification
-ALTER TABLE t1 MODIFY COLUMN a SET('a1','a2');
---echo # No copy: Add new to the end
-ALTER TABLE t1 MODIFY COLUMN a SET('a1','a2','a3');
---echo # Copy: Modify and add new to the end
-ALTER TABLE t1 MODIFY COLUMN a SET('a1','a2','xx','a5');
---echo # Copy: Remove from the end
-ALTER TABLE t1 MODIFY COLUMN a SET('a1','a2','xx');
---echo # Copy: Add new member
-ALTER TABLE t1 MODIFY COLUMN a SET('a1','a2','a0','xx');
---echo # No copy: Add new to the end
-ALTER TABLE t1 MODIFY COLUMN a SET('a1','a2','a0','xx','a5','a6');
---echo # Copy: Numerical incrase (pack lenght)
-ALTER TABLE t1 MODIFY COLUMN a SET('a1','a2','a0','xx','a5','a6','a7','a8','a9','a10');
---disable_info
-DROP TABLE t1;
-
-#
-# Bug#43508: Renaming timestamp or date column triggers table copy
-#
-
-CREATE TABLE t1 (f1 TIMESTAMP NULL DEFAULT NULL,
- f2 INT(11) DEFAULT NULL) ENGINE=MYISAM DEFAULT CHARSET=utf8;
-
-INSERT INTO t1 VALUES (NULL, NULL), ("2009-10-09 11:46:19", 2);
-
---echo this should affect no rows as there is no real change
---enable_info
-ALTER TABLE t1 CHANGE COLUMN f1 f1_no_real_change TIMESTAMP NULL DEFAULT NULL;
---disable_info
-DROP TABLE t1;
-
-
---echo #
---echo # Bug #31145: ALTER TABLE DROP COLUMN, ADD COLUMN crashes (linux)
---echo # or freezes (win) the server
---echo #
-
-CREATE TABLE t1 (a TEXT, id INT, b INT);
-ALTER TABLE t1 DROP COLUMN a, ADD COLUMN c TEXT FIRST;
-
-DROP TABLE t1;
-
-
---echo #
---echo # Test for bug #12652385 - "61493: REORDERING COLUMNS TO POSITION
---echo # FIRST CAN CAUSE DATA TO BE CORRUPTED".
---echo #
---disable_warnings
-drop table if exists t1;
---enable_warnings
---echo # Use MyISAM engine as the fact that InnoDB doesn't support
---echo # in-place ALTER TABLE in cases when columns are being renamed
---echo # hides some bugs.
-create table t1 (i int, j int) engine=myisam;
-insert into t1 value (1, 2);
---echo # First, test for original problem described in the bug report.
-select * from t1;
---echo # Change of column order by the below ALTER TABLE statement should
---echo # affect both column names and column contents.
-alter table t1 modify column j int first;
-select * from t1;
---echo # Now test for similar problem with the same root.
---echo # The below ALTER TABLE should change not only the name but
---echo # also the value for the last column of the table.
-alter table t1 drop column i, add column k int default 0;
-select * from t1;
---echo # Clean-up.
-drop table t1;
-
-
---echo End of 5.1 tests
-
-#
-# Bug #31031 ALTER TABLE regression in 5.0
-#
-# The ALTER TABLE operation failed with
-# ERROR 1089 (HY000): Incorrect sub part key; ...
-#
-CREATE TABLE t1(c CHAR(10),
- i INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY);
-INSERT INTO t1 VALUES('a',2),('b',4),('c',6);
-ALTER TABLE t1
- DROP i,
- ADD i INT UNSIGNED NOT NULL AUTO_INCREMENT,
- AUTO_INCREMENT = 1;
-DROP TABLE t1;
-
-
-#
-# Bug#50542 5.5.x doesn't check length of key prefixes:
-# corruption and crash results
-#
-# This case is related to Bug#31031 (above)
-# A statement where the index key is larger/wider than
-# the column type, should cause an error
-#
---error ER_WRONG_SUB_KEY
-CREATE TABLE t1 (a CHAR(1), PRIMARY KEY (a(255)));
-
-# Test other variants of creating indices
-CREATE TABLE t1 (a CHAR(1));
-# ALTER TABLE
---error ER_WRONG_SUB_KEY
-ALTER TABLE t1 ADD PRIMARY KEY (a(20));
---error ER_WRONG_SUB_KEY
-ALTER TABLE t1 ADD KEY (a(20));
-# CREATE INDEX
---error ER_WRONG_SUB_KEY
-CREATE UNIQUE INDEX i1 ON t1 (a(20));
---error ER_WRONG_SUB_KEY
-CREATE INDEX i2 ON t1 (a(20));
-# cleanup
-DROP TABLE t1;
-
-
-#
-# Bug #45052 ALTER TABLE ADD COLUMN crashes server with multiple foreign key columns
-# The alter table fails if 2 or more new fields added and
-# also added a key with these fields
-#
-CREATE TABLE t1 (id int);
-INSERT INTO t1 VALUES (1), (2);
-ALTER TABLE t1 ADD COLUMN (f1 INT), ADD COLUMN (f2 INT), ADD KEY f2k(f2);
-DROP TABLE t1;
-
-
---echo #
---echo # Test for bug #53820 "ALTER a MEDIUMINT column table causes full
---echo # table copy".
---echo #
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-CREATE TABLE t1 (a INT, b MEDIUMINT);
-INSERT INTO t1 VALUES (1, 1), (2, 2);
---echo # The below ALTER should not copy table and so no rows should
---echo # be shown as affected.
---enable_info
-ALTER TABLE t1 CHANGE a id INT;
---disable_info
-DROP TABLE t1;
-
-
---echo #
---echo # Bug#11754461 CANNOT ALTER TABLE WHEN KEY PREFIX TOO LONG
---echo #
-
---disable_warnings
-DROP DATABASE IF EXISTS db1;
---enable_warnings
-
-CREATE DATABASE db1 CHARACTER SET utf8;
-CREATE TABLE db1.t1 (bar TINYTEXT, KEY (bar(100)));
-ALTER TABLE db1.t1 ADD baz INT;
-
-DROP DATABASE db1;
-
-
---echo # Additional coverage for refactoring which is made as part
---echo # of fix for bug #27480 "Extend CREATE TEMPORARY TABLES privilege
---echo # to allow temp table operations".
---echo #
---echo # At some point the below test case failed on assertion.
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-CREATE TEMPORARY TABLE t1 (i int) ENGINE=MyISAM;
-
---error ER_ILLEGAL_HA
-ALTER TABLE t1 DISCARD TABLESPACE;
-
-DROP TABLE t1;
-
-
---echo #
---echo # Bug#11938039 RE-EXECUTION OF FRM-ONLY ALTER TABLE WITH RENAME
---echo # CLAUSE FAILS OR ABORTS SERVER.
---echo #
---disable_warnings
-drop table if exists t1;
---enable_warnings
-create table t1 (a int);
-prepare stmt1 from 'alter table t1 alter column a set default 1, rename to t2';
-execute stmt1;
-rename table t2 to t1;
---echo # The below statement should succeed and not emit error or abort server.
-execute stmt1;
-deallocate prepare stmt1;
-drop table t2;
-
---echo #
---echo # MDEV-8960 Can't refer the same column twice in one ALTER TABLE
---echo #
-
-CREATE TABLE t1 (
- `a` int(11) DEFAULT NULL
-) DEFAULT CHARSET=utf8;
-
-ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL,
-ALTER COLUMN `consultant_id` DROP DEFAULT;
-
-SHOW CREATE TABLE t1;
-DROP TABLE t1;
-
-CREATE TABLE t1 (
- `a` int(11) DEFAULT NULL
-) DEFAULT CHARSET=utf8;
-
-ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL,
-ALTER COLUMN `consultant_id` SET DEFAULT 2;
-SHOW CREATE TABLE t1;
-DROP TABLE t1;
-
-CREATE TABLE t1 (
- `a` int(11) DEFAULT NULL
-) DEFAULT CHARSET=utf8;
-
-ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL DEFAULT 2,
-ALTER COLUMN `consultant_id` DROP DEFAULT;
-SHOW CREATE TABLE t1;
-DROP TABLE t1;
-
-CREATE TABLE t1 (
- `a` int(11) DEFAULT NULL
-) DEFAULT CHARSET=utf8;
-
-ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL DEFAULT 2,
-ALTER COLUMN `consultant_id` DROP DEFAULT,
-MODIFY COLUMN `consultant_id` BIGINT;
-SHOW CREATE TABLE t1;
-DROP TABLE t1;
-
---echo #
---echo # BUG#27788685: NO WARNING WHEN TRUNCATING A STRING WITH DATA LOSS
---echo #
-
-SET GLOBAL max_allowed_packet=17825792;
-
---connect(con1, localhost, root,,)
-CREATE TABLE t1 (t1_fld1 TEXT);
-CREATE TABLE t2 (t2_fld1 MEDIUMTEXT);
-CREATE TABLE t3 (t3_fld1 LONGTEXT);
-
-INSERT INTO t1 VALUES (REPEAT('a',300));
-INSERT INTO t2 VALUES (REPEAT('b',65680));
-INSERT INTO t3 VALUES (REPEAT('c',16777300));
-
-SELECT LENGTH(t1_fld1) FROM t1;
-SELECT LENGTH(t2_fld1) FROM t2;
-SELECT LENGTH(t3_fld1) FROM t3;
-
---echo # With strict mode
-SET SQL_MODE='STRICT_ALL_TABLES';
-
---error ER_DATA_TOO_LONG
-ALTER TABLE t1 CHANGE `t1_fld1` `my_t1_fld1` TINYTEXT;
---error ER_DATA_TOO_LONG
-ALTER TABLE t2 CHANGE `t2_fld1` `my_t2_fld1` TEXT;
---error ER_DATA_TOO_LONG
-ALTER TABLE t3 CHANGE `t3_fld1` `my_t3_fld1` MEDIUMTEXT;
-
---echo # With non-strict mode
-SET SQL_MODE='';
-
-ALTER TABLE t1 CHANGE `t1_fld1` `my_t1_fld1` TINYTEXT;
-ALTER TABLE t2 CHANGE `t2_fld1` `my_t2_fld1` TEXT;
-ALTER TABLE t3 CHANGE `t3_fld1` `my_t3_fld1` MEDIUMTEXT;
-
-SELECT LENGTH(my_t1_fld1) FROM t1;
-SELECT LENGTH(my_t2_fld1) FROM t2;
-SELECT LENGTH(my_t3_fld1) FROM t3;
-
-# Cleanup
---disconnect con1
---source include/wait_until_disconnected.inc
-
---connection default
-DROP TABLE t1, t2, t3;
-
-SET SQL_MODE=default;
-SET GLOBAL max_allowed_packet=default;
-
-#
-# Test of ALTER TABLE IF [NOT] EXISTS
-#
-
-CREATE TABLE t1 (
- id INT(11) NOT NULL,
- x_param INT(11) DEFAULT NULL,
- PRIMARY KEY (id)
-) ENGINE=MYISAM;
-
-ALTER TABLE t1 ADD COLUMN IF NOT EXISTS id INT,
- ADD COLUMN IF NOT EXISTS lol INT AFTER id;
-ALTER TABLE t1 ADD COLUMN IF NOT EXISTS lol INT AFTER id;
-ALTER TABLE t1 DROP COLUMN IF EXISTS lol;
-ALTER TABLE t1 DROP COLUMN IF EXISTS lol;
-
-ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param);
-ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param);
-ALTER TABLE t1 MODIFY IF EXISTS lol INT;
-
-DROP INDEX IF EXISTS x_param ON t1;
-DROP INDEX IF EXISTS x_param ON t1;
-CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param);
-CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param);
-SHOW CREATE TABLE t1;
-DROP TABLE t1;
-
-CREATE TABLE t1 (
- id INT(11) NOT NULL,
- x_param INT(11) DEFAULT NULL,
- PRIMARY KEY (id)
-) ENGINE=INNODB;
-
-CREATE TABLE t2 (
- id INT(11) NOT NULL) ENGINE=INNODB;
-
-ALTER TABLE t1 ADD COLUMN IF NOT EXISTS id INT,
- ADD COLUMN IF NOT EXISTS lol INT AFTER id;
-ALTER TABLE t1 ADD COLUMN IF NOT EXISTS lol INT AFTER id;
-ALTER TABLE t1 DROP COLUMN IF EXISTS lol;
-ALTER TABLE t1 DROP COLUMN IF EXISTS lol;
-
-ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param);
-ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param);
-ALTER TABLE t1 MODIFY IF EXISTS lol INT;
-
-DROP INDEX IF EXISTS x_param ON t1;
-DROP INDEX IF EXISTS x_param ON t1;
-CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param);
-CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param);
-SHOW CREATE TABLE t1;
-
-ALTER TABLE t2 ADD FOREIGN KEY IF NOT EXISTS fk(id) REFERENCES t1(id);
-ALTER TABLE t2 ADD FOREIGN KEY IF NOT EXISTS fk(id) REFERENCES t1(id);
-ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS fk;
-ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS fk;
-SHOW CREATE TABLE t2;
-ALTER TABLE t2 ADD FOREIGN KEY (id) REFERENCES t1(id);
-ALTER TABLE t2 ADD FOREIGN KEY IF NOT EXISTS t2_ibfk_1(id) REFERENCES t1(id);
-ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS t2_ibfk_1;
-ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS t2_ibfk_1;
-SHOW CREATE TABLE t2;
-
-DROP TABLE t2;
-CREATE TABLE t2 (
- id INT(11) NOT NULL);
-ALTER TABLE t2 ADD COLUMN a INT, ADD COLUMN IF NOT EXISTS a INT;
-ALTER TABLE t2 ADD KEY k_id(id), ADD KEY IF NOT EXISTS k_id(id);
-SHOW CREATE TABLE t2;
-ALTER TABLE t2 DROP KEY k_id, DROP KEY IF EXISTS k_id;
-ALTER TABLE t2 DROP COLUMN a, DROP COLUMN IF EXISTS a;
-SHOW CREATE TABLE t2;
-
-DROP TABLE t2;
-DROP TABLE t1;
-
-CREATE TABLE t1 (
- `transaction_id` int(11) NOT NULL DEFAULT '0',
- KEY `transaction_id` (`transaction_id`));
-ALTER TABLE t1 DROP KEY IF EXISTS transaction_id, ADD PRIMARY KEY IF NOT EXISTS (transaction_id);
-SHOW CREATE TABLE t1;
-
-DROP TABLE t1;
-
---echo # Bug#11748057 (formerly known as 34972): ALTER TABLE statement doesn't
---echo # identify correct column name.
---echo #
-
-CREATE TABLE t1 (c1 int unsigned , c2 char(100) not null default '');
-ALTER TABLE t1 ADD c3 char(16) NOT NULL DEFAULT '' AFTER c2,
- MODIFY c2 char(100) NOT NULL DEFAULT '' AFTER c1;
-SHOW CREATE TABLE t1;
-DROP TABLE t1;
-
---echo #
---echo # WL#5534 Online ALTER, Phase 1
---echo #
-
---echo # Single thread tests.
---echo # See innodb_mysql_sync.test for multi thread tests.
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-CREATE TABLE t1(a INT PRIMARY KEY, b INT) engine=InnoDB;
-CREATE TABLE m1(a INT PRIMARY KEY, b INT) engine=MyISAM;
-INSERT INTO t1 VALUES (1,1), (2,2);
-INSERT INTO m1 VALUES (1,1), (2,2);
-
---echo #
---echo # 1: Test ALGORITHM keyword
---echo #
-
---echo # --enable_info allows us to see how many rows were updated
---echo # by ALTER TABLE. in-place will show 0 rows, while copy > 0.
-
---enable_info
-ALTER TABLE t1 ADD INDEX i1(b);
-ALTER TABLE t1 ADD INDEX i2(b), ALGORITHM= DEFAULT;
-ALTER TABLE t1 ADD INDEX i3(b), ALGORITHM= COPY;
-ALTER TABLE t1 ADD INDEX i4(b), ALGORITHM= INPLACE;
---error ER_UNKNOWN_ALTER_ALGORITHM
-ALTER TABLE t1 ADD INDEX i5(b), ALGORITHM= INVALID;
-
-ALTER TABLE m1 ENABLE KEYS;
-ALTER TABLE m1 ENABLE KEYS, ALGORITHM= DEFAULT;
-ALTER TABLE m1 ENABLE KEYS, ALGORITHM= COPY;
-ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE;
---disable_info
-
-ALTER TABLE t1 DROP INDEX i1, DROP INDEX i2, DROP INDEX i3, DROP INDEX i4;
-
---echo #
---echo # 2: Test ALGORITHM + old_alter_table
---echo #
-
---enable_info
-SET SESSION old_alter_table= 1;
-ALTER TABLE t1 ADD INDEX i1(b);
-ALTER TABLE t1 ADD INDEX i2(b), ALGORITHM= DEFAULT;
-ALTER TABLE t1 ADD INDEX i3(b), ALGORITHM= COPY;
-ALTER TABLE t1 ADD INDEX i4(b), ALGORITHM= INPLACE;
-SET SESSION old_alter_table= 0;
---disable_info
-
-ALTER TABLE t1 DROP INDEX i1, DROP INDEX i2, DROP INDEX i3, DROP INDEX i4;
-
---echo #
---echo # 3: Test unsupported in-place operation
---echo #
-
-ALTER TABLE t1 ADD COLUMN (c1 INT);
-ALTER TABLE t1 ADD COLUMN (c2 INT), ALGORITHM= DEFAULT;
-ALTER TABLE t1 ADD COLUMN (c3 INT), ALGORITHM= COPY;
-ALTER TABLE t1 ADD COLUMN (c4 INT), ALGORITHM= INPLACE;
-
-ALTER TABLE t1 DROP COLUMN c1, DROP COLUMN c2, DROP COLUMN c3, DROP COLUMN c4;
-
---echo #
---echo # 4: Test LOCK keyword
---echo #
-
---enable_info
-ALTER TABLE t1 ADD INDEX i1(b), LOCK= DEFAULT;
-ALTER TABLE t1 ADD INDEX i2(b), LOCK= NONE;
-ALTER TABLE t1 ADD INDEX i3(b), LOCK= SHARED;
-ALTER TABLE t1 ADD INDEX i4(b), LOCK= EXCLUSIVE;
---error ER_UNKNOWN_ALTER_LOCK
-ALTER TABLE t1 ADD INDEX i5(b), LOCK= INVALID;
---disable_info
-
-ALTER TABLE m1 ENABLE KEYS, LOCK= DEFAULT;
---error ER_ALTER_OPERATION_NOT_SUPPORTED
-ALTER TABLE m1 ENABLE KEYS, LOCK= NONE;
---error ER_ALTER_OPERATION_NOT_SUPPORTED
-ALTER TABLE m1 ENABLE KEYS, LOCK= SHARED;
-ALTER TABLE m1 ENABLE KEYS, LOCK= EXCLUSIVE;
-
-ALTER TABLE t1 DROP INDEX i1, DROP INDEX i2, DROP INDEX i3, DROP INDEX i4;
-
---echo #
---echo # 5: Test ALGORITHM + LOCK
---echo #
-
---enable_info
-ALTER TABLE t1 ADD INDEX i1(b), ALGORITHM= INPLACE, LOCK= NONE;
-ALTER TABLE t1 ADD INDEX i2(b), ALGORITHM= INPLACE, LOCK= SHARED;
-ALTER TABLE t1 ADD INDEX i3(b), ALGORITHM= INPLACE, LOCK= EXCLUSIVE;
---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
-ALTER TABLE t1 ADD INDEX i4(b), ALGORITHM= COPY, LOCK= NONE;
-ALTER TABLE t1 ADD INDEX i5(b), ALGORITHM= COPY, LOCK= SHARED;
-ALTER TABLE t1 ADD INDEX i6(b), ALGORITHM= COPY, LOCK= EXCLUSIVE;
-
---error ER_ALTER_OPERATION_NOT_SUPPORTED
-ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE, LOCK= NONE;
---error ER_ALTER_OPERATION_NOT_SUPPORTED
-ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE, LOCK= SHARED;
-ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE, LOCK= EXCLUSIVE;
---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
-ALTER TABLE m1 ENABLE KEYS, ALGORITHM= COPY, LOCK= NONE;
-# This works because the lock will be SNW for the copy phase.
-# It will still require exclusive lock for actually enabling keys.
-ALTER TABLE m1 ENABLE KEYS, ALGORITHM= COPY, LOCK= SHARED;
-ALTER TABLE m1 ENABLE KEYS, ALGORITHM= COPY, LOCK= EXCLUSIVE;
---disable_info
-
-DROP TABLE t1, m1;
-
---echo #
---echo # 6: Possible deadlock involving thr_lock.c
---echo #
-
-CREATE TABLE t1(a INT PRIMARY KEY, b INT);
-INSERT INTO t1 VALUES (1,1), (2,2);
-
-START TRANSACTION;
-INSERT INTO t1 VALUES (3,3);
-
---echo # Connection con1
-connect (con1, localhost, root);
---echo # Sending:
---send ALTER TABLE t1 DISABLE KEYS
-
---echo # Connection default
-connection default;
---echo # Waiting until ALTER TABLE is blocked.
-let $wait_condition=
- SELECT COUNT(*) = 1 FROM information_schema.processlist
- WHERE state = "Waiting for table metadata lock" AND
- info = "ALTER TABLE t1 DISABLE KEYS";
---source include/wait_condition.inc
-UPDATE t1 SET b = 4;
-COMMIT;
-
---echo # Connection con1
-connection con1;
---echo # Reaping: ALTER TABLE t1 DISABLE KEYS
---reap
-disconnect con1;
---source include/wait_until_disconnected.inc
-
---echo # Connection default
-connection default;
-DROP TABLE t1;
-
---echo #
---echo # 7: Which operations require copy and which can be done in-place?
---echo #
---echo # Test which ALTER TABLE operations are done in-place and
---echo # which operations are done using temporary table copy.
---echo #
---echo # --enable_info allows us to see how many rows were updated
---echo # by ALTER TABLE. in-place will show 0 rows, while copy > 0.
---echo #
-
---disable_warnings
-DROP TABLE IF EXISTS ti1, ti2, ti3, tm1, tm2, tm3;
---enable_warnings
-
---echo # Single operation tests
-
-CREATE TABLE ti1(a INT NOT NULL, b INT, c INT) engine=InnoDB;
-CREATE TABLE tm1(a INT NOT NULL, b INT, c INT) engine=MyISAM;
-CREATE TABLE ti2(a INT PRIMARY KEY AUTO_INCREMENT, b INT, c INT) engine=InnoDB;
-CREATE TABLE tm2(a INT PRIMARY KEY AUTO_INCREMENT, b INT, c INT) engine=MyISAM;
-INSERT INTO ti1 VALUES (1,1,1), (2,2,2);
-INSERT INTO ti2 VALUES (1,1,1), (2,2,2);
-INSERT INTO tm1 VALUES (1,1,1), (2,2,2);
-INSERT INTO tm2 VALUES (1,1,1), (2,2,2);
-
---enable_info
-ALTER TABLE ti1;
-ALTER TABLE tm1;
-
-ALTER TABLE ti1 ADD COLUMN d VARCHAR(200);
-ALTER TABLE tm1 ADD COLUMN d VARCHAR(200);
-ALTER TABLE ti1 ADD COLUMN d2 VARCHAR(200);
-ALTER TABLE tm1 ADD COLUMN d2 VARCHAR(200);
-ALTER TABLE ti1 ADD COLUMN e ENUM('a', 'b') FIRST;
-ALTER TABLE tm1 ADD COLUMN e ENUM('a', 'b') FIRST;
-ALTER TABLE ti1 ADD COLUMN f INT AFTER a;
-ALTER TABLE tm1 ADD COLUMN f INT AFTER a;
-
-ALTER TABLE ti1 ADD INDEX ii1(b);
-ALTER TABLE tm1 ADD INDEX im1(b);
-ALTER TABLE ti1 ADD UNIQUE INDEX ii2 (c);
-ALTER TABLE tm1 ADD UNIQUE INDEX im2 (c);
-ALTER TABLE ti1 ADD FULLTEXT INDEX ii3 (d);
-ALTER TABLE tm1 ADD FULLTEXT INDEX im3 (d);
-ALTER TABLE ti1 ADD FULLTEXT INDEX ii4 (d2);
-ALTER TABLE tm1 ADD FULLTEXT INDEX im4 (d2);
-
-# Bug#14140038 INCONSISTENT HANDLING OF FULLTEXT INDEXES IN ALTER TABLE
---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
-ALTER TABLE ti1 ADD PRIMARY KEY(a), ALGORITHM=INPLACE;
-ALTER TABLE ti1 ADD PRIMARY KEY(a);
-ALTER TABLE tm1 ADD PRIMARY KEY(a);
-
-ALTER TABLE ti1 DROP INDEX ii3;
-ALTER TABLE tm1 DROP INDEX im3;
-
-ALTER TABLE ti1 DROP COLUMN d2;
-ALTER TABLE tm1 DROP COLUMN d2;
-
-ALTER TABLE ti1 ADD CONSTRAINT fi1 FOREIGN KEY (b) REFERENCES ti2(a);
-ALTER TABLE tm1 ADD CONSTRAINT fm1 FOREIGN KEY (b) REFERENCES tm2(a);
-
-ALTER TABLE ti1 ALTER COLUMN b SET DEFAULT 1;
-ALTER TABLE tm1 ALTER COLUMN b SET DEFAULT 1;
-ALTER TABLE ti1 ALTER COLUMN b DROP DEFAULT;
-ALTER TABLE tm1 ALTER COLUMN b DROP DEFAULT;
-
-# This will set both ALTER_COLUMN_NAME and COLUMN_DEFAULT_VALUE
-ALTER TABLE ti1 CHANGE COLUMN f g INT;
-ALTER TABLE tm1 CHANGE COLUMN f g INT;
-ALTER TABLE ti1 CHANGE COLUMN g h VARCHAR(20);
-ALTER TABLE tm1 CHANGE COLUMN g h VARCHAR(20);
-ALTER TABLE ti1 MODIFY COLUMN e ENUM('a', 'b', 'c');
-ALTER TABLE tm1 MODIFY COLUMN e ENUM('a', 'b', 'c');
-ALTER TABLE ti1 MODIFY COLUMN e INT;
-ALTER TABLE tm1 MODIFY COLUMN e INT;
-# This will set both ALTER_COLUMN_ORDER and COLUMN_DEFAULT_VALUE
-ALTER TABLE ti1 MODIFY COLUMN e INT AFTER h;
-ALTER TABLE tm1 MODIFY COLUMN e INT AFTER h;
-ALTER TABLE ti1 MODIFY COLUMN e INT FIRST;
-ALTER TABLE tm1 MODIFY COLUMN e INT FIRST;
-# This will set both ALTER_COLUMN_NOT_NULLABLE and COLUMN_DEFAULT_VALUE
---disable_info
-# NULL -> NOT NULL only allowed INPLACE if strict sql_mode is on.
-SET @orig_sql_mode = @@sql_mode;
-SET @@sql_mode = 'STRICT_TRANS_TABLES';
---enable_info
-ALTER TABLE ti1 MODIFY COLUMN c INT NOT NULL;
---disable_info
-SET @@sql_mode = @orig_sql_mode;
---enable_info
-ALTER TABLE tm1 MODIFY COLUMN c INT NOT NULL;
-# This will set both ALTER_COLUMN_NULLABLE and COLUMN_DEFAULT_VALUE
-ALTER TABLE ti1 MODIFY COLUMN c INT NULL;
-ALTER TABLE tm1 MODIFY COLUMN c INT NULL;
-# This will set both ALTER_COLUMN_EQUAL_PACK_LENGTH and COLUMN_DEFAULT_VALUE
-ALTER TABLE ti1 MODIFY COLUMN h VARCHAR(30);
-ALTER TABLE tm1 MODIFY COLUMN h VARCHAR(30);
-ALTER TABLE ti1 MODIFY COLUMN h VARCHAR(30) AFTER d;
-ALTER TABLE tm1 MODIFY COLUMN h VARCHAR(30) AFTER d;
-
-ALTER TABLE ti1 DROP COLUMN h;
-ALTER TABLE tm1 DROP COLUMN h;
-
-ALTER TABLE ti1 DROP INDEX ii2;
-ALTER TABLE tm1 DROP INDEX im2;
-ALTER TABLE ti1 DROP PRIMARY KEY;
-ALTER TABLE tm1 DROP PRIMARY KEY;
-
-ALTER TABLE ti1 DROP FOREIGN KEY fi1;
-ALTER TABLE tm1 DROP FOREIGN KEY fm1;
-
-ALTER TABLE ti1 RENAME TO ti3;
-ALTER TABLE tm1 RENAME TO tm3;
-ALTER TABLE ti3 RENAME TO ti1;
-ALTER TABLE tm3 RENAME TO tm1;
-
-ALTER TABLE ti1 ORDER BY b;
-ALTER TABLE tm1 ORDER BY b;
-
-ALTER TABLE ti1 CONVERT TO CHARACTER SET utf16;
-ALTER TABLE tm1 CONVERT TO CHARACTER SET utf16;
-ALTER TABLE ti1 DEFAULT CHARACTER SET utf8;
-ALTER TABLE tm1 DEFAULT CHARACTER SET utf8;
-
-ALTER TABLE ti1 FORCE;
-ALTER TABLE tm1 FORCE;
-
-ALTER TABLE ti1 AUTO_INCREMENT 3;
-ALTER TABLE tm1 AUTO_INCREMENT 3;
-ALTER TABLE ti1 AVG_ROW_LENGTH 10;
-ALTER TABLE tm1 AVG_ROW_LENGTH 10;
-ALTER TABLE ti1 CHECKSUM 1;
-ALTER TABLE tm1 CHECKSUM 1;
-ALTER TABLE ti1 COMMENT 'test';
-ALTER TABLE tm1 COMMENT 'test';
-ALTER TABLE ti1 MAX_ROWS 100;
-ALTER TABLE tm1 MAX_ROWS 100;
-ALTER TABLE ti1 MIN_ROWS 1;
-ALTER TABLE tm1 MIN_ROWS 1;
-ALTER TABLE ti1 PACK_KEYS 1;
-ALTER TABLE tm1 PACK_KEYS 1;
-
---disable_info
-DROP TABLE ti1, ti2, tm1, tm2;
-
---echo # Tests of >1 operation (InnoDB)
-
-CREATE TABLE ti1(a INT PRIMARY KEY AUTO_INCREMENT, b INT) engine=InnoDB;
-INSERT INTO ti1(b) VALUES (1), (2);
-
---enable_info
-ALTER TABLE ti1 RENAME TO ti3, ADD INDEX ii1(b);
-
-ALTER TABLE ti3 DROP INDEX ii1, AUTO_INCREMENT 5;
---disable_info
-INSERT INTO ti3(b) VALUES (5);
---enable_info
-ALTER TABLE ti3 ADD INDEX ii1(b), AUTO_INCREMENT 7;
---disable_info
-INSERT INTO ti3(b) VALUES (7);
-SELECT * FROM ti3;
-
-DROP TABLE ti3;
-
---echo #
---echo # 8: Scenario in which ALTER TABLE was returning an unwarranted
---echo # ER_ILLEGAL_HA error at some point during work on this WL.
---echo #
-
-CREATE TABLE tm1(i INT DEFAULT 1) engine=MyISAM;
-ALTER TABLE tm1 ADD INDEX ii1(i), ALTER COLUMN i DROP DEFAULT;
-DROP TABLE tm1;
-
-#
-# MDEV-4435 Server crashes in my_strcasecmp_utf8 on ADD KEY IF NOT EXISTS with implicit name when the key exists.
-#
-create table if not exists t1 (i int);
-alter table t1 add key (i);
-alter table t1 add key if not exists (i);
-DROP TABLE t1;
-
-#
-# MDEV-4436 CHANGE COLUMN IF EXISTS does not work and throws wrong warning.
-#
-create table t1 (a int);
-alter table t1 change column if exists a b bigint;
-show create table t1;
-DROP TABLE t1;
-
-#
-# MDEV-4437 ALTER TABLE .. ADD UNIQUE INDEX IF NOT EXISTS causes syntax error.
-#
-
-create table t1 (i int);
-alter table t1 add unique index if not exists idx(i);
-alter table t1 add unique index if not exists idx(i);
-show create table t1;
-DROP TABLE t1;
-
-#
-# MDEV-8358 ADD PRIMARY KEY IF NOT EXISTS -> ERROR 1068 (42000): Multiple primary key
-#
-
-CREATE TABLE t1 (
- `event_id` bigint(20) unsigned NOT NULL DEFAULT '0',
- `market_id` bigint(20) unsigned NOT NULL DEFAULT '0',
- PRIMARY KEY (`event_id`,`market_id`)
- );
-ALTER TABLE t1 ADD PRIMARY KEY IF NOT EXISTS event_id (event_id,market_id);
-DROP TABLE t1;
-
---echo #
---echo # MDEV-11126 Crash while altering persistent virtual column
---echo #
-
-CREATE TABLE `tab1` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `field2` set('option1','option2','option3','option4') NOT NULL,
- `field3` set('option1','option2','option3','option4','option5') NOT NULL,
- `field4` set('option1','option2','option3','option4') NOT NULL,
- `field5` varchar(32) NOT NULL,
- `field6` varchar(32) NOT NULL,
- `field7` varchar(32) NOT NULL,
- `field8` varchar(32) NOT NULL,
- `field9` int(11) NOT NULL DEFAULT '1',
- `field10` varchar(16) NOT NULL,
- `field11` enum('option1','option2','option3') NOT NULL DEFAULT 'option1',
- `v_col` varchar(128) AS (IF(field11='option1',CONCAT_WS(":","field1",field2,field3,field4,field5,field6,field7,field8,field9,field10), CONCAT_WS(":","field1",field11,field2,field3,field4,field5,field6,field7,field8,field9,field10))) PERSISTENT,
- PRIMARY KEY (`id`)
-) DEFAULT CHARSET=latin1;
-
-ALTER TABLE `tab1` CHANGE COLUMN v_col `v_col` varchar(128);
-SHOW CREATE TABLE `tab1`;
-ALTER TABLE `tab1` CHANGE COLUMN v_col `v_col` varchar(128) AS (IF(field11='option1',CONCAT_WS(":","field1",field2,field3,field4,field5,field6,field7,field8,field9,field10), CONCAT_WS(":","field1",field11,field2,field3,field4,field5,field6,field7,field8,field9,field10))) PERSISTENT;
-SHOW CREATE TABLE `tab1`;
-DROP TABLE `tab1`;
-
---echo #
---echo # MDEV-11548 Reproducible server crash after the 2nd ALTER TABLE ADD FOREIGN KEY IF NOT EXISTS
---echo #
-
-CREATE TABLE t1 (id INT UNSIGNED NOT NULL PRIMARY KEY);
-CREATE TABLE t2 (id1 INT UNSIGNED NOT NULL);
-
-ALTER TABLE t2
-ADD FOREIGN KEY IF NOT EXISTS (id1)
- REFERENCES t1 (id);
-
-ALTER TABLE t2
-ADD FOREIGN KEY IF NOT EXISTS (id1)
-REFERENCES t1 (id);
-
-DROP TABLE t2;
-DROP TABLE t1;
-
-
---echo #
---echo # MDEV-6390 CONVERT TO CHARACTER SET utf8 doesn't change DEFAULT CHARSET.
---echo #
-
-CREATE TABLE t1 (id int(11) NOT NULL, a int(11) NOT NULL, b int(11))
- ENGINE=InnoDB DEFAULT CHARSET=latin1;
-SHOW CREATE TABLE t1;
-ALTER TABLE t1 CONVERT TO CHARACTER SET utf8;
-SHOW CREATE TABLE t1;
-DROP TABLE t1;
-
---echo #
---echo #
---echo # MDEV-15308
---echo # Assertion `ha_alter_info->alter_info->drop_list.elements > 0' failed
---echo # in ha_innodb::prepare_inplace_alter_table
---echo #
-
-CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB;
-ALTER TABLE t1 DROP FOREIGN KEY IF EXISTS fk, DROP COLUMN b;
-SHOW CREATE TABLE t1;
-DROP TABLE t1;
-
-CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB;
-ALTER TABLE t1 DROP INDEX IF EXISTS fk, DROP COLUMN b;
-SHOW CREATE TABLE t1;
-DROP TABLE t1;
-
-CREATE TABLE t1 (a INT, b INT, c INT, KEY(c)) ENGINE=InnoDB;
-ALTER TABLE t1 DROP FOREIGN KEY IF EXISTS fk, DROP COLUMN c;
-SHOW CREATE TABLE t1;
-DROP TABLE t1;
-
-CREATE TABLE t1 (a INT, b INT, c INT, KEY c1(c)) ENGINE=InnoDB;
-ALTER TABLE t1 DROP FOREIGN KEY IF EXISTS fk, DROP INDEX c1;
-SHOW CREATE TABLE t1;
-DROP TABLE t1;
-
-CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB;
-ALTER TABLE t1 DROP INDEX IF EXISTS fk, DROP COLUMN IF EXISTS c;
-SHOW CREATE TABLE t1;
-DROP TABLE t1;
-
---echo #
---echo # MDEV-14668 ADD PRIMARY KEY IF NOT EXISTS on composite key
---echo #
-CREATE TABLE t1 (
- `ID` BIGINT(20) NOT NULL,
- `RANK` MEDIUMINT(4) NOT NULL,
- `CHECK_POINT` BIGINT(20) NOT NULL,
- UNIQUE INDEX `HORIZON_UIDX01` (`ID`, `RANK`)
- ) ENGINE=InnoDB;
-
-ALTER TABLE t1 ADD PRIMARY KEY IF NOT EXISTS (`ID`, `CHECK_POINT`);
-SHOW CREATE TABLE t1;
-ALTER TABLE t1 ADD PRIMARY KEY IF NOT EXISTS (`ID`, `CHECK_POINT`);
-DROP TABLE t1;
diff --git a/mysql-test/r/grant.test b/mysql-test/r/grant.test
deleted file mode 100644
index f2dfb01cc39..00000000000
--- a/mysql-test/r/grant.test
+++ /dev/null
@@ -1,2291 +0,0 @@
-# Test of GRANT commands
-
-# Grant tests not performed with embedded server
--- source include/not_embedded.inc
-
-# Save the initial number of concurrent sessions
---source include/count_sessions.inc
-
-SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
-SET GLOBAL log_bin_trust_function_creators = 1;
-
-# Cleanup
---disable_warnings
-drop table if exists t1;
-drop database if exists mysqltest;
---enable_warnings
-
-connect (master,localhost,root,,);
-connection master;
-SET NAMES binary;
-
-#
-# Test that SSL options works properly
-#
-
-delete from mysql.user where user='mysqltest_1';
-delete from mysql.db where user='mysqltest_1';
-flush privileges;
-grant select on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA";
-show grants for mysqltest_1@localhost;
-grant delete on mysqltest.* to mysqltest_1@localhost;
-query_vertical select * from mysql.user where user="mysqltest_1";
-show grants for mysqltest_1@localhost;
-revoke delete on mysqltest.* from mysqltest_1@localhost;
-show grants for mysqltest_1@localhost;
-grant select on mysqltest.* to mysqltest_1@localhost require NONE;
-show grants for mysqltest_1@localhost;
-grant USAGE on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "testsubject" ISSUER "Monty Program Ab";
-show grants for mysqltest_1@localhost;
-revoke all privileges on mysqltest.* from mysqltest_1@localhost;
-show grants for mysqltest_1@localhost;
-delete from mysql.user where user='mysqltest_1';
-flush privileges;
-
-#
-# Test of GRANTS specifying user limits
-#
-delete from mysql.user where user='mysqltest_1';
-flush privileges;
-grant usage on *.* to mysqltest_1@localhost with max_queries_per_hour 10;
-query_vertical select * from mysql.user where user="mysqltest_1";
-show grants for mysqltest_1@localhost;
-grant usage on *.* to mysqltest_1@localhost with max_updates_per_hour 20 max_connections_per_hour 30;
-query_vertical select * from mysql.user where user="mysqltest_1";
-show grants for mysqltest_1@localhost;
-# This is just to double check that one won't ignore results of selects
-flush privileges;
-show grants for mysqltest_1@localhost;
-delete from mysql.user where user='mysqltest_1';
-flush privileges;
-
-#
-# Test that the new db privileges are stored/retrieved correctly
-#
-
-grant CREATE TEMPORARY TABLES, LOCK TABLES on mysqltest.* to mysqltest_1@localhost;
-show grants for mysqltest_1@localhost;
-flush privileges;
-show grants for mysqltest_1@localhost;
-revoke CREATE TEMPORARY TABLES on mysqltest.* from mysqltest_1@localhost;
-show grants for mysqltest_1@localhost;
-grant ALL PRIVILEGES on mysqltest.* to mysqltest_1@localhost with GRANT OPTION;
-flush privileges;
-show grants for mysqltest_1@localhost;
-revoke LOCK TABLES, ALTER on mysqltest.* from mysqltest_1@localhost;
-show grants for mysqltest_1@localhost;
-revoke all privileges on mysqltest.* from mysqltest_1@localhost;
-delete from mysql.user where user='mysqltest_1';
-flush privileges;
-grant usage on test.* to mysqltest_1@localhost with grant option;
-show grants for mysqltest_1@localhost;
-delete from mysql.user where user='mysqltest_1';
-delete from mysql.db where user='mysqltest_1';
-delete from mysql.tables_priv where user='mysqltest_1';
-delete from mysql.columns_priv where user='mysqltest_1';
-flush privileges;
---error ER_NONEXISTING_GRANT
-show grants for mysqltest_1@localhost;
-
-#
-# Test what happens when you have same table and colum level grants
-#
-
-create table t1 (a int);
-GRANT select,update,insert on t1 to mysqltest_1@localhost;
-GRANT select (a), update (a),insert(a), references(a) on t1 to mysqltest_1@localhost;
-show grants for mysqltest_1@localhost;
-select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1";
-REVOKE select (a), update on t1 from mysqltest_1@localhost;
-show grants for mysqltest_1@localhost;
-REVOKE select,update,insert,insert (a) on t1 from mysqltest_1@localhost;
-show grants for mysqltest_1@localhost;
-GRANT select,references on t1 to mysqltest_1@localhost;
-select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1";
-grant all on test.* to mysqltest_3@localhost with grant option;
-revoke all on test.* from mysqltest_3@localhost;
-show grants for mysqltest_3@localhost;
-revoke grant option on test.* from mysqltest_3@localhost;
-show grants for mysqltest_3@localhost;
-grant all on test.t1 to mysqltest_2@localhost with grant option;
-revoke all on test.t1 from mysqltest_2@localhost;
-show grants for mysqltest_2@localhost;
-revoke grant option on test.t1 from mysqltest_2@localhost;
-show grants for mysqltest_2@localhost;
-delete from mysql.user where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3";
-delete from mysql.db where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3";
-delete from mysql.tables_priv where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3";
-delete from mysql.columns_priv where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3";
-flush privileges;
-drop table t1;
-
-#
-# Test some error conditions
-#
---error ER_WRONG_USAGE
-GRANT FILE on mysqltest.* to mysqltest_1@localhost;
-select 1; # To test that the previous command didn't cause problems
-
-#
-# Bug#4898 User privileges depending on ORDER BY Settings of table db
-#
-insert into mysql.user (host, user) values ('localhost', 'test11');
-insert into mysql.db (host, db, user, select_priv) values
-('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y');
-alter table mysql.db order by db asc;
-flush privileges;
-show grants for test11@localhost;
-alter table mysql.db order by db desc;
-flush privileges;
-show grants for test11@localhost;
-delete from mysql.user where user='test11';
-delete from mysql.db where user='test11';
-
-#
-# Bug#6123 GRANT USAGE inserts useless Db row
-#
-create database mysqltest1;
-grant usage on mysqltest1.* to test6123 identified by 'magic123';
-select host,db,user,select_priv,insert_priv from mysql.db where db="mysqltest1";
-delete from mysql.user where user='test6123';
-drop database mysqltest1;
-
-#
-# Test for 'drop user', 'revoke privileges, grant'
-#
-
-create table t1 (a int);
-grant ALL PRIVILEGES on *.* to drop_user2@localhost with GRANT OPTION;
-show grants for drop_user2@localhost;
-revoke all privileges, grant option from drop_user2@localhost;
-drop user drop_user2@localhost;
-
-grant ALL PRIVILEGES on *.* to drop_user@localhost with GRANT OPTION;
-grant ALL PRIVILEGES on test.* to drop_user@localhost with GRANT OPTION;
-grant select(a) on test.t1 to drop_user@localhost;
-show grants for drop_user@localhost;
-
-#
-# Bug#3086 SHOW GRANTS doesn't follow ANSI_QUOTES
-#
-set sql_mode=ansi_quotes;
-show grants for drop_user@localhost;
-set sql_mode=default;
-
-set sql_quote_show_create=0;
-show grants for drop_user@localhost;
-set sql_mode="ansi_quotes";
-show grants for drop_user@localhost;
-set sql_quote_show_create=1;
-show grants for drop_user@localhost;
-set sql_mode="";
-show grants for drop_user@localhost;
-
-revoke all privileges, grant option from drop_user@localhost;
-show grants for drop_user@localhost;
-drop user drop_user@localhost;
---error ER_REVOKE_GRANTS
-revoke all privileges, grant option from drop_user@localhost;
-
-grant select(a) on test.t1 to drop_user1@localhost;
-grant select on test.t1 to drop_user2@localhost;
-grant select on test.* to drop_user3@localhost;
-grant select on *.* to drop_user4@localhost;
-# Drop user now implicitly revokes all privileges.
-drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost,
-drop_user4@localhost;
---error ER_REVOKE_GRANTS
-revoke all privileges, grant option from drop_user1@localhost, drop_user2@localhost,
-drop_user3@localhost, drop_user4@localhost;
---error ER_CANNOT_USER
-drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost,
-drop_user4@localhost;
-drop table t1;
-grant usage on *.* to mysqltest_1@localhost identified by "password";
-grant select, update, insert on test.* to mysqltest_1@localhost;
-show grants for mysqltest_1@localhost;
-drop user mysqltest_1@localhost;
-
-#
-# Bug#3403 Wrong encoding in SHOW GRANTS output
-#
-SET NAMES koi8r;
-CREATE DATABASE ��;
-USE ��;
-CREATE TABLE ��� (��� INT);
-
-GRANT SELECT ON ��.* TO ����@localhost;
-SHOW GRANTS FOR ����@localhost;
-REVOKE SELECT ON ��.* FROM ����@localhost;
-
-GRANT SELECT ON ��.��� TO ����@localhost;
-SHOW GRANTS FOR ����@localhost;
-REVOKE SELECT ON ��.��� FROM ����@localhost;
-
-GRANT SELECT (���) ON ��.��� TO ����@localhost;
-SHOW GRANTS FOR ����@localhost;
-REVOKE SELECT (���) ON ��.��� FROM ����@localhost;
-
-# Revoke does not drop user. Leave a clean user table for the next tests.
-DROP USER ����@localhost;
-
-DROP DATABASE ��;
-SET NAMES latin1;
-
-#
-# Bug#5831 REVOKE ALL PRIVILEGES, GRANT OPTION does not revoke everything
-#
-USE test;
-CREATE TABLE t1 (a int );
-CREATE TABLE t2 LIKE t1;
-CREATE TABLE t3 LIKE t1;
-CREATE TABLE t4 LIKE t1;
-CREATE TABLE t5 LIKE t1;
-CREATE TABLE t6 LIKE t1;
-CREATE TABLE t7 LIKE t1;
-CREATE TABLE t8 LIKE t1;
-CREATE TABLE t9 LIKE t1;
-CREATE TABLE t10 LIKE t1;
-CREATE DATABASE testdb1;
-CREATE DATABASE testdb2;
-CREATE DATABASE testdb3;
-CREATE DATABASE testdb4;
-CREATE DATABASE testdb5;
-CREATE DATABASE testdb6;
-CREATE DATABASE testdb7;
-CREATE DATABASE testdb8;
-CREATE DATABASE testdb9;
-CREATE DATABASE testdb10;
-GRANT ALL ON testdb1.* TO testuser@localhost;
-GRANT ALL ON testdb2.* TO testuser@localhost;
-GRANT ALL ON testdb3.* TO testuser@localhost;
-GRANT ALL ON testdb4.* TO testuser@localhost;
-GRANT ALL ON testdb5.* TO testuser@localhost;
-GRANT ALL ON testdb6.* TO testuser@localhost;
-GRANT ALL ON testdb7.* TO testuser@localhost;
-GRANT ALL ON testdb8.* TO testuser@localhost;
-GRANT ALL ON testdb9.* TO testuser@localhost;
-GRANT ALL ON testdb10.* TO testuser@localhost;
-GRANT SELECT ON test.t1 TO testuser@localhost;
-GRANT SELECT ON test.t2 TO testuser@localhost;
-GRANT SELECT ON test.t3 TO testuser@localhost;
-GRANT SELECT ON test.t4 TO testuser@localhost;
-GRANT SELECT ON test.t5 TO testuser@localhost;
-GRANT SELECT ON test.t6 TO testuser@localhost;
-GRANT SELECT ON test.t7 TO testuser@localhost;
-GRANT SELECT ON test.t8 TO testuser@localhost;
-GRANT SELECT ON test.t9 TO testuser@localhost;
-GRANT SELECT ON test.t10 TO testuser@localhost;
-GRANT SELECT (a) ON test.t1 TO testuser@localhost;
-GRANT SELECT (a) ON test.t2 TO testuser@localhost;
-GRANT SELECT (a) ON test.t3 TO testuser@localhost;
-GRANT SELECT (a) ON test.t4 TO testuser@localhost;
-GRANT SELECT (a) ON test.t5 TO testuser@localhost;
-GRANT SELECT (a) ON test.t6 TO testuser@localhost;
-GRANT SELECT (a) ON test.t7 TO testuser@localhost;
-GRANT SELECT (a) ON test.t8 TO testuser@localhost;
-GRANT SELECT (a) ON test.t9 TO testuser@localhost;
-GRANT SELECT (a) ON test.t10 TO testuser@localhost;
-REVOKE ALL PRIVILEGES, GRANT OPTION FROM testuser@localhost;
-SHOW GRANTS FOR testuser@localhost;
-DROP USER testuser@localhost;
-DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
-DROP DATABASE testdb1;
-DROP DATABASE testdb2;
-DROP DATABASE testdb3;
-DROP DATABASE testdb4;
-DROP DATABASE testdb5;
-DROP DATABASE testdb6;
-DROP DATABASE testdb7;
-DROP DATABASE testdb8;
-DROP DATABASE testdb9;
-DROP DATABASE testdb10;
-
-#
-# Bug#6932 a problem with 'revoke ALL PRIVILEGES'
-#
-
-create table t1(a int, b int, c int, d int);
-grant insert(b), insert(c), insert(d), insert(a) on t1 to grant_user@localhost;
-show grants for grant_user@localhost;
-select Host,Db,User,Table_name,Column_name,Column_priv from mysql.columns_priv order by Column_name;
-revoke ALL PRIVILEGES on t1 from grant_user@localhost;
-show grants for grant_user@localhost;
-select Host,Db,User,Table_name,Column_name,Column_priv from mysql.columns_priv;
-drop user grant_user@localhost;
-drop table t1;
-
-#
-# Bug#7391 Cross-database multi-table UPDATE security problem
-#
-create database mysqltest_1;
-create database mysqltest_2;
-create table mysqltest_1.t1 select 1 a, 2 q;
-create table mysqltest_1.t2 select 1 b, 2 r;
-create table mysqltest_2.t1 select 1 c, 2 s;
-create table mysqltest_2.t2 select 1 d, 2 t;
-
-# test the column privileges
-grant update (a) on mysqltest_1.t1 to mysqltest_3@localhost;
-grant select (b) on mysqltest_1.t2 to mysqltest_3@localhost;
-grant select (c) on mysqltest_2.t1 to mysqltest_3@localhost;
-grant update (d) on mysqltest_2.t2 to mysqltest_3@localhost;
-connect (conn1,localhost,mysqltest_3,,);
-connection conn1;
-SELECT * FROM INFORMATION_SCHEMA.COLUMN_PRIVILEGES
- WHERE GRANTEE = '''mysqltest_3''@''localhost'''
- ORDER BY TABLE_NAME,COLUMN_NAME,PRIVILEGE_TYPE;
-SELECT * FROM INFORMATION_SCHEMA.TABLE_PRIVILEGES
- WHERE GRANTEE = '''mysqltest_3''@''localhost'''
- ORDER BY TABLE_NAME,PRIVILEGE_TYPE;
-SELECT * from INFORMATION_SCHEMA.SCHEMA_PRIVILEGES
- WHERE GRANTEE = '''mysqltest_3''@''localhost'''
- ORDER BY TABLE_SCHEMA,PRIVILEGE_TYPE;
-SELECT * from INFORMATION_SCHEMA.USER_PRIVILEGES
- WHERE GRANTEE = '''mysqltest_3''@''localhost'''
- ORDER BY TABLE_CATALOG,PRIVILEGE_TYPE;
---error ER_COLUMNACCESS_DENIED_ERROR
-update mysqltest_1.t1, mysqltest_1.t2 set q=10 where b=1;
---error ER_COLUMNACCESS_DENIED_ERROR
-update mysqltest_1.t2, mysqltest_2.t2 set d=20 where d=1;
---error ER_TABLEACCESS_DENIED_ERROR
-update mysqltest_1.t1, mysqltest_2.t2 set d=20 where d=1;
---error ER_TABLEACCESS_DENIED_ERROR
-update mysqltest_2.t1, mysqltest_1.t2 set c=20 where b=1;
---error ER_COLUMNACCESS_DENIED_ERROR
-update mysqltest_2.t1, mysqltest_2.t2 set d=10 where s=2;
-# the following two should work
-update mysqltest_1.t1, mysqltest_2.t2 set a=10,d=10;
-update mysqltest_1.t1, mysqltest_2.t1 set a=20 where c=20;
-connection master;
-select t1.*,t2.* from mysqltest_1.t1,mysqltest_1.t2;
-select t1.*,t2.* from mysqltest_2.t1,mysqltest_2.t2;
-revoke all on mysqltest_1.t1 from mysqltest_3@localhost;
-revoke all on mysqltest_1.t2 from mysqltest_3@localhost;
-revoke all on mysqltest_2.t1 from mysqltest_3@localhost;
-revoke all on mysqltest_2.t2 from mysqltest_3@localhost;
-
-# test the db/table level privileges
-grant all on mysqltest_2.* to mysqltest_3@localhost;
-grant select on *.* to mysqltest_3@localhost;
-# Next grant is needed to trigger bug#7391. Do not optimize!
-grant select on mysqltest_2.t1 to mysqltest_3@localhost;
-flush privileges;
-disconnect conn1;
-connect (conn2,localhost,mysqltest_3,,);
-connection conn2;
-use mysqltest_1;
-update mysqltest_2.t1, mysqltest_2.t2 set c=500,d=600;
-# the following failed before, should fail now.
---error ER_TABLEACCESS_DENIED_ERROR
-update mysqltest_1.t1, mysqltest_1.t2 set a=100,b=200;
-use mysqltest_2;
-# the following used to succeed, it must fail now.
---error ER_TABLEACCESS_DENIED_ERROR
-update mysqltest_1.t1, mysqltest_1.t2 set a=100,b=200;
---error ER_TABLEACCESS_DENIED_ERROR
-update mysqltest_2.t1, mysqltest_1.t2 set c=100,b=200;
---error ER_TABLEACCESS_DENIED_ERROR
-update mysqltest_1.t1, mysqltest_2.t2 set a=100,d=200;
-# lets see the result
-connection master;
-select t1.*,t2.* from mysqltest_1.t1,mysqltest_1.t2;
-select t1.*,t2.* from mysqltest_2.t1,mysqltest_2.t2;
-
-delete from mysql.user where user='mysqltest_3';
-delete from mysql.db where user="mysqltest_3";
-delete from mysql.tables_priv where user="mysqltest_3";
-delete from mysql.columns_priv where user="mysqltest_3";
-flush privileges;
-drop database mysqltest_1;
-drop database mysqltest_2;
-disconnect conn2;
-
-#
-# just SHOW PRIVILEGES test
-#
-SHOW PRIVILEGES;
-
-#
-# Rights for renaming test (Bug#3270)
-#
-connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
-connection root;
---disable_warnings
-create database mysqltest;
---enable_warnings
-create table mysqltest.t1 (a int,b int,c int);
-grant all on mysqltest.t1 to mysqltest_1@localhost;
-connect (user1,localhost,mysqltest_1,,mysqltest,$MASTER_MYPORT,$MASTER_MYSOCK);
-connection user1;
--- error ER_TABLEACCESS_DENIED_ERROR
-alter table t1 rename t2;
-disconnect user1;
-connection root;
-revoke all privileges on mysqltest.t1 from mysqltest_1@localhost;
-delete from mysql.user where user=_binary'mysqltest_1';
-drop database mysqltest;
-connection default;
-disconnect root;
-
-#
-# check all new table privileges
-#
-CREATE USER dummy@localhost;
-CREATE DATABASE mysqltest;
-CREATE TABLE mysqltest.dummytable (dummyfield INT);
-CREATE VIEW mysqltest.dummyview AS SELECT dummyfield FROM mysqltest.dummytable;
-GRANT ALL PRIVILEGES ON mysqltest.dummytable TO dummy@localhost;
-GRANT ALL PRIVILEGES ON mysqltest.dummyview TO dummy@localhost;
-SHOW GRANTS FOR dummy@localhost;
-use INFORMATION_SCHEMA;
-SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY
-PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE
-= '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME;
-FLUSH PRIVILEGES;
-SHOW GRANTS FOR dummy@localhost;
-SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY
-PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE
-= '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME;
-SHOW FIELDS FROM mysql.tables_priv;
-use test;
-REVOKE ALL PRIVILEGES, GRANT OPTION FROM dummy@localhost;
-DROP USER dummy@localhost;
-DROP DATABASE mysqltest;
-# check view only privileges
-CREATE USER dummy@localhost;
-CREATE DATABASE mysqltest;
-CREATE TABLE mysqltest.dummytable (dummyfield INT);
-CREATE VIEW mysqltest.dummyview AS SELECT dummyfield FROM mysqltest.dummytable;
-GRANT CREATE VIEW ON mysqltest.dummytable TO dummy@localhost;
-GRANT CREATE VIEW ON mysqltest.dummyview TO dummy@localhost;
-SHOW GRANTS FOR dummy@localhost;
-use INFORMATION_SCHEMA;
-SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY
-PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE
-= '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME;
-FLUSH PRIVILEGES;
-SHOW GRANTS FOR dummy@localhost;
-SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY
-PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE
-= '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME;
-use test;
-REVOKE ALL PRIVILEGES, GRANT OPTION FROM dummy@localhost;
-DROP USER dummy@localhost;
-DROP DATABASE mysqltest;
-CREATE USER dummy@localhost;
-CREATE DATABASE mysqltest;
-CREATE TABLE mysqltest.dummytable (dummyfield INT);
-CREATE VIEW mysqltest.dummyview AS SELECT dummyfield FROM mysqltest.dummytable;
-GRANT SHOW VIEW ON mysqltest.dummytable TO dummy@localhost;
-GRANT SHOW VIEW ON mysqltest.dummyview TO dummy@localhost;
-SHOW GRANTS FOR dummy@localhost;
-use INFORMATION_SCHEMA;
-SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY
-PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE
-= '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME;
-FLUSH PRIVILEGES;
-SHOW GRANTS FOR dummy@localhost;
-SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY
-PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE
-= '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME;
-use test;
-REVOKE ALL PRIVILEGES, GRANT OPTION FROM dummy@localhost;
-DROP USER dummy@localhost;
-DROP DATABASE mysqltest;
-#
-# Bug#11330 Entry in tables_priv with host = '' causes crash
-#
-connection default;
-use mysql;
-insert into tables_priv values ('','test_db','mysqltest_1','test_table','test_grantor',CURRENT_TIMESTAMP,'Select','Select');
-flush privileges;
-delete from tables_priv where host = '' and user = 'mysqltest_1';
-flush privileges;
-use test;
-
-#
-# Bug#10892 user variables not auto cast for comparisons
-# Check that we don't get illegal mix of collations
-#
-set @user123="non-existent";
-select * from mysql.db where user=@user123;
-
-set names koi8r;
-create database ��;
-grant select on ��.* to root@localhost;
-select hex(Db) from mysql.db where Db='��';
-show grants for root@localhost;
-flush privileges;
-show grants for root@localhost;
-drop database ��;
-revoke all privileges on ��.* from root@localhost;
-show grants for root@localhost;
-set names latin1;
-
-#
-# Bug#15598 Server crashes in specific case during setting new password
-# - Caused by a user with host ''
-#
-create user mysqltest_7@;
-set password for mysqltest_7@ = password('systpass');
-show grants for mysqltest_7@;
-drop user mysqltest_7@;
---error ER_NONEXISTING_GRANT
-show grants for mysqltest_7@;
-
-#
-# Bug#14385 GRANT and mapping to correct user account problems
-#
-create database mysqltest;
-use mysqltest;
-create table t1(f1 int);
-GRANT DELETE ON mysqltest.t1 TO mysqltest1@'%';
-GRANT SELECT ON mysqltest.t1 TO mysqltest1@'192.%';
-show grants for mysqltest1@'192.%';
-show grants for mysqltest1@'%';
-delete from mysql.user where user='mysqltest1';
-delete from mysql.db where user='mysqltest1';
-delete from mysql.tables_priv where user='mysqltest1';
-flush privileges;
-drop database mysqltest;
-
-#
-# Bug#27515 DROP previlege is not required for RENAME TABLE
-#
-connection master;
-create database db27515;
-use db27515;
-create table t1 (a int);
-grant alter on db27515.t1 to user27515@localhost;
-grant insert, create on db27515.t2 to user27515@localhost;
-
-connect (conn27515, localhost, user27515, , db27515);
-connection conn27515;
---error ER_TABLEACCESS_DENIED_ERROR
-rename table t1 to t2;
-disconnect conn27515;
-
-connection master;
-revoke all privileges, grant option from user27515@localhost;
-drop user user27515@localhost;
-drop database db27515;
-
---echo End of 4.1 tests
-
-#
-# Bug#16297 In memory grant tables not flushed when users's hostname is ""
-#
-use test;
-create table t1 (a int);
-
-# Backup anonymous users and remove them. (They get in the way of
-# the one we test with here otherwise.)
-create table t2 as select * from mysql.user where user='';
-delete from mysql.user where user='';
-flush privileges;
-
-# Create some users with different hostnames
-create user mysqltest_8@'';
-create user mysqltest_8@host8;
-
-# Try to create them again
---error ER_CANNOT_USER
-create user mysqltest_8@'';
---error ER_CANNOT_USER
-create user mysqltest_8;
---error ER_CANNOT_USER
-create user mysqltest_8@host8;
-
-select user, QUOTE(host) from mysql.user where user="mysqltest_8";
-
---echo Schema privileges
-grant select on mysqltest.* to mysqltest_8@'';
-show grants for mysqltest_8@'';
-grant select on mysqltest.* to mysqltest_8@;
-show grants for mysqltest_8@;
-grant select on mysqltest.* to mysqltest_8;
-show grants for mysqltest_8;
-select * from information_schema.schema_privileges
-where grantee like "'mysqltest_8'%";
-connect (conn3,localhost,mysqltest_8,,);
-select * from t1;
-disconnect conn3;
-connection master;
-revoke select on mysqltest.* from mysqltest_8@'';
-show grants for mysqltest_8@'';
-show grants for mysqltest_8;
-select * from information_schema.schema_privileges
-where grantee like "'mysqltest_8'%";
-flush privileges;
-show grants for mysqltest_8@'';
-show grants for mysqltest_8@;
-grant select on mysqltest.* to mysqltest_8@'';
-flush privileges;
-show grants for mysqltest_8@;
-revoke select on mysqltest.* from mysqltest_8@'';
-flush privileges;
-
---echo Column privileges
-grant update (a) on t1 to mysqltest_8@'';
-grant update (a) on t1 to mysqltest_8;
-show grants for mysqltest_8@'';
-show grants for mysqltest_8;
-flush privileges;
-show grants for mysqltest_8@'';
-show grants for mysqltest_8;
-select * from information_schema.column_privileges;
-connect (conn4,localhost,mysqltest_8,,);
-select * from t1;
-disconnect conn4;
-connection master;
-revoke update (a) on t1 from mysqltest_8@'';
-show grants for mysqltest_8@'';
-show grants for mysqltest_8;
-select * from information_schema.column_privileges;
-flush privileges;
-show grants for mysqltest_8@'';
-show grants for mysqltest_8;
-
---echo Table privileges
-grant update on t1 to mysqltest_8@'';
-grant update on t1 to mysqltest_8;
-show grants for mysqltest_8@'';
-show grants for mysqltest_8;
-flush privileges;
-show grants for mysqltest_8@'';
-show grants for mysqltest_8;
-select * from information_schema.table_privileges;
-connect (conn5,localhost,mysqltest_8,,);
-select * from t1;
-disconnect conn5;
-connection master;
-revoke update on t1 from mysqltest_8@'';
-show grants for mysqltest_8@'';
-show grants for mysqltest_8;
-select * from information_schema.table_privileges;
-flush privileges;
-show grants for mysqltest_8@'';
-show grants for mysqltest_8;
-
---echo "DROP USER" should clear privileges
-grant all privileges on mysqltest.* to mysqltest_8@'';
-grant select on mysqltest.* to mysqltest_8@'';
-grant update on t1 to mysqltest_8@'';
-grant update (a) on t1 to mysqltest_8@'';
-grant all privileges on mysqltest.* to mysqltest_8;
-show grants for mysqltest_8@'';
-show grants for mysqltest_8;
-select * from information_schema.user_privileges
-where grantee like "'mysqltest_8'%";
-connect (conn5,localhost,mysqltest_8,,);
-select * from t1;
-disconnect conn5;
-connection master;
-flush privileges;
-show grants for mysqltest_8@'';
-show grants for mysqltest_8;
-drop user mysqltest_8@'';
---error ER_NONEXISTING_GRANT
-show grants for mysqltest_8@'';
---replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
---error ER_ACCESS_DENIED_ERROR
-connect (conn6,localhost,mysqltest_8,,);
-connection master;
---error ER_NONEXISTING_GRANT
-show grants for mysqltest_8;
-drop user mysqltest_8@host8;
---error ER_NONEXISTING_GRANT
-show grants for mysqltest_8@host8;
-
-# Restore the anonymous users.
-insert into mysql.user select * from t2;
-flush privileges;
-drop table t2;
-drop table t1;
-
-#
-# Bug#20214 Incorrect error when user calls SHOW CREATE VIEW on non
-# privileged view
-#
-
-connection master;
-
-CREATE DATABASE mysqltest3;
-USE mysqltest3;
-
-CREATE TABLE t_nn (c1 INT);
-CREATE VIEW v_nn AS SELECT * FROM t_nn;
-
-CREATE DATABASE mysqltest2;
-USE mysqltest2;
-
-CREATE TABLE t_nn (c1 INT);
-CREATE VIEW v_nn AS SELECT * FROM t_nn;
-CREATE VIEW v_yn AS SELECT * FROM t_nn;
-CREATE VIEW v_gy AS SELECT * FROM t_nn;
-CREATE VIEW v_ny AS SELECT * FROM t_nn;
-CREATE VIEW v_yy AS SELECT * FROM t_nn WHERE c1=55;
-
-GRANT SHOW VIEW ON mysqltest2.v_ny TO 'mysqltest_1'@'localhost' IDENTIFIED BY 'mysqltest_1';
-GRANT SELECT ON mysqltest2.v_yn TO 'mysqltest_1'@'localhost' IDENTIFIED BY 'mysqltest_1';
-GRANT SELECT ON mysqltest2.* TO 'mysqltest_1'@'localhost' IDENTIFIED BY 'mysqltest_1';
-GRANT SHOW VIEW,SELECT ON mysqltest2.v_yy TO 'mysqltest_1'@'localhost' IDENTIFIED BY 'mysqltest_1';
-
-connect (mysqltest_1, localhost, mysqltest_1, mysqltest_1,);
-
-# fail because of missing SHOW VIEW (have generic SELECT)
---error ER_TABLEACCESS_DENIED_ERROR
-SHOW CREATE VIEW mysqltest2.v_nn;
---error ER_TABLEACCESS_DENIED_ERROR
-SHOW CREATE TABLE mysqltest2.v_nn;
-
-# fail because of missing SHOW VIEW
---error ER_TABLEACCESS_DENIED_ERROR
-SHOW CREATE VIEW mysqltest2.v_yn;
---error ER_TABLEACCESS_DENIED_ERROR
-SHOW CREATE TABLE mysqltest2.v_yn;
-
-# succeed (despite of missing SELECT, having SHOW VIEW bails us out)
-SHOW CREATE TABLE mysqltest2.v_ny;
-
-# succeed (despite of missing SELECT, having SHOW VIEW bails us out)
-SHOW CREATE VIEW mysqltest2.v_ny;
-
-# fail because of missing (specific or generic) SELECT
---error ER_TABLEACCESS_DENIED_ERROR
-SHOW CREATE TABLE mysqltest3.t_nn;
-
-# fail because of missing (specific or generic) SELECT (not because it's not a view!)
---error ER_TABLEACCESS_DENIED_ERROR
-SHOW CREATE VIEW mysqltest3.t_nn;
-
-# fail because of missing missing (specific or generic) SELECT (and SHOW VIEW)
---error ER_TABLEACCESS_DENIED_ERROR
-SHOW CREATE VIEW mysqltest3.v_nn;
---error ER_TABLEACCESS_DENIED_ERROR
-SHOW CREATE TABLE mysqltest3.v_nn;
-
-# succeed thanks to generic SELECT
-SHOW CREATE TABLE mysqltest2.t_nn;
-
-# fail because it's not a view! (have generic SELECT though)
---error ER_WRONG_OBJECT
-SHOW CREATE VIEW mysqltest2.t_nn;
-
-# succeed, have SELECT and SHOW VIEW
-SHOW CREATE VIEW mysqltest2.v_yy;
-
-# succeed, have SELECT and SHOW VIEW
-SHOW CREATE TABLE mysqltest2.v_yy;
-
-# clean-up
-connection master;
-
-# succeed, we're root
-SHOW CREATE TABLE mysqltest2.v_nn;
-SHOW CREATE VIEW mysqltest2.v_nn;
-
-SHOW CREATE TABLE mysqltest2.t_nn;
-
-# fail because it's not a view!
---error ER_WRONG_OBJECT
-SHOW CREATE VIEW mysqltest2.t_nn;
-
-DROP VIEW mysqltest2.v_nn;
-DROP VIEW mysqltest2.v_yn;
-DROP VIEW mysqltest2.v_ny;
-DROP VIEW mysqltest2.v_yy;
-DROP TABLE mysqltest2.t_nn;
-DROP DATABASE mysqltest2;
-DROP VIEW mysqltest3.v_nn;
-DROP TABLE mysqltest3.t_nn;
-DROP DATABASE mysqltest3;
-disconnect mysqltest_1;
-REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'mysqltest_1'@'localhost';
-DROP USER 'mysqltest_1'@'localhost';
-
-# restore the original database
-USE test;
-connection default;
-disconnect master;
-
-
-#
-# Bug#10668 CREATE USER does not enforce username length limit
-#
---error ER_WRONG_STRING_LENGTH
-create user longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789;
-
-#
-# Test for Bug#16899 Possible buffer overflow in handling of DEFINER-clause.
-#
-# These checks are intended to ensure that appropriate errors are risen when
-# illegal user name or hostname is specified in user-clause of GRANT/REVOKE
-# statements.
-#
-
-#
-# Bug#22369 Alter table rename combined with other alterations causes lost tables
-#
-CREATE DATABASE mysqltest1;
-CREATE TABLE mysqltest1.t1 (
- int_field INTEGER UNSIGNED NOT NULL,
- char_field CHAR(10),
- INDEX(`int_field`)
-);
-CREATE TABLE mysqltest1.t2 (int_field INT);
-
---echo "Now check that we require equivalent grants for "
---echo "RENAME TABLE and ALTER TABLE"
-CREATE USER mysqltest_1@localhost;
-GRANT SELECT ON mysqltest1.t1 TO mysqltest_1@localhost;
-
-connect (conn42,localhost,mysqltest_1,,mysqltest1);
-SELECT USER();
-SHOW GRANTS;
---error ER_TABLEACCESS_DENIED_ERROR
-RENAME TABLE t1 TO t2;
---error ER_TABLEACCESS_DENIED_ERROR
-ALTER TABLE t1 RENAME TO t2;
---disconnect conn42
---connection default
-GRANT DROP ON mysqltest1.t1 TO mysqltest_1@localhost;
-
-connect (conn42,localhost,mysqltest_1,,mysqltest1);
---error ER_TABLEACCESS_DENIED_ERROR
-RENAME TABLE t1 TO t2;
---error ER_TABLEACCESS_DENIED_ERROR
-ALTER TABLE t1 RENAME TO t2;
---disconnect conn42
---connection default
-GRANT ALTER ON mysqltest1.t1 TO mysqltest_1@localhost;
-
-connect (conn42,localhost,mysqltest_1,,mysqltest1);
-SHOW GRANTS;
---error ER_TABLEACCESS_DENIED_ERROR
-RENAME TABLE t1 TO t2;
---error ER_TABLEACCESS_DENIED_ERROR
-ALTER TABLE t1 RENAME TO t2;
---disconnect conn42
---connection default
-GRANT INSERT, CREATE ON mysqltest1.t1 TO mysqltest_1@localhost;
-connect (conn42,localhost,mysqltest_1,,mysqltest1);
-SHOW GRANTS;
---error ER_TABLEACCESS_DENIED_ERROR
---disconnect conn42
---connection default
-GRANT INSERT, SELECT, CREATE, ALTER, DROP ON mysqltest1.t2 TO mysqltest_1@localhost;
-DROP TABLE mysqltest1.t2;
-
-connect (conn42,localhost,mysqltest_1,,mysqltest1);
-SHOW GRANTS;
-RENAME TABLE t1 TO t2;
-RENAME TABLE t2 TO t1;
-ALTER TABLE t1 RENAME TO t2;
-ALTER TABLE t2 RENAME TO t1;
---disconnect conn42
---connection default
-REVOKE DROP, INSERT ON mysqltest1.t1 FROM mysqltest_1@localhost;
-REVOKE DROP, INSERT ON mysqltest1.t2 FROM mysqltest_1@localhost;
-
-connect (conn42,localhost,mysqltest_1,,mysqltest1);
-SHOW GRANTS;
---error ER_TABLEACCESS_DENIED_ERROR
-RENAME TABLE t1 TO t2;
---error ER_TABLEACCESS_DENIED_ERROR
-ALTER TABLE t1 RENAME TO t2;
---disconnect conn42
---connection default
-
-DROP USER mysqltest_1@localhost;
-DROP DATABASE mysqltest1;
-USE test;
-
-# Working with database-level privileges.
-
---error ER_WRONG_STRING_LENGTH
-GRANT CREATE ON mysqltest.* TO longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost;
-
---error ER_WRONG_STRING_LENGTH
-GRANT CREATE ON mysqltest.* TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY;
-
---error ER_WRONG_STRING_LENGTH
-REVOKE CREATE ON mysqltest.* FROM longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost;
-
---error ER_WRONG_STRING_LENGTH
-REVOKE CREATE ON mysqltest.* FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY;
-
-# Working with table-level privileges.
-
---error ER_WRONG_STRING_LENGTH
-GRANT CREATE ON t1 TO longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost;
-
---error ER_WRONG_STRING_LENGTH
-GRANT CREATE ON t1 TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY;
-
---error ER_WRONG_STRING_LENGTH
-REVOKE CREATE ON t1 FROM longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost;
-
---error ER_WRONG_STRING_LENGTH
-REVOKE CREATE ON t1 FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY;
-
-# Working with routine-level privileges.
-
---error ER_WRONG_STRING_LENGTH
-GRANT EXECUTE ON PROCEDURE p1 TO longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost;
-
---error ER_WRONG_STRING_LENGTH
-GRANT EXECUTE ON PROCEDURE p1 TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY;
-
---error ER_WRONG_STRING_LENGTH
-REVOKE EXECUTE ON PROCEDURE p1 FROM longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost;
-
---error ER_WRONG_STRING_LENGTH
-REVOKE EXECUTE ON PROCEDURE t1 FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY;
-
-
-#
-# Bug#23556 TRUNCATE TABLE still maps to DELETE
-#
-CREATE USER bug23556@localhost;
-CREATE DATABASE bug23556;
-GRANT SELECT ON bug23556.* TO bug23556@localhost;
-connect (bug23556,localhost,bug23556,,bug23556);
-
-connection default;
-USE bug23556;
-CREATE TABLE t1 (a INT PRIMARY KEY); INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
-GRANT DELETE ON t1 TO bug23556@localhost;
-
-connection bug23556;
-USE bug23556;
---error ER_TABLEACCESS_DENIED_ERROR
-TRUNCATE t1;
-
-connection default;
-USE bug23556;
-REVOKE DELETE ON t1 FROM bug23556@localhost;
-GRANT DROP ON t1 TO bug23556@localhost;
-
-connection bug23556;
-USE bug23556;
-TRUNCATE t1;
-
-connection default;
-USE bug23556;
-DROP TABLE t1;
-USE test;
-DROP DATABASE bug23556;
-DROP USER bug23556@localhost;
-connection default;
-disconnect bug23556;
-
-
-#
-# Bug#6774 Replication fails with Wrong usage of DB GRANT and GLOBAL PRIVILEGES
-#
-# Check if GRANT ... ON * ... fails when no database is selected
-connect (con1, localhost, root,,*NO-ONE*);
-connection con1;
---error ER_NO_DB_ERROR
-GRANT PROCESS ON * TO user@localhost;
-disconnect con1;
-connection default;
-
-
-#
-# Bug#9504 Stored procedures: execute privilege doesn't make 'use database'
-# okay.
-#
-
-# Prepare.
-
---disable_warnings
-DROP DATABASE IF EXISTS mysqltest1;
-DROP DATABASE IF EXISTS mysqltest2;
-DROP DATABASE IF EXISTS mysqltest3;
-DROP DATABASE IF EXISTS mysqltest4;
---enable_warnings
-
-CREATE DATABASE mysqltest1;
-CREATE DATABASE mysqltest2;
-CREATE DATABASE mysqltest3;
-CREATE DATABASE mysqltest4;
-
-CREATE PROCEDURE mysqltest1.p_def() SQL SECURITY DEFINER
- SELECT 1;
-
-CREATE PROCEDURE mysqltest2.p_inv() SQL SECURITY INVOKER
- SELECT 1;
-
-CREATE FUNCTION mysqltest3.f_def() RETURNS INT SQL SECURITY DEFINER
- RETURN 1;
-
-CREATE FUNCTION mysqltest4.f_inv() RETURNS INT SQL SECURITY INVOKER
- RETURN 1;
-
-GRANT EXECUTE ON PROCEDURE mysqltest1.p_def TO mysqltest_1@localhost;
-GRANT EXECUTE ON PROCEDURE mysqltest2.p_inv TO mysqltest_1@localhost;
-GRANT EXECUTE ON FUNCTION mysqltest3.f_def TO mysqltest_1@localhost;
-GRANT EXECUTE ON FUNCTION mysqltest4.f_inv TO mysqltest_1@localhost;
-
-GRANT ALL PRIVILEGES ON test.* TO mysqltest_1@localhost;
-
-# Test.
-
---connect (bug9504_con1,localhost,mysqltest_1,,)
---echo
---echo ---> connection: bug9504_con1
-
-# - Check that we can switch to the db;
-
-use mysqltest1;
-
-use mysqltest2;
-
-use mysqltest3;
-
-use mysqltest4;
-
-# - Check that we can call stored routines;
-
-use test;
-
-CALL mysqltest1.p_def();
-
-CALL mysqltest2.p_inv();
-
-SELECT mysqltest3.f_def();
-
-SELECT mysqltest4.f_inv();
-
-# Cleanup.
-
---connection default
---echo
---echo ---> connection: default
-
---disconnect bug9504_con1
-
-DROP DATABASE mysqltest1;
-DROP DATABASE mysqltest2;
-DROP DATABASE mysqltest3;
-DROP DATABASE mysqltest4;
-
-DROP USER mysqltest_1@localhost;
-
-
-#
-# Bug#27337 Privileges are not restored properly.
-#
-# Actually, the patch for this bugs fixes two problems. So, here are two test
-# cases.
-
-# Test case 1: privileges are not restored properly after calling a stored
-# routine defined with SQL SECURITY INVOKER clause.
-
-# Prepare.
-
---disable_warnings
-DROP DATABASE IF EXISTS mysqltest1;
-DROP DATABASE IF EXISTS mysqltest2;
---enable_warnings
-
-CREATE DATABASE mysqltest1;
-CREATE DATABASE mysqltest2;
-
-GRANT ALL PRIVILEGES ON mysqltest1.* TO mysqltest_1@localhost;
-GRANT SELECT ON mysqltest2.* TO mysqltest_1@localhost;
-
-CREATE PROCEDURE mysqltest1.p1() SQL SECURITY INVOKER
- SELECT 1;
-
-# Test.
-
---connect (bug27337_con1,localhost,mysqltest_1,,mysqltest2)
---echo
---echo ---> connection: bug27337_con1
-
---error ER_TABLEACCESS_DENIED_ERROR
-CREATE TABLE t1(c INT);
-
-CALL mysqltest1.p1();
-
---error ER_TABLEACCESS_DENIED_ERROR
-CREATE TABLE t1(c INT);
-
---disconnect bug27337_con1
-
---connect (bug27337_con2,localhost,mysqltest_1,,mysqltest2)
---echo
---echo ---> connection: bug27337_con2
-
---error ER_TABLEACCESS_DENIED_ERROR
-CREATE TABLE t1(c INT);
-
-SHOW TABLES;
-
-# Cleanup.
-
---connection default
---echo
---echo ---> connection: default
-
---disconnect bug27337_con2
-
-DROP DATABASE mysqltest1;
-DROP DATABASE mysqltest2;
-
-DROP USER mysqltest_1@localhost;
-
-# Test case 2: privileges are not checked properly for prepared statements.
-
-# Prepare.
-
---disable_warnings
-DROP DATABASE IF EXISTS mysqltest1;
-DROP DATABASE IF EXISTS mysqltest2;
---enable_warnings
-
-CREATE DATABASE mysqltest1;
-CREATE DATABASE mysqltest2;
-
-CREATE TABLE mysqltest1.t1(c INT);
-CREATE TABLE mysqltest2.t2(c INT);
-
-GRANT SELECT ON mysqltest1.t1 TO mysqltest_1@localhost;
-GRANT SELECT ON mysqltest2.t2 TO mysqltest_2@localhost;
-
-# Test.
-
---connect (bug27337_con1,localhost,mysqltest_1,,mysqltest1)
---echo
---echo ---> connection: bug27337_con1
-
-SHOW TABLES FROM mysqltest1;
-
-PREPARE stmt1 FROM 'SHOW TABLES FROM mysqltest1';
-
-EXECUTE stmt1;
-
---connect (bug27337_con2,localhost,mysqltest_2,,mysqltest2)
---echo
---echo ---> connection: bug27337_con2
-
-SHOW COLUMNS FROM mysqltest2.t2;
-
-PREPARE stmt2 FROM 'SHOW COLUMNS FROM mysqltest2.t2';
-
-EXECUTE stmt2;
-
---connection default
---echo
---echo ---> connection: default
-
-REVOKE SELECT ON mysqltest1.t1 FROM mysqltest_1@localhost;
-REVOKE SELECT ON mysqltest2.t2 FROM mysqltest_2@localhost;
-
---connection bug27337_con1
---echo
---echo ---> connection: bug27337_con1
-
---error ER_DBACCESS_DENIED_ERROR
-SHOW TABLES FROM mysqltest1;
-
---error ER_DBACCESS_DENIED_ERROR
-EXECUTE stmt1;
-
---connection bug27337_con2
---echo
---echo ---> connection: bug27337_con2
-
---error ER_TABLEACCESS_DENIED_ERROR
-SHOW COLUMNS FROM mysqltest2.t2;
-
---error ER_TABLEACCESS_DENIED_ERROR
-EXECUTE stmt2;
-
-# Cleanup.
-
---connection default
---echo
---echo ---> connection: default
-
---disconnect bug27337_con1
---disconnect bug27337_con2
-
-DROP DATABASE mysqltest1;
-DROP DATABASE mysqltest2;
-
-DROP USER mysqltest_1@localhost;
-DROP USER mysqltest_2@localhost;
-
-#
-# Bug#27878 Unchecked privileges on a view referring to a table from another
-# database.
-#
-USE test;
-CREATE TABLE t1 (f1 int, f2 int);
-INSERT INTO t1 VALUES(1,1), (2,2);
-CREATE DATABASE db27878;
-GRANT UPDATE(f1) ON t1 TO 'mysqltest_1'@'localhost';
-GRANT SELECT ON `test`.* TO 'mysqltest_1'@'localhost';
-GRANT ALL ON db27878.* TO 'mysqltest_1'@'localhost';
-USE db27878;
-CREATE SQL SECURITY INVOKER VIEW db27878.v1 AS SELECT * FROM test.t1;
-connect (user1,localhost,mysqltest_1,,test);
-connection user1;
-USE db27878;
---error 1356
-UPDATE v1 SET f2 = 4;
-SELECT * FROM test.t1;
-disconnect user1;
-connection default;
-REVOKE UPDATE (f1) ON `test`.`t1` FROM 'mysqltest_1'@'localhost';
-REVOKE SELECT ON `test`.* FROM 'mysqltest_1'@'localhost';
-REVOKE ALL ON db27878.* FROM 'mysqltest_1'@'localhost';
-DROP USER mysqltest_1@localhost;
-DROP DATABASE db27878;
-USE test;
-DROP TABLE t1;
-
---echo #
---echo # Bug#33275 Server crash when creating temporary table mysql.user
---echo #
-CREATE TEMPORARY TABLE mysql.user (id INT);
-FLUSH PRIVILEGES;
-DROP TABLE mysql.user;
-
-
-#
-# Bug#33201 Crash occurs when granting update privilege on one column of a view
-#
-drop table if exists test;
-drop function if exists test_function;
-drop view if exists v1;
-create table test (col1 varchar(30));
-delimiter |;
-create function test_function() returns varchar(30)
-begin
- declare tmp varchar(30);
- select col1 from test limit 1 into tmp;
- return '1';
-end|
-delimiter ;|
-create view v1 as select test.* from test where test.col1=test_function();
-grant update (col1) on v1 to 'greg'@'localhost';
-drop user 'greg'@'localhost';
-drop view v1;
-drop table test;
-drop function test_function;
-
-#
-# Bug#41456 SET PASSWORD hates CURRENT_USER()
-#
-SELECT CURRENT_USER();
-SET PASSWORD FOR CURRENT_USER() = PASSWORD("admin");
-SET PASSWORD FOR CURRENT_USER() = PASSWORD("");
-
-#
-# Bug#57952: privilege change is not taken into account by EXECUTE.
-#
-
---echo
---echo # Bug#57952
---echo
-
---disable_warnings
-DROP DATABASE IF EXISTS mysqltest1;
-DROP DATABASE IF EXISTS mysqltest2;
---enable_warnings
-
-CREATE DATABASE mysqltest1;
-CREATE DATABASE mysqltest2;
-
-use mysqltest1;
-CREATE TABLE t1(a INT, b INT);
-INSERT INTO t1 VALUES (1, 1);
-
-CREATE TABLE t2(a INT);
-INSERT INTO t2 VALUES (2);
-
-CREATE TABLE mysqltest2.t3(a INT);
-INSERT INTO mysqltest2.t3 VALUES (4);
-
-CREATE USER testuser@localhost;
-GRANT CREATE ROUTINE, EXECUTE ON mysqltest1.* TO testuser@localhost;
-GRANT SELECT(b) ON t1 TO testuser@localhost;
-GRANT SELECT ON t2 TO testuser@localhost;
-GRANT SELECT ON mysqltest2.* TO testuser@localhost;
-
---echo
---echo # Connection: bug57952_con1 (testuser@localhost, db: mysqltest1)
---connect (bug57952_con1,localhost,testuser,,mysqltest1)
-PREPARE s1 FROM 'SELECT b FROM t1';
-PREPARE s2 FROM 'SELECT a FROM t2';
-PREPARE s3 FROM 'SHOW TABLES FROM mysqltest2';
-
-CREATE PROCEDURE p1() SELECT b FROM t1;
-CREATE PROCEDURE p2() SELECT a FROM t2;
-CREATE PROCEDURE p3() SHOW TABLES FROM mysqltest2;
-
-CALL p1;
-CALL p2;
-CALL p3;
-
---echo
---echo # Connection: default
---connection default
-REVOKE SELECT ON t1 FROM testuser@localhost;
-GRANT SELECT(a) ON t1 TO testuser@localhost;
-REVOKE SELECT ON t2 FROM testuser@localhost;
-REVOKE SELECT ON mysqltest2.* FROM testuser@localhost;
-
---echo
---echo # Connection: bug57952_con1 (testuser@localhost, db: mysqltest1)
---connection bug57952_con1
---echo # - Check column-level privileges...
---error ER_COLUMNACCESS_DENIED_ERROR
-EXECUTE s1;
-
---error ER_COLUMNACCESS_DENIED_ERROR
-SELECT b FROM t1;
-
---error ER_COLUMNACCESS_DENIED_ERROR
-EXECUTE s1;
-
---error ER_COLUMNACCESS_DENIED_ERROR
-CALL p1;
-
---echo # - Check table-level privileges...
---error ER_TABLEACCESS_DENIED_ERROR
-SELECT a FROM t2;
-
---error ER_TABLEACCESS_DENIED_ERROR
-EXECUTE s2;
-
---error ER_TABLEACCESS_DENIED_ERROR
-CALL p2;
-
---echo # - Check database-level privileges...
---error ER_DBACCESS_DENIED_ERROR
-SHOW TABLES FROM mysqltest2;
-
---error ER_DBACCESS_DENIED_ERROR
-EXECUTE s3;
-
---error ER_DBACCESS_DENIED_ERROR
-CALL p3;
-
---echo
---echo # Connection: default
---connection default
---disconnect bug57952_con1
-DROP DATABASE mysqltest1;
-DROP DATABASE mysqltest2;
-DROP USER testuser@localhost;
-use test;
---echo
-
-
---echo #
---echo # Test for bug #36544 "DROP USER does not remove stored function
---echo # privileges".
---echo #
-create database mysqltest1;
-create function mysqltest1.f1() returns int return 0;
-create procedure mysqltest1.p1() begin end;
---echo #
---echo # 1) Check that DROP USER properly removes privileges on both
---echo # stored procedures and functions.
---echo #
-create user mysqluser1@localhost;
-grant execute on function mysqltest1.f1 to mysqluser1@localhost;
-grant execute on procedure mysqltest1.p1 to mysqluser1@localhost;
-
---echo # Quick test that granted privileges are properly reflected
---echo # in privilege tables and in in-memory structures.
-show grants for mysqluser1@localhost;
-select db, routine_name, routine_type, proc_priv from mysql.procs_priv where user='mysqluser1' and host='localhost';
---echo #
---echo # Create connection 'bug_36544_con1' as 'mysqluser1@localhost'.
---connect (bug36544_con1,localhost,mysqluser1,,)
-call mysqltest1.p1();
-select mysqltest1.f1();
-
---echo #
---echo # Switch to connection 'default'.
---connection default
-drop user mysqluser1@localhost;
-
---echo #
---echo # Test that dropping of user is properly reflected in
---echo # both privilege tables and in in-memory structures.
---echo #
---echo # Switch to connection 'bug36544_con1'.
---connection bug36544_con1
---echo # The connection cold be alive but should not be able to
---echo # access to any of the stored routines.
---error ER_PROCACCESS_DENIED_ERROR
-call mysqltest1.p1();
---error ER_PROCACCESS_DENIED_ERROR
-select mysqltest1.f1();
---disconnect bug36544_con1
-
---echo #
---echo # Switch to connection 'default'.
---connection default
---echo #
---echo # Now create user with the same name and check that he
---echo # has not inherited privileges.
-create user mysqluser1@localhost;
-show grants for mysqluser1@localhost;
-select db, routine_name, routine_type, proc_priv from mysql.procs_priv where user='mysqluser1' and host='localhost';
---echo #
---echo # Create connection 'bug_36544_con2' as 'mysqluser1@localhost'.
---connect (bug36544_con2,localhost,mysqluser1,,)
---echo # Newly created user should not be able to access any of the routines.
---error ER_PROCACCESS_DENIED_ERROR
-call mysqltest1.p1();
---error ER_PROCACCESS_DENIED_ERROR
-select mysqltest1.f1();
---echo #
---echo # Switch to connection 'default'.
---connection default
-
---echo #
---echo # 2) Check that RENAME USER properly updates privileges on both
---echo # stored procedures and functions.
---echo #
-grant execute on function mysqltest1.f1 to mysqluser1@localhost;
-grant execute on procedure mysqltest1.p1 to mysqluser1@localhost;
---echo #
---echo # Create one more user to make in-memory hashes non-trivial.
---echo # User names 'mysqluser11' and 'mysqluser10' were selected
---echo # to trigger bug discovered during code inspection.
-create user mysqluser11@localhost;
-grant execute on function mysqltest1.f1 to mysqluser11@localhost;
-grant execute on procedure mysqltest1.p1 to mysqluser11@localhost;
---echo # Also create a couple of tables to test for another bug
---echo # discovered during code inspection (again table names were
---echo # chosen especially to trigger the bug).
-create table mysqltest1.t11 (i int);
-create table mysqltest1.t22 (i int);
-grant select on mysqltest1.t22 to mysqluser1@localhost;
-grant select on mysqltest1.t11 to mysqluser1@localhost;
-
---echo # Quick test that granted privileges are properly reflected
---echo # in privilege tables and in in-memory structures.
-show grants for mysqluser1@localhost;
-select db, routine_name, routine_type, proc_priv from mysql.procs_priv where user='mysqluser1' and host='localhost';
-select db, table_name, table_priv from mysql.tables_priv where user='mysqluser1' and host='localhost';
---echo #
---echo # Switch to connection 'bug36544_con2'.
---connection bug36544_con2
-call mysqltest1.p1();
-select mysqltest1.f1();
-select * from mysqltest1.t11;
-select * from mysqltest1.t22;
-
---echo #
---echo # Switch to connection 'default'.
---connection default
-rename user mysqluser1@localhost to mysqluser10@localhost;
-
---echo #
---echo # Test that there are no privileges left for mysqluser1.
---echo #
---echo # Switch to connection 'bug36544_con2'.
---connection bug36544_con2
---echo # The connection cold be alive but should not be able to
---echo # access to any of the stored routines or tables.
---error ER_PROCACCESS_DENIED_ERROR
-call mysqltest1.p1();
---error ER_PROCACCESS_DENIED_ERROR
-select mysqltest1.f1();
---error ER_TABLEACCESS_DENIED_ERROR
-select * from mysqltest1.t11;
---error ER_TABLEACCESS_DENIED_ERROR
-select * from mysqltest1.t22;
---disconnect bug36544_con2
-
---echo #
---echo # Switch to connection 'default'.
---connection default
---echo #
---echo # Now create user with the old name and check that he
---echo # has not inherited privileges.
-create user mysqluser1@localhost;
-show grants for mysqluser1@localhost;
-select db, routine_name, routine_type, proc_priv from mysql.procs_priv where user='mysqluser1' and host='localhost';
-select db, table_name, table_priv from mysql.tables_priv where user='mysqluser1' and host='localhost';
---echo #
---echo # Create connection 'bug_36544_con3' as 'mysqluser1@localhost'.
---connect (bug36544_con3,localhost,mysqluser1,,)
---echo # Newly created user should not be able to access to any of the
---echo # stored routines or tables.
---error ER_PROCACCESS_DENIED_ERROR
-call mysqltest1.p1();
---error ER_PROCACCESS_DENIED_ERROR
-select mysqltest1.f1();
---error ER_TABLEACCESS_DENIED_ERROR
-select * from mysqltest1.t11;
---error ER_TABLEACCESS_DENIED_ERROR
-select * from mysqltest1.t22;
---disconnect bug36544_con3
-
---echo #
---echo # Switch to connection 'default'.
---connection default
---echo #
---echo # Now check that privileges became associated with a new user
---echo # name - mysqluser10.
---echo #
-show grants for mysqluser10@localhost;
-select db, routine_name, routine_type, proc_priv from mysql.procs_priv where user='mysqluser10' and host='localhost';
-select db, table_name, table_priv from mysql.tables_priv where user='mysqluser10' and host='localhost';
---echo #
---echo # Create connection 'bug_36544_con4' as 'mysqluser10@localhost'.
---connect (bug36544_con4,localhost,mysqluser10,,)
-call mysqltest1.p1();
-select mysqltest1.f1();
-select * from mysqltest1.t11;
-select * from mysqltest1.t22;
---disconnect bug36544_con4
-
---echo #
---echo # Switch to connection 'default'.
---connection default
---echo #
---echo # Clean-up.
-drop user mysqluser1@localhost;
-drop user mysqluser10@localhost;
-drop user mysqluser11@localhost;
-drop database mysqltest1;
-
-
---echo End of 5.0 tests
-set names utf8;
---error ER_WRONG_STRING_LENGTH
-grant select on test.* to очень_длинный_юзер890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890@localhost;
-set names default;
-
-#
-# Bug#20901 CREATE privilege is enough to insert into a table
-#
-
-create database mysqltest;
-use mysqltest;
-
-grant create on mysqltest.* to mysqltest@localhost;
-create table t1 (i INT);
-
-connect (user1,localhost,mysqltest,,mysqltest);
-connection user1;
-# show we don't have INSERT
---error ER_TABLEACCESS_DENIED_ERROR
-insert into t1 values (1);
-# show we have CREATE
-create table t2 (i INT);
-create table t4 (i INT);
-
-connection default;
-grant select, insert on mysqltest.t2 to mysqltest@localhost;
-grant insert on mysqltest.t4 to mysqltest@localhost;
-# to specify ACLs for non-existent objects, must explictly |CREATE
-grant create, insert on mysqltest.t5 to mysqltest@localhost;
-grant create, insert on mysqltest.t6 to mysqltest@localhost;
-flush privileges;
-
-connection user1;
-insert into t2 values (1);
-
-
-# CREATE IF NOT EXISTS...SELECT, t1 exists, no INSERT, must fail
---error ER_TABLEACCESS_DENIED_ERROR
-create table if not exists t1 select * from t2;
-
-# CREATE IF NOT EXISTS...SELECT, no t3 yet, no INSERT, must fail
---error ER_TABLEACCESS_DENIED_ERROR
-create table if not exists t3 select * from t2;
-
-# CREATE IF NOT EXISTS...SELECT, t4 exists, have INSERT, must succeed
-create table if not exists t4 select * from t2;
-
-# CREATE IF NOT EXISTS...SELECT, no t5 yet, have INSERT, must succeed
-create table if not exists t5 select * from t2;
-
-
-# CREATE...SELECT, no t6 yet, have INSERT, must succeed
-create table t6 select * from t2;
-
-# CREATE...SELECT, no t7 yet, no INSERT, must fail
---error ER_TABLEACCESS_DENIED_ERROR
-create table t7 select * from t2;
-
-# CREATE...SELECT, t4 exists, have INSERT, must still fail (exists)
---error 1050
-create table t4 select * from t2;
-
-# CREATE...SELECT, t1 exists, no INSERT, must fail
---error ER_TABLEACCESS_DENIED_ERROR
-create table t1 select * from t2;
-
-
-connection default;
-drop table t1,t2,t4,t5,t6;
-
-revoke create on mysqltest.* from mysqltest@localhost;
-revoke select, insert on mysqltest.t2 from mysqltest@localhost;
-revoke insert on mysqltest.t4 from mysqltest@localhost;
-revoke create, insert on mysqltest.t5 from mysqltest@localhost;
-revoke create, insert on mysqltest.t6 from mysqltest@localhost;
-drop user mysqltest@localhost;
-
-disconnect user1;
-drop database mysqltest;
-use test;
-
-
-#
-# Bug#16470 crash on grant if old grant tables
-#
-
-call mtr.add_suppression("Can't open and lock privilege tables");
-
---echo FLUSH PRIVILEGES without procs_priv table.
-RENAME TABLE mysql.procs_priv TO mysql.procs_gone;
-FLUSH PRIVILEGES;
---echo Assigning privileges without procs_priv table.
-CREATE DATABASE mysqltest1;
-CREATE PROCEDURE mysqltest1.test() SQL SECURITY DEFINER
- SELECT 1;
-CREATE FUNCTION mysqltest1.test() RETURNS INT RETURN 1;
---error ER_NO_SUCH_TABLE
-GRANT EXECUTE ON FUNCTION mysqltest1.test TO mysqltest_1@localhost;
-GRANT ALL PRIVILEGES ON test.* TO mysqltest_1@localhost;
-CALL mysqltest1.test();
-DROP DATABASE mysqltest1;
-RENAME TABLE mysql.procs_gone TO mysql.procs_priv;
-DROP USER mysqltest_1@localhost;
-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
-
-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;
-
-
-SET @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators;
-
-#
-# Bug#44658 Create procedure makes server crash when user does not have ALL privilege
-#
-CREATE USER user1;
-CREATE USER user2;
-GRANT CREATE ON db1.* TO 'user1'@'localhost';
-GRANT CREATE ROUTINE ON db1.* TO 'user1'@'localhost';
-GRANT CREATE ON db1.* TO 'user2'@'%';
-GRANT CREATE ROUTINE ON db1.* TO 'user2'@'%';
-FLUSH PRIVILEGES;
-SHOW GRANTS FOR 'user1'@'localhost';
-connect (con1,localhost,user1,,);
---echo ** Connect as user1 and create a procedure.
---echo ** The creation will imply implicitly assigned
---echo ** EXECUTE and ALTER ROUTINE privileges to
---echo ** the current user user1@localhost.
-SELECT @@GLOBAL.sql_mode;
-SELECT @@SESSION.sql_mode;
-CREATE DATABASE db1;
-DELIMITER ||;
-CREATE PROCEDURE db1.proc1(p1 INT)
- BEGIN
- SET @x = 0;
- REPEAT SET @x = @x + 1; UNTIL @x > p1 END REPEAT;
- END ;||
-DELIMITER ;||
-
-connect (con2,localhost,user2,,);
---echo ** Connect as user2 and create a procedure.
---echo ** Implicitly assignment of privileges will
---echo ** fail because the user2@localhost is an
---echo ** unknown user.
-DELIMITER ||;
-CREATE PROCEDURE db1.proc2(p1 INT)
- BEGIN
- SET @x = 0;
- REPEAT SET @x = @x + 1; UNTIL @x > p1 END REPEAT;
- END ;||
-DELIMITER ;||
-
-connection default;
-SHOW GRANTS FOR 'user1'@'localhost';
-SHOW GRANTS FOR 'user2';
-disconnect con1;
-disconnect con2;
-DROP PROCEDURE db1.proc1;
-DROP PROCEDURE db1.proc2;
-REVOKE ALL ON db1.* FROM 'user1'@'localhost';
-REVOKE ALL ON db1.* FROM 'user2'@'%';
-DROP USER 'user1';
-DROP USER 'user1'@'localhost';
-DROP USER 'user2';
-DROP DATABASE db1;
-
-
---echo #
---echo # Bug #25863 No database selected error, but documentation
---echo # says * for global allowed
---echo #
-
-connect(conn1,localhost,root,,*NO-ONE*);
-
---error ER_NO_DB_ERROR
-GRANT ALL ON * TO mysqltest_1;
-
-GRANT ALL ON *.* TO mysqltest_1;
-SHOW GRANTS FOR mysqltest_1;
-DROP USER mysqltest_1;
-
-USE test;
-
-GRANT ALL ON * TO mysqltest_1;
-SHOW GRANTS FOR mysqltest_1;
-DROP USER mysqltest_1;
-
-GRANT ALL ON *.* TO mysqltest_1;
-SHOW GRANTS FOR mysqltest_1;
-DROP USER mysqltest_1;
-
-connection default;
-disconnect conn1;
-
-
-#
-# Bug #53371: COM_FIELD_LIST can be abused to bypass table level grants.
-#
-
-CREATE DATABASE db1;
-CREATE DATABASE db2;
-GRANT SELECT ON db1.* to 'testbug'@localhost;
-USE db2;
-CREATE TABLE t1 (a INT);
-USE test;
-connect (con1,localhost,testbug,,db1);
---error ER_NO_SUCH_TABLE
-SELECT * FROM `../db2/tb2`;
---error ER_TABLEACCESS_DENIED_ERROR
-SELECT * FROM `../db2`.tb2;
---error ER_WRONG_TABLE_NAME
-SELECT * FROM `#mysql50#/../db2/tb2`;
-connection default;
-disconnect con1;
-DROP USER 'testbug'@localhost;
-DROP TABLE db2.t1;
-DROP DATABASE db1;
-DROP DATABASE db2;
-
---echo #
---echo # Bug #36742
---echo #
-grant usage on Foo.* to myuser@Localhost identified by 'foo';
-grant select on Foo.* to myuser@localhost;
-select host,user from mysql.user where User='myuser';
-revoke select on Foo.* from myuser@localhost;
-delete from mysql.user where User='myuser';
-flush privileges;
-
---echo #########################################################################
---echo #
---echo # Bug#38347: ALTER ROUTINE privilege allows SHOW CREATE TABLE.
---echo #
---echo #########################################################################
-
---echo
---echo # --
---echo # -- Prepare the environment.
---echo # --
-
-DELETE FROM mysql.user WHERE User LIKE 'mysqltest_%';
-DELETE FROM mysql.db WHERE User LIKE 'mysqltest_%';
-DELETE FROM mysql.tables_priv WHERE User LIKE 'mysqltest_%';
-DELETE FROM mysql.columns_priv WHERE User LIKE 'mysqltest_%';
-FLUSH PRIVILEGES;
-
---disable_warnings
-DROP DATABASE IF EXISTS mysqltest_db1;
---enable_warnings
-
-CREATE DATABASE mysqltest_db1;
-
-CREATE TABLE mysqltest_db1.t1(a INT);
-
---echo
---echo # --
---echo # -- Check that global privileges don't allow SHOW CREATE TABLE.
---echo # --
-
-GRANT EVENT ON mysqltest_db1.* TO mysqltest_u1@localhost;
-GRANT CREATE TEMPORARY TABLES ON mysqltest_db1.* TO mysqltest_u1@localhost;
-GRANT LOCK TABLES ON mysqltest_db1.* TO mysqltest_u1@localhost;
-GRANT ALTER ROUTINE ON mysqltest_db1.* TO mysqltest_u1@localhost;
-GRANT CREATE ROUTINE ON mysqltest_db1.* TO mysqltest_u1@localhost;
-GRANT EXECUTE ON mysqltest_db1.* TO mysqltest_u1@localhost;
-
-GRANT FILE ON *.* TO mysqltest_u1@localhost;
-GRANT CREATE USER ON *.* TO mysqltest_u1@localhost;
-GRANT PROCESS ON *.* TO mysqltest_u1@localhost;
-GRANT RELOAD ON *.* TO mysqltest_u1@localhost;
-GRANT REPLICATION CLIENT ON *.* TO mysqltest_u1@localhost;
-GRANT REPLICATION SLAVE ON *.* TO mysqltest_u1@localhost;
-GRANT SHOW DATABASES ON *.* TO mysqltest_u1@localhost;
-GRANT SHUTDOWN ON *.* TO mysqltest_u1@localhost;
-GRANT USAGE ON *.* TO mysqltest_u1@localhost;
-
---echo
-SHOW GRANTS FOR mysqltest_u1@localhost;
-
---echo
---echo # connection: con1 (mysqltest_u1@mysqltest_db1)
---connect (con1,localhost,mysqltest_u1,,mysqltest_db1)
---connection con1
-
---echo
---error ER_TABLEACCESS_DENIED_ERROR
-SHOW CREATE TABLE t1;
-
---echo
---echo # connection: default
---connection default
-
---disconnect con1
-
---echo
-REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost;
-SHOW GRANTS FOR mysqltest_u1@localhost;
-
---echo
---echo # --
---echo # -- Check that global SELECT allows SHOW CREATE TABLE.
---echo # --
-
---echo
-GRANT SELECT ON mysqltest_db1.* TO mysqltest_u1@localhost;
-
---source include/bug38347.inc
-
---echo
---echo # --
---echo # -- Check that global INSERT allows SHOW CREATE TABLE.
---echo # --
-
---echo
-GRANT INSERT ON mysqltest_db1.* TO mysqltest_u1@localhost;
-
---source include/bug38347.inc
-
---echo
---echo # --
---echo # -- Check that global UPDATE allows SHOW CREATE TABLE.
---echo # --
-
---echo
-GRANT UPDATE ON mysqltest_db1.* TO mysqltest_u1@localhost;
-
---source include/bug38347.inc
-
---echo
---echo # --
---echo # -- Check that global DELETE allows SHOW CREATE TABLE.
---echo # --
-
---echo
-GRANT DELETE ON mysqltest_db1.* TO mysqltest_u1@localhost;
-
---source include/bug38347.inc
-
---echo
---echo # --
---echo # -- Check that global CREATE allows SHOW CREATE TABLE.
---echo # --
-
---echo
-GRANT CREATE ON mysqltest_db1.* TO mysqltest_u1@localhost;
-
---source include/bug38347.inc
-
---echo
---echo # --
---echo # -- Check that global DROP allows SHOW CREATE TABLE.
---echo # --
-
---echo
-GRANT DROP ON mysqltest_db1.* TO mysqltest_u1@localhost;
-
---source include/bug38347.inc
-
---echo
---echo # --
---echo # -- Check that global ALTER allows SHOW CREATE TABLE.
---echo # --
-
---echo
-GRANT ALTER ON mysqltest_db1.* TO mysqltest_u1@localhost;
-
---source include/bug38347.inc
-
---echo
---echo # --
---echo # -- Check that global INDEX allows SHOW CREATE TABLE.
---echo # --
-
---echo
-GRANT INDEX ON mysqltest_db1.* TO mysqltest_u1@localhost;
-
---source include/bug38347.inc
-
---echo
---echo # --
---echo # -- Check that global REFERENCES allows SHOW CREATE TABLE.
---echo # --
-
---echo
-GRANT REFERENCES ON mysqltest_db1.* TO mysqltest_u1@localhost;
-
---source include/bug38347.inc
-
---echo
---echo # --
---echo # -- Check that global GRANT OPTION allows SHOW CREATE TABLE.
---echo # --
-
---echo
-GRANT GRANT OPTION ON mysqltest_db1.* TO mysqltest_u1@localhost;
-
---source include/bug38347.inc
-
---echo
---echo # --
---echo # -- Check that global CREATE VIEW allows SHOW CREATE TABLE.
---echo # --
-
---echo
-GRANT CREATE VIEW ON mysqltest_db1.* TO mysqltest_u1@localhost;
-
---source include/bug38347.inc
-
---echo
---echo # --
---echo # -- Check that global SHOW VIEW allows SHOW CREATE TABLE.
---echo # --
-
---echo
-GRANT SHOW VIEW ON mysqltest_db1.* TO mysqltest_u1@localhost;
-
---source include/bug38347.inc
-
---echo
---echo # --
---echo # -- Check that table-level SELECT allows SHOW CREATE TABLE.
---echo # --
-
---echo
-GRANT SELECT ON mysqltest_db1.t1 TO mysqltest_u1@localhost;
-
---source include/bug38347.inc
-
---echo
---echo # --
---echo # -- Check that table-level INSERT allows SHOW CREATE TABLE.
---echo # --
-
---echo
-GRANT INSERT ON mysqltest_db1.t1 TO mysqltest_u1@localhost;
-
---source include/bug38347.inc
-
---echo
---echo # --
---echo # -- Check that table-level UPDATE allows SHOW CREATE TABLE.
---echo # --
-
---echo
-GRANT UPDATE ON mysqltest_db1.t1 TO mysqltest_u1@localhost;
-
---source include/bug38347.inc
-
---echo
---echo # --
---echo # -- Check that table-level DELETE allows SHOW CREATE TABLE.
---echo # --
-
---echo
-GRANT DELETE ON mysqltest_db1.t1 TO mysqltest_u1@localhost;
-
---source include/bug38347.inc
-
---echo
---echo # --
---echo # -- Check that table-level CREATE allows SHOW CREATE TABLE.
---echo # --
-
---echo
-GRANT CREATE ON mysqltest_db1.t1 TO mysqltest_u1@localhost;
-
---source include/bug38347.inc
-
---echo
---echo # --
---echo # -- Check that table-level DROP allows SHOW CREATE TABLE.
---echo # --
-
---echo
-GRANT DROP ON mysqltest_db1.t1 TO mysqltest_u1@localhost;
-
---source include/bug38347.inc
-
---echo
---echo # --
---echo # -- Check that table-level ALTER allows SHOW CREATE TABLE.
---echo # --
-
---echo
-GRANT ALTER ON mysqltest_db1.t1 TO mysqltest_u1@localhost;
-
---source include/bug38347.inc
-
---echo
---echo # --
---echo # -- Check that table-level INDEX allows SHOW CREATE TABLE.
---echo # --
-
---echo
-GRANT INDEX ON mysqltest_db1.t1 TO mysqltest_u1@localhost;
-
---source include/bug38347.inc
-
---echo
---echo # --
---echo # -- Check that table-level REFERENCES allows SHOW CREATE TABLE.
---echo # --
-
---echo
-GRANT REFERENCES ON mysqltest_db1.t1 TO mysqltest_u1@localhost;
-
---source include/bug38347.inc
-
---echo
---echo # --
---echo # -- Check that table-level GRANT OPTION allows SHOW CREATE TABLE.
---echo # --
-
---echo
-GRANT GRANT OPTION ON mysqltest_db1.t1 TO mysqltest_u1@localhost;
-
---source include/bug38347.inc
-
---echo
---echo # --
---echo # -- Check that table-level CREATE VIEW allows SHOW CREATE TABLE.
---echo # --
-
---echo
-GRANT CREATE VIEW ON mysqltest_db1.t1 TO mysqltest_u1@localhost;
-
---source include/bug38347.inc
-
---echo
---echo # --
---echo # -- Check that table-level SHOW VIEW allows SHOW CREATE TABLE.
---echo # --
-
---echo
-GRANT SHOW VIEW ON mysqltest_db1.t1 TO mysqltest_u1@localhost;
-
---source include/bug38347.inc
-
---echo
---echo # --
---echo # -- Cleanup.
---echo # --
-
---echo
-DROP DATABASE mysqltest_db1;
-
-DROP USER mysqltest_u1@localhost;
-
---echo
---echo # End of Bug#38347.
---echo
-
-
---echo #
---echo # BUG#11759114 - '51401: GRANT TREATS NONEXISTENT FUNCTIONS/PRIVILEGES
---echo # DIFFERENTLY'.
---echo #
---disable_warnings
-drop database if exists mysqltest_db1;
---enable_warnings
-create database mysqltest_db1;
-create user mysqltest_u1;
---echo # Both GRANT statements below should fail with the same error.
---error ER_SP_DOES_NOT_EXIST
-grant execute on function mysqltest_db1.f1 to mysqltest_u1;
---error ER_SP_DOES_NOT_EXIST
-grant execute on procedure mysqltest_db1.p1 to mysqltest_u1;
---echo # Let us show that GRANT behaviour for routines is consistent
---echo # with GRANT behaviour for tables. Attempt to grant privilege
---echo # on non-existent table also results in an error.
---error ER_NO_SUCH_TABLE
-grant select on mysqltest_db1.t1 to mysqltest_u1;
-show grants for mysqltest_u1;
-drop database mysqltest_db1;
-drop user mysqltest_u1;
-
-
---echo #
---echo # Bug#12766319 - 61865: RENAME USER DOES NOT WORK CORRECTLY -
---echo # REQUIRES FLUSH PRIVILEGES
---echo #
-
-CREATE USER foo@'127.0.0.1';
-GRANT ALL ON *.* TO foo@'127.0.0.1';
-
---echo # First attempt, should connect successfully
-connect (conn1, '127.0.0.1', foo,,test);
-SELECT user(), current_user();
-
---echo # Rename the user
-RENAME USER foo@'127.0.0.1' to foo@'127.0.0.0/255.0.0.0';
-
---echo # Second attempt, should connect successfully as its valid mask
---echo # This was failing without fix
-connect (conn2, '127.0.0.1', foo,,test);
-SELECT user(), current_user();
-
---echo # Rename the user back to original
-RENAME USER foo@'127.0.0.0/255.0.0.0' to foo@'127.0.0.1';
-
---echo # Third attempt, should connect successfully
-connect (conn3, '127.0.0.1', foo,,test);
-SELECT user(), current_user();
-
---echo # Clean-up
-connection default;
-disconnect conn1;
-disconnect conn2;
-disconnect conn3;
-DROP USER foo@'127.0.0.1';
-
---echo # End of Bug#12766319
-
-#
-# Bug#27230925: HANDLE_FATAL_SIGNAL (SIG=11) IN SHOW_ROUTINE_GRANTS
-#
-create user foo@localhost;
-create database foodb;
-grant create routine on foodb.* to foo@localhost;
-connect con1,localhost,foo;
-create procedure fooproc() select 'i am fooproc';
-show grants;
-disconnect con1;
-connection default;
-rename table mysql.procs_priv to mysql.procs_priv1;
-flush privileges;
-show grants for foo@localhost;
-rename table mysql.procs_priv1 to mysql.procs_priv;
-show grants for foo@localhost;
-flush privileges;
-show grants for foo@localhost;
-drop user foo@localhost;
-drop procedure fooproc;
-drop database foodb;
-
-
---echo #
---echo # Bug#11756966 - 48958: STORED PROCEDURES CAN BE LEVERAGED TO BYPASS
---echo # DATABASE SECURITY
---echo #
-
---disable_warnings
-DROP DATABASE IF EXISTS secret;
-DROP DATABASE IF EXISTS no_such_db;
---enable_warnings
-
-CREATE DATABASE secret;
-GRANT USAGE ON *.* TO untrusted@localhost;
-
---echo # Connection con1
-connect (con1, localhost, untrusted);
-SHOW GRANTS;
-SHOW DATABASES;
-
---echo # Both statements below should fail with the same error.
---echo # They used to give different errors, thereby
---echo # hinting that the secret database exists.
---error ER_DBACCESS_DENIED_ERROR
-CREATE PROCEDURE no_such_db.foo() BEGIN END;
---error ER_DBACCESS_DENIED_ERROR
-CREATE PROCEDURE secret.peek_at_secret() BEGIN END;
-
---echo # Connection default
---connection default
-disconnect con1;
-DROP USER untrusted@localhost;
-DROP DATABASE secret;
-
-# Wait till we reached the initial number of concurrent sessions
---source include/wait_until_count_sessions.inc
diff --git a/mysql-test/r/lowercase_fs_off.test b/mysql-test/r/lowercase_fs_off.test
deleted file mode 100644
index f4df5e8188d..00000000000
--- a/mysql-test/r/lowercase_fs_off.test
+++ /dev/null
@@ -1,124 +0,0 @@
-#
-# Specific tests for case sensitive file systems
-# i.e. lower_case_filesystem=OFF
-#
--- source include/have_case_sensitive_file_system.inc
--- source include/not_embedded.inc
-
-connect (master,localhost,root,,);
-connection master;
-create database d1;
-grant all on d1.* to 'sample'@'localhost' identified by 'password';
-flush privileges;
-
-connect (sample,localhost,sample,password,d1);
-connection sample;
-select database();
---error ER_DBACCESS_DENIED_ERROR
-create database d2;
---error ER_DBACCESS_DENIED_ERROR
-create database D1;
-disconnect sample;
---source include/wait_until_disconnected.inc
-
-connection master;
-drop user 'sample'@'localhost';
-drop database if exists d1;
-disconnect master;
---source include/wait_until_disconnected.inc
-connection default;
-
-# End of 4.1 tests
-
-#
-# Bug#41049 does syntax "grant" case insensitive?
-#
-CREATE DATABASE d1;
-USE d1;
-CREATE TABLE T1(f1 INT);
-CREATE TABLE t1(f1 INT);
-GRANT SELECT ON T1 to user_1@localhost;
-
-connect (con1,localhost,user_1,,d1);
---error ER_TABLEACCESS_DENIED_ERROR
-select * from t1;
-select * from T1;
-connection default;
-GRANT SELECT ON t1 to user_1@localhost;
-connection con1;
-select * from information_schema.table_privileges;
-connection default;
-disconnect con1;
-
-REVOKE ALL PRIVILEGES, GRANT OPTION FROM user_1@localhost;
-DROP USER user_1@localhost;
-DROP DATABASE d1;
-USE test;
-
-CREATE DATABASE db1;
-USE db1;
-CREATE PROCEDURE p1() BEGIN END;
-CREATE FUNCTION f1(i INT) RETURNS INT RETURN i+1;
-
-GRANT USAGE ON db1.* to user_1@localhost;
-GRANT EXECUTE ON PROCEDURE db1.P1 to user_1@localhost;
-GRANT EXECUTE ON FUNCTION db1.f1 to user_1@localhost;
-GRANT UPDATE ON db1.* to USER_1@localhost;
-
-connect (con1,localhost,user_1,,db1);
-call p1();
-call P1();
-select f1(1);
-connect (con2,localhost,USER_1,,db1);
---error ER_PROCACCESS_DENIED_ERROR
-call p1();
---error ER_PROCACCESS_DENIED_ERROR
-call P1();
---error ER_PROCACCESS_DENIED_ERROR
-select f1(1);
-
-connection default;
-disconnect con1;
-disconnect con2;
-
-REVOKE ALL PRIVILEGES, GRANT OPTION FROM user_1@localhost;
-REVOKE ALL PRIVILEGES, GRANT OPTION FROM USER_1@localhost;
-DROP FUNCTION f1;
-DROP PROCEDURE p1;
-DROP USER user_1@localhost;
-DROP USER USER_1@localhost;
-DROP DATABASE db1;
-use test;
-
-# End of 5.0 tests
-
-
---echo #
---echo # Extra test coverage for Bug#56595 RENAME TABLE causes assert on OS X
---echo #
-
-CREATE TABLE t1(a INT);
-CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET new.a= 1;
-RENAME TABLE t1 TO T1;
-ALTER TABLE T1 RENAME t1;
-DROP TABLE t1;
-
-#
-# MDEV-13912 mysql_upgrade: case (in)sensitivity for stored procedures
-#
-create database TEST;
-create procedure TEST.pr() begin end;
-create procedure test.pr() begin end;
---exec $MYSQL_UPGRADE --force 2>&1
-drop procedure test.pr;
-drop database TEST;
-
-# End of 5.5 tests
-
-#
-# MDEV-9014 SHOW TRIGGERS not case sensitive
-#
-create table t1 (a int);
-create trigger t1_bi before insert on t1 for each row set new.a= 1;
-show triggers like '%T1%';
-drop table t1;
diff --git a/mysql-test/r/sp-security.test b/mysql-test/r/sp-security.test
deleted file mode 100644
index 53dc4f8c7ac..00000000000
--- a/mysql-test/r/sp-security.test
+++ /dev/null
@@ -1,1069 +0,0 @@
-#
-# Testing SQL SECURITY of stored procedures
-#
-
-# Can't test with embedded server that doesn't support grants
--- source include/not_embedded.inc
-
-# Save the initial number of concurrent sessions
---source include/count_sessions.inc
-
-connect (con1root,localhost,root,,);
-
-connection con1root;
-use test;
-
-# Create user user1 with no particular access rights
-grant usage on *.* to user1@localhost;
-flush privileges;
-
---disable_warnings
-drop table if exists t1;
-drop database if exists db1_secret;
---enable_warnings
-# Create our secret database
-create database db1_secret;
-
-# Can create a procedure in other db
-create procedure db1_secret.dummy() begin end;
-drop procedure db1_secret.dummy;
-
-use db1_secret;
-
-create table t1 ( u varchar(64), i int );
-insert into t1 values('test', 0);
-
-# A test procedure and function
-create procedure stamp(i int)
- insert into db1_secret.t1 values (user(), i);
---replace_column 5 '0000-00-00 00:00:00' 6 '0000-00-00 00:00:00'
-show procedure status like 'stamp';
-
-delimiter |;
-create function db() returns varchar(64)
-begin
- declare v varchar(64);
-
- select u into v from t1 limit 1;
-
- return v;
-end|
-delimiter ;|
---replace_column 5 '0000-00-00 00:00:00' 6 '0000-00-00 00:00:00'
-show function status like 'db';
-
-# root can, of course
-call stamp(1);
-select * from t1;
-select db();
-
-grant execute on procedure db1_secret.stamp to user1@'%';
-grant execute on function db1_secret.db to user1@'%';
-grant execute on procedure db1_secret.stamp to ''@'%';
-grant execute on function db1_secret.db to ''@'%';
-
-connect (con2user1,localhost,user1,,);
-connect (con3anon,localhost,anon,,);
-
-
-#
-# User1 can
-#
-connection con2user1;
-
-# This should work...
-call db1_secret.stamp(2);
-select db1_secret.db();
-
-# ...but not this
---error ER_TABLEACCESS_DENIED_ERROR
-select * from db1_secret.t1;
-
-# ...and not this
---error ER_DBACCESS_DENIED_ERROR
-create procedure db1_secret.dummy() begin end;
---error ER_PROCACCESS_DENIED_ERROR
-drop procedure db1_secret.dummy;
---error ER_PROCACCESS_DENIED_ERROR
-drop procedure db1_secret.stamp;
---error ER_PROCACCESS_DENIED_ERROR
-drop function db1_secret.db;
-
-
-#
-# Anonymous can
-#
-connection con3anon;
-
-# This should work...
-call db1_secret.stamp(3);
-select db1_secret.db();
-
-# ...but not this
---error ER_TABLEACCESS_DENIED_ERROR
-select * from db1_secret.t1;
-
-# ...and not this
---error ER_DBACCESS_DENIED_ERROR
-create procedure db1_secret.dummy() begin end;
---error ER_PROCACCESS_DENIED_ERROR
-drop procedure db1_secret.dummy;
---error ER_PROCACCESS_DENIED_ERROR
-drop procedure db1_secret.stamp;
---error ER_PROCACCESS_DENIED_ERROR
-drop function db1_secret.db;
-
-
-#
-# Check it out
-#
-connection con1root;
-select * from t1;
-
-#
-# Change to invoker's rights
-#
-alter procedure stamp sql security invoker;
---replace_column 5 '0000-00-00 00:00:00' 6 '0000-00-00 00:00:00'
-show procedure status like 'stamp';
-
-alter function db sql security invoker;
---replace_column 5 '0000-00-00 00:00:00' 6 '0000-00-00 00:00:00'
-show function status like 'db';
-
-# root still can
-call stamp(4);
-select * from t1;
-select db();
-
-#
-# User1 cannot
-#
-connection con2user1;
-
-# This should not work
---error ER_TABLEACCESS_DENIED_ERROR
-call db1_secret.stamp(5);
---error ER_TABLEACCESS_DENIED_ERROR
-select db1_secret.db();
-
-#
-# Anonymous cannot
-#
-connection con3anon;
-
-# This should not work
---error ER_TABLEACCESS_DENIED_ERROR
-call db1_secret.stamp(6);
---error ER_TABLEACCESS_DENIED_ERROR
-select db1_secret.db();
-
-#
-# Bug#2777 Stored procedure doesn't observe definer's rights
-#
-
-connection con1root;
---disable_warnings
-drop database if exists db2;
---enable_warnings
-create database db2;
-
-use db2;
-
-create table t2 (s1 int);
-insert into t2 values (0);
-
-grant usage on db2.* to user1@localhost;
-grant select on db2.* to user1@localhost;
-grant usage on db2.* to user2@localhost;
-grant select,insert,update,delete,create routine on db2.* to user2@localhost;
-grant create routine on db2.* to user1@localhost;
-flush privileges;
-
-connection con2user1;
-use db2;
-
-create procedure p () insert into t2 values (1);
-
-# Check that this doesn't work.
---error ER_TABLEACCESS_DENIED_ERROR
-call p();
-
-connect (con4user2,localhost,user2,,);
-
-connection con4user2;
-use db2;
-
-# This should not work, since p is executed with definer's (user1's) rights.
---error ER_PROCACCESS_DENIED_ERROR
-call p();
-select * from t2;
-
-create procedure q () insert into t2 values (2);
-
-call q();
-select * from t2;
-
-connection con1root;
-grant usage on procedure db2.q to user2@localhost with grant option;
-
-connection con4user2;
-grant execute on procedure db2.q to user1@localhost;
-
-connection con2user1;
-use db2;
-
-# This should work
-call q();
-select * from t2;
-
-#
-# Bug#6030 Stored procedure has no appropriate DROP privilege
-# (or ALTER for that matter)
-
-# still connection con2user1 in db2
-
-# This should work:
-alter procedure p modifies sql data;
-drop procedure p;
-
-# This should NOT work
---error ER_PROCACCESS_DENIED_ERROR
-alter procedure q modifies sql data;
---error ER_PROCACCESS_DENIED_ERROR
-drop procedure q;
-
-connection con1root;
-use db2;
-# But root always can
-alter procedure q modifies sql data;
-drop procedure q;
-
-
-# Clean up
-#Still connection con1root;
-disconnect con2user1;
-disconnect con3anon;
-disconnect con4user2;
-use test;
-select type,db,name from mysql.proc where db like 'db%';
-drop database db1_secret;
-drop database db2;
-# Make sure the routines are gone
-select type,db,name from mysql.proc where db like 'db%';
-# Get rid of the users
-delete from mysql.user where user='user1' or user='user2';
-delete from mysql.user where user='' and host='%';
-# And any routine privileges
-delete from mysql.procs_priv where user='user1' or user='user2';
-# Delete the grants to user ''@'%' that was created above
-delete from mysql.procs_priv where user='' and host='%';
-delete from mysql.db where user='user2';
-flush privileges;
-#
-# Test the new security acls
-#
-grant usage on *.* to usera@localhost;
-grant usage on *.* to userb@localhost;
-grant usage on *.* to userc@localhost;
-create database sptest;
-create table t1 ( u varchar(64), i int );
-create procedure sptest.p1(i int) insert into test.t1 values (user(), i);
-grant insert on t1 to usera@localhost;
-grant execute on procedure sptest.p1 to usera@localhost;
-show grants for usera@localhost;
-grant execute on procedure sptest.p1 to userc@localhost with grant option;
-show grants for userc@localhost;
-
-connect (con2usera,localhost,usera,,);
-connect (con3userb,localhost,userb,,);
-connect (con4userc,localhost,userc,,);
-
-connection con2usera;
-call sptest.p1(1);
---error ER_PROCACCESS_DENIED_ERROR
-grant execute on procedure sptest.p1 to userb@localhost;
---error ER_PROCACCESS_DENIED_ERROR
-drop procedure sptest.p1;
-
-connection con3userb;
---error ER_PROCACCESS_DENIED_ERROR
-call sptest.p1(2);
---error ER_PROCACCESS_DENIED_ERROR
-grant execute on procedure sptest.p1 to userb@localhost;
---error ER_PROCACCESS_DENIED_ERROR
-drop procedure sptest.p1;
-
-connection con4userc;
-call sptest.p1(3);
-grant execute on procedure sptest.p1 to userb@localhost;
---error ER_PROCACCESS_DENIED_ERROR
-drop procedure sptest.p1;
-
-connection con3userb;
-call sptest.p1(4);
---error ER_PROCACCESS_DENIED_ERROR
-grant execute on procedure sptest.p1 to userb@localhost;
---error ER_PROCACCESS_DENIED_ERROR
-drop procedure sptest.p1;
-
-connection con1root;
-select * from t1;
-
-grant all privileges on procedure sptest.p1 to userc@localhost;
-show grants for userc@localhost;
-show grants for userb@localhost;
-
-connection con4userc;
-revoke all privileges on procedure sptest.p1 from userb@localhost;
-
-connection con1root;
-show grants for userb@localhost;
-
-#cleanup
-disconnect con4userc;
-disconnect con3userb;
-disconnect con2usera;
-use test;
-drop database sptest;
-delete from mysql.user where user='usera' or user='userb' or user='userc';
-delete from mysql.procs_priv where user='usera' or user='userb' or user='userc';
-delete from mysql.tables_priv where user='usera';
-flush privileges;
-drop table t1;
-
-#
-# Bug#9503 reseting correct parameters of thread after error in SP function
-#
-connect (root,localhost,root,,test);
-connection root;
-
---disable_warnings
-drop function if exists bug_9503;
---enable_warnings
-delimiter //;
-create database mysqltest//
-use mysqltest//
-create table t1 (s1 int)//
-grant select on t1 to user1@localhost//
-create function bug_9503 () returns int sql security invoker begin declare v int;
-select min(s1) into v from t1; return v; end//
-delimiter ;//
-
-connect (user1,localhost,user1,,test);
-connection user1;
-use mysqltest;
--- error ER_PROCACCESS_DENIED_ERROR
-select bug_9503();
-
-connection root;
-grant execute on function bug_9503 to user1@localhost;
-
-connection user1;
-do 1;
-use test;
-
-disconnect user1;
-connection root;
-REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1@localhost;
-drop function bug_9503;
-use test;
-drop database mysqltest;
-connection default;
-disconnect root;
-
-#
-# correct value from current_user() in function run from "security definer"
-# (Bug#7291 Stored procedures: wrong CURRENT_USER value)
-#
-connection con1root;
-use test;
-
-select current_user();
-select user();
-create procedure bug7291_0 () sql security invoker select current_user(), user();
-create procedure bug7291_1 () sql security definer call bug7291_0();
-create procedure bug7291_2 () sql security invoker call bug7291_0();
-grant execute on procedure bug7291_0 to user1@localhost;
-grant execute on procedure bug7291_1 to user1@localhost;
-grant execute on procedure bug7291_2 to user1@localhost;
-
-connect (user1,localhost,user1,,);
-connection user1;
-
-call bug7291_2();
-call bug7291_1();
-
-connection con1root;
-drop procedure bug7291_1;
-drop procedure bug7291_2;
-drop procedure bug7291_0;
-disconnect user1;
-REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1@localhost;
-drop user user1@localhost;
-
-#
-# Bug#12318 Wrong error message when accessing an inaccessible stored
-# procedure in another database when the current database is
-# information_schema.
-#
-
---disable_warnings
-drop database if exists mysqltest_1;
---enable_warnings
-
-create database mysqltest_1;
-delimiter //;
-create procedure mysqltest_1.p1()
-begin
- select 1 from dual;
-end//
-delimiter ;//
-
-grant usage on *.* to mysqltest_1@localhost;
-
-connect (n1,localhost,mysqltest_1,,information_schema,$MASTER_MYPORT,$MASTER_MYSOCK);
-connection n1;
---error ER_PROCACCESS_DENIED_ERROR
-call mysqltest_1.p1();
-disconnect n1;
-# Test also without a current database
-connect (n2,localhost,mysqltest_1,,*NO-ONE*,$MASTER_MYPORT,$MASTER_MYSOCK);
-connection n2;
---error ER_PROCACCESS_DENIED_ERROR
-call mysqltest_1.p1();
-disconnect n2;
-
-connection default;
-
-drop procedure mysqltest_1.p1;
-drop database mysqltest_1;
-
-revoke usage on *.* from mysqltest_1@localhost;
-drop user mysqltest_1@localhost;
-
-#
-# Bug#12812 create view calling a function works without execute right
-# on function
-delimiter |;
---disable_warnings
-drop function if exists bug12812|
---enable_warnings
-create function bug12812() returns char(2)
-begin
- return 'ok';
-end;
-create user user_bug12812@localhost IDENTIFIED BY 'ABC'|
---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
-connect (test_user_12812,localhost,user_bug12812,ABC,test)|
---error ER_PROCACCESS_DENIED_ERROR
-SELECT test.bug12812()|
---error ER_PROCACCESS_DENIED_ERROR
-CREATE VIEW v1 AS SELECT test.bug12812()|
-# Cleanup
-connection default|
-disconnect test_user_12812|
-DROP USER user_bug12812@localhost|
-drop function bug12812|
-delimiter ;|
-
-
-#
-# Bug#14834 Server denies to execute Stored Procedure
-#
-# The problem here was with '_' in the database name.
-#
-create database db_bug14834;
-
-create user user1_bug14834@localhost identified by '';
-# The exact name of the database (no wildcard)
-grant all on `db\_bug14834`.* to user1_bug14834@localhost;
-
-create user user2_bug14834@localhost identified by '';
-# The exact name of the database (no wildcard)
-grant all on `db\_bug14834`.* to user2_bug14834@localhost;
-
-create user user3_bug14834@localhost identified by '';
-# Wildcards in the database name
-grant all on `db__ug14834`.* to user3_bug14834@localhost;
-
-connect (user1_bug14834,localhost,user1_bug14834,,db_bug14834);
-# Create the procedure and check that we can call it
-create procedure p_bug14834() select user(), current_user();
-call p_bug14834();
-
-connect (user2_bug14834,localhost,user2_bug14834,,db_bug14834);
-# This didn't work before
-call p_bug14834();
-
-connect (user3_bug14834,localhost,user3_bug14834,,db_bug14834);
-# Should also work
-call p_bug14834();
-
-# Cleanup
-connection default;
-disconnect user1_bug14834;
-disconnect user2_bug14834;
-disconnect user3_bug14834;
-drop user user1_bug14834@localhost;
-drop user user2_bug14834@localhost;
-drop user user3_bug14834@localhost;
-drop database db_bug14834;
-
-
-#
-# Bug#14533 'desc tbl' in stored procedure causes error
-# ER_TABLEACCESS_DENIED_ERROR
-#
-create database db_bug14533;
-use db_bug14533;
-create table t1 (id int);
-create user user_bug14533@localhost identified by '';
-
-create procedure bug14533_1()
- sql security definer
- desc db_bug14533.t1;
-
-create procedure bug14533_2()
- sql security definer
- select * from db_bug14533.t1;
-
-grant execute on procedure db_bug14533.bug14533_1 to user_bug14533@localhost;
-grant execute on procedure db_bug14533.bug14533_2 to user_bug14533@localhost;
-
-connect (user_bug14533,localhost,user_bug14533,,test);
-
-# These should work
-call db_bug14533.bug14533_1();
-call db_bug14533.bug14533_2();
-
-# For reference, these should not work
---error ER_TABLEACCESS_DENIED_ERROR
-desc db_bug14533.t1;
---error ER_TABLEACCESS_DENIED_ERROR
-select * from db_bug14533.t1;
-
-# Cleanup
-connection default;
-disconnect user_bug14533;
-drop user user_bug14533@localhost;
-drop database db_bug14533;
-
-
-#
-# WL#2897 Complete definer support in the stored routines.
-#
-# The following cases are tested:
-# 1. check that if DEFINER-clause is not explicitly specified, stored routines
-# are created with CURRENT_USER privileges;
-# 2. check that if DEFINER-clause specifies non-current user, SUPER privilege
-# is required to create a stored routine;
-# 3. check that if DEFINER-clause specifies non-existent user, a warning is
-# emitted.
-# 4. check that SHOW CREATE PROCEDURE | FUNCTION works correctly;
-#
-# The following cases are tested in other test suites:
-# - check that mysqldump dumps new attribute correctly;
-# - check that slave replicates CREATE-statements with explicitly specified
-# DEFINER correctly.
-#
-
-# Setup the environment.
-
---echo
---echo ---> connection: root
---connection con1root
-
---disable_warnings
-DROP DATABASE IF EXISTS mysqltest;
---enable_warnings
-
-CREATE DATABASE mysqltest;
-
-CREATE USER mysqltest_1@localhost;
-GRANT ALL PRIVILEGES ON mysqltest.* TO mysqltest_1@localhost;
-
-CREATE USER mysqltest_2@localhost;
-GRANT SUPER ON *.* TO mysqltest_2@localhost;
-GRANT ALL PRIVILEGES ON mysqltest.* TO mysqltest_2@localhost;
-
---connect (mysqltest_2_con,localhost,mysqltest_2,,mysqltest)
---connect (mysqltest_1_con,localhost,mysqltest_1,,mysqltest)
-
-# test case (1).
-
---echo
---echo ---> connection: mysqltest_2_con
---connection mysqltest_2_con
-
-USE mysqltest;
-
-CREATE PROCEDURE wl2897_p1() SELECT 1;
-
-CREATE FUNCTION wl2897_f1() RETURNS INT RETURN 1;
-
-# test case (2).
-
---echo
---echo ---> connection: mysqltest_1_con
---connection mysqltest_1_con
-
-USE mysqltest;
-
---error ER_SPECIFIC_ACCESS_DENIED_ERROR
-CREATE DEFINER=root@localhost PROCEDURE wl2897_p2() SELECT 2;
-
---error ER_SPECIFIC_ACCESS_DENIED_ERROR
-CREATE DEFINER=root@localhost FUNCTION wl2897_f2() RETURNS INT RETURN 2;
-
-# test case (3).
-
---echo
---echo ---> connection: mysqltest_2_con
---connection mysqltest_2_con
-
-use mysqltest;
-
-CREATE DEFINER='a @ b @ c'@localhost PROCEDURE wl2897_p3() SELECT 3;
-
-CREATE DEFINER='a @ b @ c'@localhost FUNCTION wl2897_f3() RETURNS INT RETURN 3;
-
-# test case (4).
-
---echo
---echo ---> connection: con1root
---connection con1root
-
-USE mysqltest;
-
-SHOW CREATE PROCEDURE wl2897_p1;
-SHOW CREATE PROCEDURE wl2897_p3;
-
-SHOW CREATE FUNCTION wl2897_f1;
-SHOW CREATE FUNCTION wl2897_f3;
-
-# Cleanup.
-
-DROP USER mysqltest_1@localhost;
-DROP USER mysqltest_2@localhost;
-
-DROP DATABASE mysqltest;
-
---disconnect mysqltest_1_con
---disconnect mysqltest_2_con
-
-
-#
-# Bug#13198 SP executes if definer does not exist
-#
-
-# Prepare environment.
-
---echo
---echo ---> connection: root
---connection con1root
-
---disable_warnings
-DROP DATABASE IF EXISTS mysqltest;
---enable_warnings
-
-CREATE DATABASE mysqltest;
-
-CREATE USER mysqltest_1@localhost;
-GRANT ALL PRIVILEGES ON mysqltest.* TO mysqltest_1@localhost;
-
-CREATE USER mysqltest_2@localhost;
-GRANT ALL PRIVILEGES ON mysqltest.* TO mysqltest_2@localhost;
-
---connect (mysqltest_1_con,localhost,mysqltest_1,,mysqltest)
---connect (mysqltest_2_con,localhost,mysqltest_2,,mysqltest)
-
-# Create a procedure/function under u1.
-
---echo
---echo ---> connection: mysqltest_1_con
---connection mysqltest_1_con
-
-USE mysqltest;
-
-CREATE PROCEDURE bug13198_p1()
- SELECT 1;
-
-CREATE FUNCTION bug13198_f1() RETURNS INT
- RETURN 1;
-
-CALL bug13198_p1();
-
-SELECT bug13198_f1();
-
-# Check that u2 can call the procedure/function.
-
---echo
---echo ---> connection: mysqltest_2_con
---connection mysqltest_2_con
-
-USE mysqltest;
-
-CALL bug13198_p1();
-
-SELECT bug13198_f1();
-
-# Drop user u1 (definer of the object);
-
---echo
---echo ---> connection: root
---connection con1root
-
---disconnect mysqltest_1_con
-
-DROP USER mysqltest_1@localhost;
-
-# Check that u2 can not call the procedure/function.
-
---echo
---echo ---> connection: mysqltest_2_con
---connection mysqltest_2_con
-
-USE mysqltest;
-
---error ER_NO_SUCH_USER
-CALL bug13198_p1();
-
---error ER_NO_SUCH_USER
-SELECT bug13198_f1();
-
-# Cleanup.
-
---echo
---echo ---> connection: root
---connection con1root
-
---disconnect mysqltest_2_con
-
-DROP USER mysqltest_2@localhost;
-
-DROP DATABASE mysqltest;
-
-#
-# Bug#19857 When a user with CREATE ROUTINE priv creates a routine,
-# it results in NULL p/w
-#
-
-# Can't test with embedded server that doesn't support grants
-
-GRANT USAGE ON *.* TO user19857@localhost IDENTIFIED BY 'meow';
-GRANT SELECT, INSERT, UPDATE, DELETE, CREATE ROUTINE, ALTER ROUTINE ON test.* TO
-user19857@localhost;
-SELECT Host,User,Password FROM mysql.user WHERE User='user19857';
-
---connect (mysqltest_2_con,localhost,user19857,meow,test)
---echo
---echo ---> connection: mysqltest_2_con
---connection mysqltest_2_con
-
-USE test;
-
-DELIMITER //;
- CREATE PROCEDURE sp19857() DETERMINISTIC
- BEGIN
- DECLARE a INT;
- SET a=1;
- SELECT a;
- END //
-DELIMITER ;//
-
-SHOW CREATE PROCEDURE test.sp19857;
-
---disconnect mysqltest_2_con
---connect (mysqltest_2_con,localhost,user19857,meow,test)
---connection mysqltest_2_con
-
-DROP PROCEDURE IF EXISTS test.sp19857;
-
---echo
---echo ---> connection: root
---connection con1root
-
---disconnect mysqltest_2_con
-
-SELECT Host,User,Password FROM mysql.user WHERE User='user19857';
-
-DROP USER user19857@localhost;
-
---disconnect con1root
---connection default
-use test;
-
-#
-# Bug#18630 Arguments of suid routine calculated in wrong security context
-#
-# Arguments of suid routines were calculated in definer's security
-# context instead of caller's context thus creating security hole.
-#
---disable_warnings
-DROP TABLE IF EXISTS t1;
-DROP VIEW IF EXISTS v1;
-DROP FUNCTION IF EXISTS f_suid;
-DROP PROCEDURE IF EXISTS p_suid;
-DROP FUNCTION IF EXISTS f_evil;
---enable_warnings
-DELETE FROM mysql.user WHERE user LIKE 'mysqltest\_%';
-DELETE FROM mysql.db WHERE user LIKE 'mysqltest\_%';
-DELETE FROM mysql.tables_priv WHERE user LIKE 'mysqltest\_%';
-DELETE FROM mysql.columns_priv WHERE user LIKE 'mysqltest\_%';
-FLUSH PRIVILEGES;
-
-CREATE TABLE t1 (i INT);
-CREATE FUNCTION f_suid(i INT) RETURNS INT SQL SECURITY DEFINER RETURN 0;
-CREATE PROCEDURE p_suid(IN i INT) SQL SECURITY DEFINER SET @c:= 0;
-
-CREATE USER mysqltest_u1@localhost;
-# Thanks to this grant statement privileges of anonymous users on
-# 'test' database are not applicable for mysqltest_u1@localhost.
-GRANT EXECUTE ON test.* TO mysqltest_u1@localhost;
-
-delimiter |;
-CREATE DEFINER=mysqltest_u1@localhost FUNCTION f_evil () RETURNS INT
- SQL SECURITY INVOKER
-BEGIN
- SET @a:= CURRENT_USER();
- SET @b:= (SELECT COUNT(*) FROM t1);
- RETURN @b;
-END|
-delimiter ;|
-
-CREATE SQL SECURITY INVOKER VIEW v1 AS SELECT f_evil();
-
-connect (conn1, localhost, mysqltest_u1,,);
-
---error ER_TABLEACCESS_DENIED_ERROR
-SELECT COUNT(*) FROM t1;
-
---error ER_TABLEACCESS_DENIED_ERROR
-SELECT f_evil();
-SELECT @a, @b;
-
---error ER_TABLEACCESS_DENIED_ERROR
-SELECT f_suid(f_evil());
-SELECT @a, @b;
-
---error ER_TABLEACCESS_DENIED_ERROR
-CALL p_suid(f_evil());
-SELECT @a, @b;
-
---error ER_TABLEACCESS_DENIED_ERROR
-SELECT * FROM v1;
-SELECT @a, @b;
-
-disconnect conn1;
-connection default;
-
-DROP VIEW v1;
-DROP FUNCTION f_evil;
-DROP USER mysqltest_u1@localhost;
-DROP PROCEDURE p_suid;
-DROP FUNCTION f_suid;
-DROP TABLE t1;
-
---echo #
---echo # Bug #48872 : Privileges for stored functions ignored if function name
---echo # is mixed case
---echo #
-
-CREATE DATABASE B48872;
-USE B48872;
-CREATE TABLE `TestTab` (id INT);
-INSERT INTO `TestTab` VALUES (1),(2);
-CREATE FUNCTION `f_Test`() RETURNS INT RETURN 123;
-CREATE FUNCTION `f_Test_denied`() RETURNS INT RETURN 123;
-CREATE USER 'tester';
-CREATE USER 'Tester';
-GRANT SELECT ON TABLE `TestTab` TO 'tester';
-GRANT EXECUTE ON FUNCTION `f_Test` TO 'tester';
-GRANT EXECUTE ON FUNCTION `f_Test_denied` TO 'Tester';
-
-SELECT f_Test();
-SELECT * FROM TestTab;
-
-CONNECT (con_tester,localhost,tester,,B48872);
-CONNECT (con_tester_denied,localhost,Tester,,B48872);
-CONNECTION con_tester;
-
-SELECT * FROM TestTab;
-SELECT `f_Test`();
-SELECT `F_TEST`();
-SELECT f_Test();
-SELECT F_TEST();
-
-CONNECTION con_tester_denied;
-
---disable_result_log
---error ER_TABLEACCESS_DENIED_ERROR
-SELECT * FROM TestTab;
---error ER_PROCACCESS_DENIED_ERROR
-SELECT `f_Test`();
---error ER_PROCACCESS_DENIED_ERROR
-SELECT `F_TEST`();
---error ER_PROCACCESS_DENIED_ERROR
-SELECT f_Test();
---error ER_PROCACCESS_DENIED_ERROR
-SELECT F_TEST();
---enable_result_log
-SELECT `f_Test_denied`();
-SELECT `F_TEST_DENIED`();
-
-CONNECTION default;
-DISCONNECT con_tester;
-DISCONNECT con_tester_denied;
-DROP TABLE `TestTab`;
-DROP FUNCTION `f_Test`;
-DROP FUNCTION `f_Test_denied`;
-
-USE test;
-DROP USER 'tester';
-DROP USER 'Tester';
-DROP DATABASE B48872;
-
---echo End of 5.0 tests.
-
-
---echo #
---echo # Test for bug#57061 "User without privilege on routine can discover
---echo # its existence."
---echo #
---disable_warnings
-drop database if exists mysqltest_db;
---enable_warnings
-create database mysqltest_db;
---echo # Create user with no privileges on mysqltest_db database.
-create user bug57061_user@localhost;
-create function mysqltest_db.f1() returns int return 0;
-create procedure mysqltest_db.p1() begin end;
---echo # Connect as user 'bug57061_user@localhost'
-connect (conn1, localhost, bug57061_user,,);
---echo # Attempt to drop routine on which user doesn't have privileges
---echo # should result in the same 'access denied' type of error whether
---echo # routine exists or not.
---error ER_PROCACCESS_DENIED_ERROR
-drop function if exists mysqltest_db.f_does_not_exist;
---error ER_PROCACCESS_DENIED_ERROR
-drop procedure if exists mysqltest_db.p_does_not_exist;
---error ER_PROCACCESS_DENIED_ERROR
-drop function if exists mysqltest_db.f1;
---error ER_PROCACCESS_DENIED_ERROR
-drop procedure if exists mysqltest_db.p1;
---echo # Connection 'default'.
-connection default;
-disconnect conn1;
-drop user bug57061_user@localhost;
-drop database mysqltest_db;
-
-
---echo #
---echo # Bug#11882603 SELECT_ACL ON ANY COLUMN IN MYSQL.PROC ALLOWS TO SEE
---echo # DEFINITION OF ANY ROUTINE.
---echo #
-
---disable_warnings
-DROP DATABASE IF EXISTS db1;
---enable_warnings
-
-CREATE DATABASE db1;
-CREATE PROCEDURE db1.p1() SELECT 1;
-CREATE USER user2@localhost IDENTIFIED BY '';
-GRANT SELECT(db) ON mysql.proc TO user2@localhost;
-
---echo # Connection con2 as user2
-connect (con2, localhost, user2);
---echo # The statement below before disclosed info from body_utf8 column.
---error ER_SP_DOES_NOT_EXIST
-SHOW CREATE PROCEDURE db1.p1;
-
---echo # Check that SHOW works with SELECT grant on whole table
---echo # Connection default
-connection default;
-GRANT SELECT ON mysql.proc TO user2@localhost;
-
---echo # Connection con2
-connection con2;
---echo # This should work
-SHOW CREATE PROCEDURE db1.p1;
-
---echo # Connection default
-connection default;
-disconnect con2;
-DROP USER user2@localhost;
-DROP DATABASE db1;
-
-#
-# Bug#27407480: AUTOMATIC_SP_PRIVILEGES REQUIRES NEED THE INSERT PRIVILEGES FOR MYSQL.USER TABLE
-#
-create user foo@local_ost;
-#
-# Create a user with an authentification plugin 'foobar'.
-# Instead of using a normal "CREATE USER <user> IDENTIFIED VIA <plugin>"
-# we do CREATE (without VIA) followed by UPDATE and FLUSH.
-# This is to avoid installing a real plugin and thus avoid the test dependency.
-# We won't login under this user in the below test, so this is fine.
-#
-create user foo@`local\_ost`;
-update mysql.user set plugin='foobar' where host='local\\_ost';
-flush privileges;
-create database foodb;
-grant create routine on foodb.* to foo@local_ost;
-connect con1,localhost,foo;
-select user(), current_user();
-show grants;
-create procedure fooproc() select 'i am fooproc';
-show grants;
-disconnect con1;
-connection default;
-drop user foo@local_ost;
-drop user foo@`local\_ost`;
-drop procedure fooproc;
-drop database foodb;
-
---echo #
---echo # Test for bug#12602983 - User without privilege on routine can discover
---echo # its existence by executing "select non_existing_func();" or by
---echo # "call non_existing_proc()";
---echo #
---disable_warnings
-drop database if exists mysqltest_db;
---enable_warnings
-create database mysqltest_db;
-create function mysqltest_db.f1() returns int return 0;
-create procedure mysqltest_db.p1() begin end;
-
---echo # Create user with no privileges on mysqltest_db database.
-create user bug12602983_user@localhost;
-
---echo # Connect as user 'bug12602983_user@localhost'
-connect (conn1, localhost, bug12602983_user,,);
-
---echo # Attempt to execute routine on which user doesn't have privileges
---echo # should result in the same 'access denied' error whether
---echo # routine exists or not.
---error ER_PROCACCESS_DENIED_ERROR
-select mysqltest_db.f_does_not_exist();
---error ER_PROCACCESS_DENIED_ERROR
-call mysqltest_db.p_does_not_exist();
-
---error ER_PROCACCESS_DENIED_ERROR
-select mysqltest_db.f1();
---error ER_PROCACCESS_DENIED_ERROR
-call mysqltest_db.p1();
-
---error ER_PROCACCESS_DENIED_ERROR
-create view bug12602983_v1 as select mysqltest_db.f_does_not_exist();
---error ER_PROCACCESS_DENIED_ERROR
-create view bug12602983_v1 as select mysqltest_db.f1();
-
---echo # Connection 'default'.
-connection default;
-disconnect conn1;
-drop user bug12602983_user@localhost;
-drop database mysqltest_db;
-
-# Wait till all disconnects are completed
---source include/wait_until_count_sessions.inc
diff --git a/mysql-test/r/type_float.test b/mysql-test/r/type_float.test
deleted file mode 100644
index 5dfb4a75bb3..00000000000
--- a/mysql-test/r/type_float.test
+++ /dev/null
@@ -1,417 +0,0 @@
-# Description
-# -----------
-# Numeric floating point.
-
---disable_warnings
-drop table if exists t1,t2;
---enable_warnings
-
-SELECT 10,10.0,10.,.1e+2,100.0e-1;
-SELECT 6e-16, -6e-16, --6e-16, -6e-16+1.000000;
-SELECT 1e1,1.e1,1.0e1,1e+1,1.e+1,1.0e+1,1e-1,1.e-1,1.0e-1;
-SELECT 0.001e+1,0.001e-1, -0.001e+01,-0.001e-01;
-SELECT 123.23E+02,-123.23E-02,"123.23E+02"+0.0,"-123.23E-02"+0.0;
-SELECT 2147483647E+02,21474836.47E+06;
-
-create table t1 (f1 float(24),f2 float(52));
-# We mask out Privileges column because it differs for embedded server
---replace_column 8 #
-show full columns from t1;
-insert into t1 values(10,10),(1e+5,1e+5),(1234567890,1234567890),(1e+10,1e+10),(1e+15,1e+15),(1e+20,1e+20),(1e+50,1e+50),(1e+150,1e+150);
-insert into t1 values(-10,-10),(1e-5,1e-5),(1e-10,1e-10),(1e-15,1e-15),(1e-20,1e-20),(1e-50,1e-50),(1e-150,1e-150);
-select * from t1;
-drop table t1;
-
-create table t1 (datum double);
-insert into t1 values (0.5),(1.0),(1.5),(2.0),(2.5);
-select * from t1;
-select * from t1 where datum < 1.5;
-select * from t1 where datum > 1.5;
-select * from t1 where datum = 1.5;
-drop table t1;
-
-create table t1 (a decimal(7,3) not null, key (a));
-insert into t1 values ("0"),("-0.00"),("-0.01"),("-0.002"),("1");
-select a from t1 order by a;
-select min(a) from t1;
-drop table t1;
-
-#
-# BUG#3612, BUG#4393, BUG#4356, BUG#4394
-#
-
-create table t1 (c1 double, c2 varchar(20));
-insert t1 values (121,"16");
-select c1 + c1 * (c2 / 100) as col from t1;
-create table t2 select c1 + c1 * (c2 / 100) as col1, round(c1, 5) as col2, round(c1, 35) as col3, sqrt(c1*1e-15) col4 from t1;
-# Floats are a bit different in PS
---disable_ps_protocol
-select * from t2;
---enable_ps_protocol
-show create table t2;
-drop table t1,t2;
-
-# Bug #1022: When a table contains a 'float' field,
-# and one of the functions MAX, MIN, or AVG is used on that field,
-# the system crashes.
-
-create table t1 (a float);
-insert into t1 values (1);
-select max(a),min(a),avg(a) from t1;
-drop table t1;
-
-#
-# FLOAT/DOUBLE/DECIMAL handling
-#
-
-create table t1 (f float, f2 float(24), f3 float(6,2), d double, d2 float(53), d3 double(10,3), de decimal, de2 decimal(6), de3 decimal(5,2), n numeric, n2 numeric(8), n3 numeric(7,6));
-# We mask out Privileges column because it differs for embedded server
---replace_column 8 #
-show full columns from t1;
-drop table t1;
-
-create table t1 (a decimal(7,3) not null, key (a));
-insert into t1 values ("0"),("-0.00"),("-0.01"),("-0.002"),("1");
-select a from t1 order by a;
-select min(a) from t1;
-drop table t1;
-
---error 1425
-create table t1 (a float(200,100), b double(200,100));
-
-#
-# float in a char(1) field
-#
-create table t1 (c20 char);
-insert into t1 values (5000.0);
-insert into t1 values (0.5e4);
-drop table t1;
-
-# Errors
-
---error 1063
-create table t1 (f float(54)); # Should give an error
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
-# Don't allow 'double unsigned' to be set to a negative value (Bug #7700)
-create table t1 (d1 double, d2 double unsigned);
-insert into t1 set d1 = -1.0;
-update t1 set d2 = d1;
-select * from t1;
-drop table t1;
-
-# Ensure that maximum values as the result of number of decimals
-# being specified in table schema are enforced (Bug #7361)
-create table t1 (f float(4,3));
-insert into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11");
-select * from t1;
-drop table if exists t1;
-create table t1 (f double(4,3));
-insert into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11");
-select * from t1;
-drop table if exists t1;
-
-# Check conversion of floats to character field (Bug #7774)
-create table t1 (c char(20));
-insert into t1 values (5e-28);
-select * from t1;
-drop table t1;
-create table t1 (c char(6));
-insert into t1 values (2e5),(2e6),(2e-4),(2e-5);
-select * from t1;
-drop table t1;
-
-#
-# Test of comparison of integer with float-in-range (Bug #7840)
-# This is needed because some ODBC applications (like Foxpro) uses
-# floats for everything.
-#
-
-CREATE TABLE t1 (
- reckey int unsigned NOT NULL,
- recdesc varchar(50) NOT NULL,
- PRIMARY KEY (reckey)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-
-INSERT INTO t1 VALUES (108, 'Has 108 as key');
-INSERT INTO t1 VALUES (109, 'Has 109 as key');
-select * from t1 where reckey=108;
-select * from t1 where reckey=1.08E2;
-select * from t1 where reckey=109;
-select * from t1 where reckey=1.09E2;
-drop table t1;
-
-#
-# Bug #13372 (decimal union)
-#
-create table t1 (d double(10,1));
-create table t2 (d double(10,9));
-insert into t1 values ("100000000.0");
-insert into t2 values ("1.23456780");
-create table t3 select * from t2 union select * from t1;
-select * from t3;
-show create table t3;
-drop table t1, t2, t3;
-
-
-#
-# Bug #9855 (inconsistent column type for create select
-#
-create table t1 select 105213674794682365.00 + 0.0 x;
-show warnings;
-desc t1;
-drop table t1;
-
-create table t1 select 0.0 x;
-desc t1;
-create table t2 select 105213674794682365.00 y;
-desc t2;
-create table t3 select x+y a from t1,t2;
-show warnings;
-desc t3;
-drop table t1,t2,t3;
-
-#
-# Bug #22129: A small double precision number becomes zero
-#
-# check if underflows are detected correctly
-select 1e-308, 1.00000001e-300, 100000000e-300;
-
-# check if overflows are detected correctly
-select 10e307;
-
-#
-# Bug #19690: ORDER BY eliminates rows from the result
-#
-create table t1(a int, b double(8, 2));
-insert into t1 values
-(1, 28.50), (1, 121.85), (1, 157.23), (1, 1351.00), (1, -1965.35), (1, 81.75),
-(1, 217.08), (1, 7.94), (4, 96.07), (4, 6404.65), (4, -6500.72), (2, 100.00),
-(5, 5.00), (5, -2104.80), (5, 2033.80), (5, 0.07), (5, 65.93),
-(3, -4986.24), (3, 5.00), (3, 4857.34), (3, 123.74), (3, 0.16),
-(6, -1695.31), (6, 1003.77), (6, 499.72), (6, 191.82);
-explain select sum(b) s from t1 group by a;
-select sum(b) s from t1 group by a;
-select sum(b) s from t1 group by a having s <> 0;
-select sum(b) s from t1 group by a having s <> 0 order by s;
-select sum(b) s from t1 group by a having s <=> 0;
-select sum(b) s from t1 group by a having s <=> 0 order by s;
-alter table t1 add key (a, b);
-explain select sum(b) s from t1 group by a;
-select sum(b) s from t1 group by a;
-select sum(b) s from t1 group by a having s <> 0;
-select sum(b) s from t1 group by a having s <> 0 order by s;
-select sum(b) s from t1 group by a having s <=> 0;
-select sum(b) s from t1 group by a having s <=> 0 order by s;
-drop table t1;
-
---echo End of 4.1 tests
-
-#
-# bug #12694 (float(m,d) specifications)
-#
-
---error 1427
-create table t1 (s1 float(0,2));
---error 1427
-create table t1 (s1 float(1,2));
-
-#
-# MySQL Bugs: #11589: mysqltest --ps-protocol, strange output, float/double/real with zerofill
-#
-
-CREATE TABLE t1 (
- f1 real zerofill,
- f2 double zerofill,
- f3 float zerofill);
-INSERT INTO t1 VALUES ( 0.314152e+1, 0.314152e+1, 0.314152e+1);
-
-let $my_stmt= select f1, f2, f3 FROM t1;
-eval PREPARE stmt1 FROM '$my_stmt';
-select f1, f2, f3 FROM t1;
-eval $my_stmt;
-EXECUTE stmt1;
-
-DROP TABLE t1;
-# Bug #28121 "INSERT or UPDATE into DOUBLE(200,0) field being truncated to 31 digits"
-#
-
-create table t1 (f1 double(200, 0));
-insert into t1 values (1e199), (-1e199);
-insert into t1 values (1e200), (-1e200);
-insert into t1 values (2e200), (-2e200);
-select f1 + 0e0 from t1;
-drop table t1;
-
-create table t1 (f1 float(30, 0));
-insert into t1 values (1e29), (-1e29);
-insert into t1 values (1e30), (-1e30);
-insert into t1 values (2e30), (-2e30);
-select f1 + 0e0 from t1;
-drop table t1;
-
-#
-# Bug #12860 "Difference in zero padding of exponent between Unix and Windows"
-#
-
-create table t1 (c char(6));
-insert into t1 values (2e6),(2e-5);
-select * from t1;
-drop table t1;
-
-#
-# Bug #21497 "DOUBLE truncated to unusable value"
-#
-
-CREATE TABLE d1 (d DOUBLE);
-INSERT INTO d1 VALUES (1.7976931348623157E+308);
-SELECT * FROM d1;
---error ER_ILLEGAL_VALUE_FOR_TYPE
-INSERT INTO d1 VALUES (1.79769313486232e+308);
-SELECT * FROM d1;
-DROP TABLE d1;
-
-#
-# Bug #26788 "mysqld (debug) aborts when inserting specific numbers into char
-# fields"
-#
-
-create table t1 (a char(20));
-insert into t1 values (1.225e-05);
-select a+0 from t1;
-drop table t1;
-
-#
-# Bug #27483: Casting 'scientific notation type' to 'unsigned bigint' fails on
-# windows.
-#
-
-create table t1(d double, u bigint unsigned);
-
-insert into t1(d) values (9.22337203685479e18),
- (1.84e19);
-
-update t1 set u = d;
-select u from t1;
-
-drop table t1;
-
-#
-# Bug #21205: Different number of digits for float/doble/real in --ps-protocol
-#
-
-CREATE TABLE t1 (f1 DOUBLE);
-INSERT INTO t1 VALUES(-1.79769313486231e+308);
-SELECT f1 FROM t1;
-DROP TABLE t1;
-
---echo #
---echo # Bug#12406055 BUFFER OVERFLOW OF VARIABLE 'BUFF' IN STRING::SET_REAL
---echo #
-
---echo # Ignoring output from misc. float operations
---disable_result_log
-
-let $nine_65=
-99999999999999999999999999999999999999999999999999999999999999999;
-
-select format(-1.7976931348623157E+307,256) as foo;
-select least(-1.1111111111111111111111111,
- - group_concat(1.7976931348623157E+308)) as foo;
-eval select concat((truncate((-1.7976931348623157E+307),(0x1e))),
- ($nine_65)) into @a;
---enable_result_log
-
---echo End of 5.0 tests
-
---echo #
---echo # Bug#12368853 FORMAT() CRASHES WITH LARGE NUMBERS AFTER TRUNCATE...
---echo #
-
-select format(truncate('1.7976931348623157E+308',-12),1,'fr_BE') as foo;
-
-
---echo #
---echo # MDEV-17249 MAKETIME(-1e50,0,0) returns a wrong result
---echo #
-
-SELECT LEFT('a',EXP(50));
-SELECT LEFT('a', COALESCE(1e30));
-
-CREATE TABLE t1 (a FLOAT);
-INSERT INTO t1 VALUES (1e30);
-SELECT LEFT('a',a), LEFT('a',1e30) FROM t1;
-DROP TABLE t1;
-
-PREPARE stmt FROM 'SELECT LEFT(111,?)';
-SET @a=1e30;
-EXECUTE stmt USING @a;
-DEALLOCATE PREPARE stmt;
-
-CREATE TABLE t1 (a INT);
-INSERT INTO t1 VALUES (1),(2),(3);
-SELECT LEFT('a',(SELECT 1e30 FROM t1 LIMIT 1));
-DROP TABLE t1;
-
-CREATE TABLE t1 (a DOUBLE);
-INSERT INTO t1 VALUES (1e30),(0);
-SELECT LEFT('a', SUM(a)) FROM t1;
-SELECT LEFT('a', AVG(a)) FROM t1;
-DROP TABLE t1;
-
-
---echo #
---echo # Bug #13500371 63704: CONVERSION OF '1.' TO A NUMBER GIVES ERROR 1265
---echo # (WARN_DATA_TRUNCATED)
---echo #
-
-CREATE TABLE t1 (f FLOAT);
-INSERT INTO t1 VALUES ('1.');
-INSERT INTO t1 VALUES ('2.0.');
-INSERT INTO t1 VALUES ('.');
-SELECT * FROM t1 ORDER BY f;
-DROP TABLE t1;
-
-
---echo #
---echo # Start of 10.0 tests
---echo #
-
---echo #
---echo # MDEV-6950 Bad results with joins comparing DATE/DATETIME and INT/DECIMAL/DOUBLE/ENUM/VARCHAR columns
---echo #
-CREATE TABLE t1 (a DATETIME PRIMARY KEY);
-INSERT INTO t1 VALUES ('1999-01-01 00:00:00');
-CREATE TABLE t2 (a DOUBLE);
-INSERT INTO t2 VALUES (19990101000000);
-INSERT INTO t2 VALUES (990101000000);
-SELECT t1.* FROM t1,t2 WHERE t1.a=t2.a;
-SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.a=t2.a;
-ALTER TABLE t2 ADD PRIMARY KEY(a);
-SELECT t1.* FROM t1,t2 WHERE t1.a=t2.a;
-SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.a=t2.a;
---echo # t2 should NOT be eliminated
-EXPLAIN SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.a=t2.a;
-DROP TABLE t1,t2;
-
---echo #
---echo # MDEV-6971 Bad results with joins comparing TIME and DOUBLE/DECIMAL columns
---echo #
-CREATE TABLE t1 (a TIME(6) PRIMARY KEY);
-INSERT INTO t1 VALUES ('10:20:30');
-CREATE TABLE t2 (a DOUBLE);
-INSERT INTO t2 VALUES (102030),(102030.000000001);
-SELECT t1.* FROM t1 JOIN t2 USING(a);
-SELECT t1.* FROM t1 LEFT JOIN t2 USING(a);
-ALTER TABLE t2 ADD PRIMARY KEY(a);
-SELECT t1.* FROM t1 JOIN t2 USING(a);
-SELECT t1.* FROM t1 LEFT JOIN t2 USING(a);
---echo # t2 should NOT be elimitated
-EXPLAIN SELECT t1.* FROM t1 LEFT JOIN t2 USING(a);
-DROP TABLE t1,t2;
-
---echo #
---echo # End of 10.0 tests
---echo #
1
0
revision-id: fefc25bd03e34d775ab7de875dd050792d73bd1a (mariadb-10.1.37-86-gfefc25bd03e)
parent(s): a193c5720ea461ce82390af3fe9c292581242223 d9d83f1d92b696ef56f4944df036b8a78364ebb4
author: Oleksandr Byelkin
committer: Oleksandr Byelkin
timestamp: 2019-02-01 12:35:00 +0100
message:
Merge branch '10.0' into 10.1
CMakeLists.txt | 10 +-
client/mysqltest.cc | 7 +-
cmake/build_configurations/mysql_release.cmake | 1 -
cmake/ssl.cmake | 10 +-
config.h.cmake | 6 +-
include/my_valgrind.h | 4 +-
include/mysql.h | 2 +-
include/mysql.h.pp | 2 +-
mysql-test/disabled.def | 2 +
mysql-test/r/alter_table.test | 1908 ----------------
mysql-test/r/grant.test | 2291 --------------------
mysql-test/r/lowercase_fs_off.test | 124 --
mysql-test/r/mysql.result | 26 +
mysql-test/r/row-checksum-old.result | 16 +
mysql-test/r/row-checksum.result | 16 +
mysql-test/r/sp-security.test | 1069 ---------
mysql-test/r/subselect2.result | 22 +
mysql-test/r/subselect_mat.result | 16 +
mysql-test/r/type_float.test | 417 ----
mysql-test/suite/innodb/r/foreign_key.result | 33 +
mysql-test/suite/innodb/t/foreign_key.test | 31 +
.../perfschema/r/dml_setup_instruments.result | 4 +-
.../suite/perfschema/t/dml_setup_instruments.test | 5 +-
mysql-test/suite/rpl/r/rpl_set_statement.test | 0
.../sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff | 4 +-
.../suite/sys_vars/r/sysvars_innodb,xtradb.rdiff | 4 +-
mysql-test/suite/sys_vars/r/sysvars_innodb.result | 2 +-
mysql-test/t/mysql.test | 22 +
mysql-test/t/row-checksum.test | 17 +
mysql-test/t/subselect2.test | 20 +
mysql-test/t/subselect_mat.test | 13 +
mysys/my_file.c | 7 +-
scripts/mysql_install_db.sh | 19 +-
sql-common/client.c | 30 +-
sql/CMakeLists.txt | 2 +-
sql/log.cc | 6 +-
sql/mysql_install_db.cc | 72 +-
sql/sql_lex.cc | 3 +-
sql/sql_repl.cc | 6 +-
sql/sql_table.cc | 69 +-
sql/sql_yacc.yy | 22 +-
storage/connect/global.h | 6 +-
storage/connect/ha_connect.cc | 4 +-
storage/connect/jsonudf.cpp | 12 +-
.../mysql-test/connect/r/jdbc_oracle.result | 18 +-
.../mysql-test/connect/r/jdbc_postgresql.result | 10 +-
.../connect/mysql-test/connect/r/part_table.result | 4 +-
.../connect/mysql-test/connect/t/part_table.test | 2 +-
storage/connect/plugutil.cpp | 28 +-
storage/connect/reldef.cpp | 11 +-
storage/connect/tabfmt.h | 2 +-
storage/connect/tabjson.cpp | 52 +-
storage/connect/tabjson.h | 8 +-
storage/connect/tabodbc.cpp | 317 +--
storage/connect/tabxml.cpp | 292 +--
storage/connect/tabxml.h | 6 +-
storage/connect/user_connect.cc | 4 +-
storage/innobase/handler/handler0alter.cc | 84 +-
storage/innobase/include/univ.i | 2 +-
storage/innobase/row/row0mysql.cc | 3 -
storage/tokudb/PerconaFT/COPYING.APACHEv2 | 174 ++
storage/tokudb/PerconaFT/README.md | 5 +-
storage/tokudb/PerconaFT/ft/txn/txn_manager.h | 4 +-
.../tokudb/PerconaFT/locktree/concurrent_tree.cc | 14 +
.../tokudb/PerconaFT/locktree/concurrent_tree.h | 14 +
storage/tokudb/PerconaFT/locktree/keyrange.cc | 13 +
storage/tokudb/PerconaFT/locktree/keyrange.h | 13 +
storage/tokudb/PerconaFT/locktree/lock_request.cc | 13 +
storage/tokudb/PerconaFT/locktree/lock_request.h | 13 +
storage/tokudb/PerconaFT/locktree/locktree.cc | 13 +
storage/tokudb/PerconaFT/locktree/locktree.h | 13 +
storage/tokudb/PerconaFT/locktree/manager.cc | 13 +
storage/tokudb/PerconaFT/locktree/range_buffer.cc | 13 +
storage/tokudb/PerconaFT/locktree/range_buffer.h | 13 +
storage/tokudb/PerconaFT/locktree/treenode.cc | 13 +
storage/tokudb/PerconaFT/locktree/treenode.h | 13 +
storage/tokudb/PerconaFT/locktree/txnid_set.cc | 13 +
storage/tokudb/PerconaFT/locktree/txnid_set.h | 13 +
storage/tokudb/PerconaFT/locktree/wfg.cc | 13 +
storage/tokudb/PerconaFT/locktree/wfg.h | 13 +
.../PerconaFT/portability/toku_instr_mysql.cc | 12 +-
.../PerconaFT/portability/toku_instr_mysql.h | 11 +-
.../tokudb/PerconaFT/portability/toku_pthread.h | 78 +-
storage/tokudb/PerconaFT/util/growable_array.h | 13 +
storage/tokudb/PerconaFT/util/omt.cc | 2261 ++++++++++---------
storage/tokudb/PerconaFT/util/omt.h | 13 +
storage/tokudb/ha_tokudb.cc | 10 +
storage/tokudb/hatoku_hton.cc | 4 +-
storage/tokudb/hatoku_hton.h | 1 -
.../tokudb/mysql-test/tokudb_bugs/r/PS-4979.result | 2 +
.../tokudb/mysql-test/tokudb_bugs/t/PS-4979.test | 13 +
storage/tokudb/tokudb_background.cc | 4 +-
storage/tokudb/tokudb_sysvars.cc | 14 +-
storage/tokudb/tokudb_sysvars.h | 4 +-
storage/xtradb/handler/handler0alter.cc | 84 +-
storage/xtradb/include/univ.i | 4 +-
storage/xtradb/log/log0online.cc | 41 +-
storage/xtradb/row/row0mysql.cc | 12 -
support-files/mysql.server.sh | 6 +-
unittest/mysys/thr_template.c | 4 +-
win/packaging/heidisql.cmake | 2 +-
101 files changed, 2761 insertions(+), 7443 deletions(-)
diff --cc CMakeLists.txt
index 53d67813b5c,92c1f9ef060..ef8786aff12
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@@ -235,14 -252,27 +235,20 @@@ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
OPTION(ENABLE_GCOV "Enable gcov (debug, Linux builds only)" OFF)
-IF (ENABLE_GCOV AND NOT WIN32 AND NOT APPLE)
- SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage")
- SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage")
- SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage -lgcov")
+IF (ENABLE_GCOV)
+ MY_CHECK_AND_SET_COMPILER_FLAG("-fprofile-arcs -ftest-coverage -lgcov" DEBUG)
ENDIF()
-MY_CHECK_C_COMPILER_FLAG(-ggdb3 HAVE_GGDB3)
-IF(HAVE_GGDB3)
- SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ggdb3")
- SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb3")
-ENDIF(HAVE_GGDB3)
+MY_CHECK_AND_SET_COMPILER_FLAG(-ggdb3 DEBUG)
- OPTION(ENABLED_LOCAL_INFILE
- "If we should should enable LOAD DATA LOCAL by default" ${IF_WIN})
+ SET(ENABLED_LOCAL_INFILE "AUTO" CACHE STRING "If we should should enable LOAD DATA LOCAL by default (OFF/ON/AUTO)")
-MARK_AS_ADVANCED(ENABLED_LOCAL_INFILE)
+ IF (ENABLED_LOCAL_INFILE MATCHES "^(0|FALSE)$")
+ SET(ENABLED_LOCAL_INFILE OFF)
+ ELSEIF(ENABLED_LOCAL_INFILE MATCHES "^(1|TRUE)$")
+ SET(ENABLED_LOCAL_INFILE ON)
+ ELSEIF (NOT ENABLED_LOCAL_INFILE MATCHES "^(ON|OFF|AUTO)$")
+ MESSAGE(FATAL_ERROR "ENABLED_LOCAL_INFILE must be one of OFF, ON, AUTO")
+ ENDIF()
OPTION(WITH_FAST_MUTEXES "Compile with fast mutexes" OFF)
MARK_AS_ADVANCED(WITH_FAST_MUTEXES)
diff --cc cmake/build_configurations/mysql_release.cmake
index 04860a40dbb,b82b87b6237..b73b44cddc3
--- a/cmake/build_configurations/mysql_release.cmake
+++ b/cmake/build_configurations/mysql_release.cmake
@@@ -81,13 -82,21 +81,12 @@@ IF(FEATURE_SET
# better no set this, otherwise server would be linked
# statically with experimental stuff like audit_null
ENDIF()
-
- # Update cache with current values, remove engines we do not care about
- # from build.
- FOREACH(eng ARCHIVE BLACKHOLE FEDERATED INNOBASE PARTITION)
- IF(NOT WITH_${eng}_STORAGE_ENGINE)
- SET(WITHOUT_${eng}_STORAGE_ENGINE ON CACHE BOOL "")
- MARK_AS_ADVANCED(WITHOUT_${eng}_STORAGE_ENGINE)
- SET(WITH_${eng}_STORAGE_ENGINE OFF CACHE BOOL "")
- ELSE()
- SET(WITH_${eng}_STORAGE_ENGINE ON CACHE BOOL "")
- ENDIF()
- ENDFOREACH()
ENDIF()
- OPTION(ENABLED_LOCAL_INFILE "" ON)
-IF(RPM)
+SET(WITH_INNODB_SNAPPY OFF CACHE STRING "")
+IF(WIN32)
+ SET(WITH_LIBARCHIVE STATIC CACHE STRING "")
+ELSEIF(RPM)
SET(WITH_SSL system CACHE STRING "")
SET(WITH_ZLIB system CACHE STRING "")
SET(CHECKMODULE /usr/bin/checkmodule CACHE STRING "")
diff --cc cmake/ssl.cmake
index 24e18600402,6985932d165..308f725a02d
--- a/cmake/ssl.cmake
+++ b/cmake/ssl.cmake
@@@ -173,17 -173,31 +173,25 @@@ MACRO (MYSQL_CHECK_SSL
"^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9][0-9][0-9]).*$" "\\1"
OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}"
)
- INCLUDE(CheckSymbolExists)
- INCLUDE(CheckCSourceCompiles)
- SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
- CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h"
- HAVE_SHA512_DIGEST_LENGTH)
- CHECK_C_SOURCE_COMPILES("
- #include <openssl/dh.h>
- int main()
- {
- DH dh;
- return sizeof(dh.version);
- }" OLD_OPENSSL_API)
-
- SET(OPENSSL_FOUND TRUE)
- ELSE()
- SET(OPENSSL_FOUND FALSE)
- ENDIF()
-
- IF(OPENSSL_FOUND AND OLD_OPENSSL_API AND
- HAVE_SHA512_DIGEST_LENGTH)
- MESSAGE(STATUS "OPENSSL_INCLUDE_DIR = ${OPENSSL_INCLUDE_DIR}")
- MESSAGE(STATUS "OPENSSL_LIBRARIES = ${OPENSSL_LIBRARIES}")
- MESSAGE(STATUS "CRYPTO_LIBRARY = ${CRYPTO_LIBRARY}")
MESSAGE(STATUS "OPENSSL_MAJOR_VERSION = ${OPENSSL_MAJOR_VERSION}")
+ ENDIF()
+ INCLUDE(CheckSymbolExists)
++ INCLUDE(CheckCSourceCompiles)
+ SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
+ CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h"
+ HAVE_SHA512_DIGEST_LENGTH)
++ CHECK_C_SOURCE_COMPILES("
++ #include <openssl/dh.h>
++ int main()
++ {
++ DH dh;
++ return sizeof(dh.version);
++ }" OLD_OPENSSL_API)
+ SET(CMAKE_REQUIRED_INCLUDES)
+ IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND
- OPENSSL_MAJOR_VERSION STRLESS "101" AND
++ OLD_OPENSSL_API AND
+ CRYPTO_LIBRARY AND HAVE_SHA512_DIGEST_LENGTH)
SET(SSL_SOURCES "")
SET(SSL_LIBRARIES ${OPENSSL_LIBRARIES} ${CRYPTO_LIBRARY})
diff --cc config.h.cmake
index 52d837fad2a,c22638a6cc0..3750ab717f8
--- a/config.h.cmake
+++ b/config.h.cmake
@@@ -544,9 -536,14 +544,13 @@@
/*
MySQL features
*/
- #cmakedefine ENABLED_LOCAL_INFILE 1
+ #define LOCAL_INFILE_MODE_OFF 0
+ #define LOCAL_INFILE_MODE_ON 1
+ #define LOCAL_INFILE_MODE_AUTO 2
+ #define ENABLED_LOCAL_INFILE LOCAL_INFILE_MODE_@ENABLED_LOCAL_INFILE@
+
#cmakedefine ENABLED_PROFILING 1
#cmakedefine EXTRA_DEBUG 1
-#cmakedefine BACKUP_TEST 1
#cmakedefine CYBOZU 1
#cmakedefine USE_SYMDIR 1
diff --cc mysql-test/disabled.def
index b489139a59f,9292081b45e..b72f07d0345
--- a/mysql-test/disabled.def
+++ b/mysql-test/disabled.def
@@@ -17,7 -17,6 +17,9 @@@ mysql_embedded : Bug#1256129
ssl_crl_clients_valid : broken upstream
ssl_crl : broken upstream
ssl_crl_clrpath : broken upstream
+innodb-wl5522-debug-zip : broken upstream
+innodb_bug12902967 : broken upstream
file_contents : MDEV-6526 these files are not installed anymore
+max_statement_time : cannot possibly work, depends on timing
+ lowercase_fs_on : lower_case_table_names=0 is not an error until 10.1
+ partition_open_files_limit : open_files_limit check broken by MDEV-18360
diff --cc mysql-test/r/subselect_mat.result
index ac117093133,7907b86135e..6fae057dd17
--- a/mysql-test/r/subselect_mat.result
+++ b/mysql-test/r/subselect_mat.result
@@@ -2865,17 -2823,18 +2865,33 @@@ SELECT * FROM t2 WHERE f IN ( SELECT LE
f
DROP TABLE t1, t2;
#
+ # MDEV-18255: Server crashes in Bitmap<64u>::intersect
+ #
+ create table t1 (v1 varchar(1)) engine=myisam ;
+ create table t2 (v1 varchar(1)) engine=myisam ;
+ explain
+ select 1 from t1 where exists
+ (select 1 from t1 where t1.v1 in (select t2.v1 from t2 having t2.v1 < 'j')) ;
+ id select_type table type possible_keys key key_len ref rows Extra
+ 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+ 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+ 3 MATERIALIZED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+ select 1 from t1 where exists
+ (select 1 from t1 where t1.v1 in (select t2.v1 from t2 having t2.v1 < 'j')) ;
+ 1
+ drop table t1,t2;
++#
+# MDEV-9489: Assertion `0' failed in Protocol::end_statement() on
+# UNION ALL
+#
+CREATE TABLE t1 (f1 INT);
+CREATE TABLE t2 (f2 INT);
+INSERT INTO t1 VALUES (1),(2);
+( SELECT 1 FROM t1 WHERE f1 NOT IN ( SELECT f2 FROM t2 ) LIMIT 0 )
+UNION ALL
+( SELECT 1 FROM t1 WHERE f1 NOT IN ( SELECT f2 FROM t2 ) )
+;
+1
+1
+1
+drop table t1, t2;
diff --cc mysql-test/suite/perfschema/r/dml_setup_instruments.result
index ce1cdf1884e,8d561c48828..14ed8eb2def
--- a/mysql-test/suite/perfschema/r/dml_setup_instruments.result
+++ b/mysql-test/suite/perfschema/r/dml_setup_instruments.result
@@@ -11,12 -11,14 +11,14 @@@ wait/synch/mutex/sql/gtid_waiting::LOCK
wait/synch/mutex/sql/hash_filo::lock YES YES
wait/synch/mutex/sql/HA_DATA_PARTITION::LOCK_auto_inc YES YES
wait/synch/mutex/sql/LOCK_active_mi YES YES
+wait/synch/mutex/sql/LOCK_after_binlog_sync YES YES
wait/synch/mutex/sql/LOCK_audit_mask YES YES
wait/synch/mutex/sql/LOCK_binlog_state YES YES
-wait/synch/mutex/sql/LOCK_commit_ordered YES YES
select * from performance_schema.setup_instruments
where name like 'Wait/Synch/Rwlock/sql/%'
- and name not in ('wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock')
+ and name not in (
+ 'wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock',
+ 'wait/synch/rwlock/sql/LOCK_named_pipe_full_access_group')
order by name limit 10;
NAME ENABLED TIMED
wait/synch/rwlock/sql/LOCK_dboptions YES YES
diff --cc mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff
index 73dd57ed1fb,00000000000..2019c4dc616
mode 100644,000000..100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff
@@@ -1,1236 -1,0 +1,1236 @@@
+--- suite/sys_vars/r/sysvars_innodb.result
++++ suite/sys_vars/r/sysvars_innodb,32bit.reject
+@@ -47,13 +47,27 @@
+ ENUM_VALUE_LIST OFF,ON
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_ADAPTIVE_HASH_INDEX_PARTITIONS
++SESSION_VALUE NULL
++GLOBAL_VALUE 1
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 1
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE INT UNSIGNED
++VARIABLE_COMMENT Number of InnoDB adaptive hash index partitions (default 1: disable partitioning)
++NUMERIC_MIN_VALUE 1
++NUMERIC_MAX_VALUE 32
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY YES
++COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME INNODB_ADAPTIVE_MAX_SLEEP_DELAY
+ SESSION_VALUE NULL
+ GLOBAL_VALUE 150000
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 150000
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT The upper limit of the sleep delay in usec. Value of 0 disables it.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 1000000
+@@ -67,10 +81,10 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 8388608
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
+ VARIABLE_COMMENT DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator. Size of a memory pool InnoDB uses to store data dictionary information and other internal data structures.
+ NUMERIC_MIN_VALUE 524288
+-NUMERIC_MAX_VALUE 9223372036854775807
++NUMERIC_MAX_VALUE 2147483647
+ NUMERIC_BLOCK_SIZE 1024
+ ENUM_VALUE_LIST NULL
+ READ_ONLY YES
+@@ -81,7 +95,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 5
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Background commit interval in seconds
+ NUMERIC_MIN_VALUE 1
+ NUMERIC_MAX_VALUE 1073741824
+@@ -137,7 +151,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT InnoDB API transaction isolation level
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 3
+@@ -151,7 +165,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 64
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Data file autoextend increment in megabytes
+ NUMERIC_MIN_VALUE 1
+ NUMERIC_MAX_VALUE 1000
+@@ -165,7 +179,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 1
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
+ VARIABLE_COMMENT 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)
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 2
+@@ -263,7 +277,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 100
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Dump only the hottest N% of each buffer pool, defaults to 100
+ NUMERIC_MIN_VALUE 1
+ NUMERIC_MAX_VALUE 100
+@@ -305,7 +319,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
+ VARIABLE_COMMENT Number of buffer pool instances, set to higher value on high-end machines to increase scalability
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 64
+@@ -355,6 +369,20 @@
+ ENUM_VALUE_LIST OFF,ON
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_BUFFER_POOL_POPULATE
++SESSION_VALUE NULL
++GLOBAL_VALUE OFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE OFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT Deprecated. This option has no effect and will be removed in MariaDB 10.2.3.
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY YES
++COMMAND_LINE_ARGUMENT NONE
+ VARIABLE_NAME INNODB_BUFFER_POOL_SIZE
+ SESSION_VALUE NULL
+ GLOBAL_VALUE 8388608
+@@ -375,7 +403,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT A number between [0, 100] that tells how oftern buffer pool dump status in percentages should be printed. E.g. 10 means that buffer pool dump status is printed when every 10% of number of buffer pool pages are dumped. Default is 0 (only start and end status is printed).
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 100
+@@ -446,7 +474,7 @@
+ DEFAULT_VALUE ON
+ VARIABLE_SCOPE GLOBAL
+ VARIABLE_TYPE BOOLEAN
+-VARIABLE_COMMENT DEPRECATED. Use innodb_checksum_algorithm=NONE instead of setting this to OFF. Enable InnoDB checksums validation (enabled by default). Disable with --skip-innodb-checksums.
++VARIABLE_COMMENT DEPRECATED. Use innodb_checksum_algorithm=NONE instead of setting this to OFF
+ NUMERIC_MIN_VALUE NULL
+ NUMERIC_MAX_VALUE NULL
+ NUMERIC_BLOCK_SIZE NULL
+@@ -467,6 +495,104 @@
+ ENUM_VALUE_LIST CRC32,STRICT_CRC32,INNODB,STRICT_INNODB,NONE,STRICT_NONE
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_CLEANER_EVICTION_FACTOR
++SESSION_VALUE NULL
++GLOBAL_VALUE OFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE OFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT Make page cleaner LRU flushes use evicted instead of flushed page counts for its heuristics
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_CLEANER_FLUSH_CHUNK_SIZE
++SESSION_VALUE NULL
++GLOBAL_VALUE 100
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 100
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE INT UNSIGNED
++VARIABLE_COMMENT Divide page cleaner flush list flush batches into chunks of this size
++NUMERIC_MIN_VALUE 1
++NUMERIC_MAX_VALUE 4294967295
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_CLEANER_FREE_LIST_LWM
++SESSION_VALUE NULL
++GLOBAL_VALUE 10
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 10
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE INT UNSIGNED
++VARIABLE_COMMENT Page cleaner will keep on flushing the same buffer pool instance if its free list length is below this percentage of innodb_lru_scan_depth
++NUMERIC_MIN_VALUE 0
++NUMERIC_MAX_VALUE 100
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_CLEANER_LRU_CHUNK_SIZE
++SESSION_VALUE NULL
++GLOBAL_VALUE 100
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 100
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE INT UNSIGNED
++VARIABLE_COMMENT Divide page cleaner LRU list flush batches into chunks of this size
++NUMERIC_MIN_VALUE 1
++NUMERIC_MAX_VALUE 4294967295
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_CLEANER_LSN_AGE_FACTOR
++SESSION_VALUE NULL
++GLOBAL_VALUE HIGH_CHECKPOINT
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE HIGH_CHECKPOINT
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE ENUM
++VARIABLE_COMMENT The formula for LSN age factor for page cleaner adaptive flushing. LEGACY: Original Oracle MySQL 5.6 formula. HIGH_CHECKPOINT: (the default) Percona Server 5.6 formula.
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST LEGACY,HIGH_CHECKPOINT
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_CLEANER_MAX_FLUSH_TIME
++SESSION_VALUE NULL
++GLOBAL_VALUE 1000
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 1000
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE INT UNSIGNED
++VARIABLE_COMMENT The maximum time limit for a single flush list flush iteration by the page cleaner thread in miliseconds
++NUMERIC_MIN_VALUE 0
++NUMERIC_MAX_VALUE 4294967295
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_CLEANER_MAX_LRU_TIME
++SESSION_VALUE NULL
++GLOBAL_VALUE 1000
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 1000
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE INT UNSIGNED
++VARIABLE_COMMENT The maximum time limit for a single LRU tail flush iteration by the page cleaner thread in miliseconds
++NUMERIC_MIN_VALUE 0
++NUMERIC_MAX_VALUE 4294967295
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME INNODB_CMP_PER_INDEX_ENABLED
+ SESSION_VALUE NULL
+ GLOBAL_VALUE OFF
+@@ -487,7 +613,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 1000
+@@ -515,7 +641,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 5
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT If the compression failure rate of a table is greater than this number more padding is added to the pages to reduce the failures. A value of zero implies no padding
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 100
+@@ -543,7 +669,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 50
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Percentage of empty space on a data page that can be reserved to make the page compressible.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 75
+@@ -557,14 +683,28 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 5000
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Number of times a thread is allowed to enter InnoDB within the same SQL query after it has once got the ticket
+ NUMERIC_MIN_VALUE 1
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 0
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_CORRUPT_TABLE_ACTION
++SESSION_VALUE NULL
++GLOBAL_VALUE assert
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE assert
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE ENUM
++VARIABLE_COMMENT Warn corruptions of user tables as 'corrupt table' instead of not crashing itself, when used with file_per_table. All file io for the datafile after detected as corrupt are disabled, except for the deletion.
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST assert,warn,salvage
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME INNODB_DATA_FILE_PATH
+ SESSION_VALUE NULL
+ GLOBAL_VALUE ibdata1:12M:autoextend
+@@ -781,7 +921,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 120
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Number of pages reserved in doublewrite buffer for batch flushing
+ NUMERIC_MIN_VALUE 1
+ NUMERIC_MAX_VALUE 127
+@@ -789,6 +929,20 @@
+ ENUM_VALUE_LIST NULL
+ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_EMPTY_FREE_LIST_ALGORITHM
++SESSION_VALUE NULL
++GLOBAL_VALUE LEGACY
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE BACKOFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE ENUM
++VARIABLE_COMMENT The algorithm to use for empty free list handling. Allowed values: LEGACY: Original Oracle MySQL 5.6 handling with single page flushes; BACKOFF: (default) Wait until cleaner produces a free page.
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST LEGACY,BACKOFF
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME INNODB_ENCRYPTION_ROTATE_KEY_AGE
+ SESSION_VALUE NULL
+ GLOBAL_VALUE 1
+@@ -859,13 +1013,27 @@
+ ENUM_VALUE_LIST OFF,ON,FORCE
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_FAKE_CHANGES
++SESSION_VALUE OFF
++GLOBAL_VALUE OFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE OFF
++VARIABLE_SCOPE SESSION
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT In the transaction after enabled, UPDATE, INSERT and DELETE only move the cursor to the records and do nothing other operations (no changes, no ibuf, no undo, no transaction log) in the transaction. This is to cause replication prefetch IO. ATTENTION: the transaction started after enabled is affected.
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME INNODB_FAST_SHUTDOWN
+ SESSION_VALUE NULL
+ GLOBAL_VALUE 1
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 1
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Speeds up the shutdown process of the InnoDB storage engine. Possible values are 0, 1 (faster) or 2 (fastest - crash-like).
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 2
+@@ -879,7 +1047,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 600
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Maximum number of seconds that semaphore times out in InnoDB.
+ NUMERIC_MIN_VALUE 1
+ NUMERIC_MAX_VALUE 4294967295
+@@ -949,7 +1117,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Make the first page of the given tablespace dirty.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 4294967295
+@@ -963,7 +1131,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 30
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Number of iterations over which the background flushing is averaged.
+ NUMERIC_MIN_VALUE 1
+ NUMERIC_MAX_VALUE 1000
+@@ -986,12 +1154,12 @@
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME INNODB_FLUSH_LOG_AT_TRX_COMMIT
+-SESSION_VALUE NULL
++SESSION_VALUE 1
+ GLOBAL_VALUE 1
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 1
+-VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_SCOPE SESSION
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Controls the durability/speed trade-off for commits. Set to 0 (write and flush redo log to disk only once per second), 1 (flush to disk at each commit), 2 (write to log at commit but flush to disk only once per second) or 3 (flush to disk at prepare and at commit, slower and usually redundant). 1 and 3 guarantees that after a crash, committed transactions will not be lost and will be consistent with the binlog and other transactional engines. 2 can get inconsistent and lose transactions if there is a power failure or kernel crash but not if mysqld crashes. 0 has no guarantees in case of crash. 0 and 2 can be faster than 1 or 3.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 3
+@@ -1019,7 +1187,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 1
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Set to 0 (don't flush neighbors from buffer pool), 1 (flush contiguous neighbors from buffer pool) or 2 (flush neighbors from buffer pool), when flushing a block
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 2
+@@ -1061,7 +1229,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Helps to save your data in case the disk image of the database becomes corrupt.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 6
+@@ -1069,6 +1237,20 @@
+ ENUM_VALUE_LIST NULL
+ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_FOREGROUND_PREFLUSH
++SESSION_VALUE NULL
++GLOBAL_VALUE EXPONENTIAL_BACKOFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE EXPONENTIAL_BACKOFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE ENUM
++VARIABLE_COMMENT The algorithm InnoDB uses for the query threads at sync preflush. Possible values are SYNC_PREFLUSH: perform a sync preflush as Oracle MySQL; EXPONENTIAL_BACKOFF: (default) wait for the page cleaner flush.
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST SYNC_PREFLUSH,EXPONENTIAL_BACKOFF
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME INNODB_FT_AUX_TABLE
+ SESSION_VALUE NULL
+ GLOBAL_VALUE
+@@ -1089,7 +1271,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 8000000
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT InnoDB Fulltext search cache size in bytes
+ NUMERIC_MIN_VALUE 1600000
+ NUMERIC_MAX_VALUE 80000000
+@@ -1131,7 +1313,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 84
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT InnoDB Fulltext search maximum token size in characters
+ NUMERIC_MIN_VALUE 10
+ NUMERIC_MAX_VALUE 84
+@@ -1145,7 +1327,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 3
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT InnoDB Fulltext search minimum token size in characters
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 16
+@@ -1159,7 +1341,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 2000
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT InnoDB Fulltext search number of words to optimize for each optimize table call
+ NUMERIC_MIN_VALUE 1000
+ NUMERIC_MAX_VALUE 10000
+@@ -1173,10 +1355,10 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 2000000000
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT InnoDB Fulltext search query result cache limit in bytes
+ NUMERIC_MIN_VALUE 1000000
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 0
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+@@ -1201,7 +1383,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 2
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT InnoDB Fulltext search parallel sort degree, will round up to nearest power of 2 number
+ NUMERIC_MIN_VALUE 1
+ NUMERIC_MAX_VALUE 16
+@@ -1215,7 +1397,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 640000000
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Total memory allocated for InnoDB Fulltext Search cache
+ NUMERIC_MIN_VALUE 32000000
+ NUMERIC_MAX_VALUE 1600000000
+@@ -1243,7 +1425,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 100
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Up to what percentage of dirty pages should be flushed when innodb finds it has spare resources to do so.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 100
+@@ -1285,10 +1467,10 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 200
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Number of IOPs the server can do. Tunes the background IO rate
+ NUMERIC_MIN_VALUE 100
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 0
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+@@ -1297,12 +1479,26 @@
+ SESSION_VALUE NULL
+ GLOBAL_VALUE 2000
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+-DEFAULT_VALUE 18446744073709551615
++DEFAULT_VALUE 4294967295
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Limit to which innodb_io_capacity can be inflated.
+ NUMERIC_MIN_VALUE 100
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_KILL_IDLE_TRANSACTION
++SESSION_VALUE NULL
++GLOBAL_VALUE 0
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 0
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BIGINT
++VARIABLE_COMMENT No effect for this build.
++NUMERIC_MIN_VALUE 0
++NUMERIC_MAX_VALUE 2147483647
+ NUMERIC_BLOCK_SIZE 0
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+@@ -1335,6 +1531,20 @@
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_LOCKING_FAKE_CHANGES
++SESSION_VALUE NULL
++GLOBAL_VALUE ON
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE ON
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT ###EXPERIMENTAL### if enabled, transactions will get S row locks instead of X locks for fake changes. If disabled, fake change transactions will not take any locks at all.
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT NONE
+ VARIABLE_NAME INNODB_LOCKS_UNSAFE_FOR_BINLOG
+ SESSION_VALUE NULL
+ GLOBAL_VALUE OFF
+@@ -1369,7 +1579,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 50
+ VARIABLE_SCOPE SESSION
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.
+ NUMERIC_MIN_VALUE 1
+ NUMERIC_MAX_VALUE 1073741824
+@@ -1377,16 +1587,72 @@
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_LOG_ARCHIVE
++SESSION_VALUE NULL
++GLOBAL_VALUE OFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE OFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT Set to 1 if you want to have logs archived.
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_LOG_ARCH_DIR
++SESSION_VALUE NULL
++GLOBAL_VALUE PATH
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE VARCHAR
++VARIABLE_COMMENT Where full logs should be archived.
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST NULL
++READ_ONLY YES
++COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_LOG_ARCH_EXPIRE_SEC
++SESSION_VALUE NULL
++GLOBAL_VALUE 0
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 0
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE INT UNSIGNED
++VARIABLE_COMMENT Expiration time for archived innodb transaction logs.
++NUMERIC_MIN_VALUE 0
++NUMERIC_MAX_VALUE 4294967295
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_LOG_BLOCK_SIZE
++SESSION_VALUE NULL
++GLOBAL_VALUE 512
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 512
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE INT UNSIGNED
++VARIABLE_COMMENT ###EXPERIMENTAL###: The log block size of the transaction log file. Changing for created log file is not supported. Use on your own risk!
++NUMERIC_MIN_VALUE 512
++NUMERIC_MAX_VALUE 65536
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY YES
++COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME INNODB_LOG_BUFFER_SIZE
+ SESSION_VALUE NULL
+ GLOBAL_VALUE 1048576
+ GLOBAL_VALUE_ORIGIN CONFIG
+ DEFAULT_VALUE 16777216
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
+ VARIABLE_COMMENT The size of the buffer which InnoDB uses to write log to the log files on disk.
+ NUMERIC_MIN_VALUE 262144
+-NUMERIC_MAX_VALUE 9223372036854775807
++NUMERIC_MAX_VALUE 2147483647
+ NUMERIC_BLOCK_SIZE 1024
+ ENUM_VALUE_LIST NULL
+ READ_ONLY YES
+@@ -1405,6 +1671,20 @@
+ ENUM_VALUE_LIST OFF,ON
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_LOG_CHECKSUM_ALGORITHM
++SESSION_VALUE NULL
++GLOBAL_VALUE INNODB
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE INNODB
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE ENUM
++VARIABLE_COMMENT The algorithm InnoDB uses for log block checksums. Possible values are CRC32 (hardware accelerated if the CPU supports it) write crc32, allow any of the other checksums to match when reading; STRICT_CRC32 write crc32, do not allow other algorithms to match when reading; INNODB write a software calculated checksum, allow any other checksums to match when reading; STRICT_INNODB write a software calculated checksum, do not allow other algorithms to match when reading; NONE write a constant magic number, do not do any checksum verification when reading (same as innodb_checksums=OFF); STRICT_NONE write a constant magic number, do not allow values other than that magic number when reading; Logs created when this option is set to crc32/strict_crc32/none/strict_none will not be readable by any MySQL version or Percona Server versions that donot support this feature
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST CRC32,STRICT_CRC32,INNODB,STRICT_INNODB,NONE,STRICT_NONE
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME INNODB_LOG_COMPRESSED_PAGES
+ SESSION_VALUE NULL
+ GLOBAL_VALUE ON
+@@ -1425,7 +1705,7 @@
+ GLOBAL_VALUE_ORIGIN CONFIG
+ DEFAULT_VALUE 2
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Number of log files in the log group. InnoDB writes to the files in a circular fashion.
+ NUMERIC_MIN_VALUE 2
+ NUMERIC_MAX_VALUE 100
+@@ -1467,9 +1747,37 @@
+ GLOBAL_VALUE_ORIGIN CONFIG
+ DEFAULT_VALUE 1024
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT How deep to scan LRU to keep it clean
+ NUMERIC_MIN_VALUE 100
++NUMERIC_MAX_VALUE 4294967295
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_MAX_BITMAP_FILE_SIZE
++SESSION_VALUE NULL
++GLOBAL_VALUE 104857600
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 104857600
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_COMMENT The maximum size of changed page bitmap files
++NUMERIC_MIN_VALUE 4096
++NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_MAX_CHANGED_PAGES
++SESSION_VALUE NULL
++GLOBAL_VALUE 1000000
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 1000000
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_COMMENT The maximum number of rows for INFORMATION_SCHEMA.INNODB_CHANGED_PAGES table, 0 - unlimited
++NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 18446744073709551615
+ NUMERIC_BLOCK_SIZE 0
+ ENUM_VALUE_LIST NULL
+@@ -1509,10 +1817,10 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Desired maximum length of the purge queue (0 = no limit)
+ NUMERIC_MIN_VALUE 0
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 0
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+@@ -1523,7 +1831,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Maximum delay of user threads in micro-seconds
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 10000000
+@@ -1537,7 +1845,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
+ VARIABLE_COMMENT Number of identical copies of log groups we keep for the database. Currently this should be set to 1.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 10
+@@ -1607,7 +1915,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 8
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
+ VARIABLE_COMMENT Number of multi-threaded flush threads
+ NUMERIC_MIN_VALUE 1
+ NUMERIC_MAX_VALUE 64
+@@ -1659,14 +1967,14 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME INNODB_OPEN_FILES
+ SESSION_VALUE NULL
+-GLOBAL_VALUE 2000
++GLOBAL_VALUE 300
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT
++VARIABLE_TYPE INT
+ VARIABLE_COMMENT How many files at the maximum InnoDB keeps open at the same time.
+ NUMERIC_MIN_VALUE 0
+-NUMERIC_MAX_VALUE 9223372036854775807
++NUMERIC_MAX_VALUE 2147483647
+ NUMERIC_BLOCK_SIZE 0
+ ENUM_VALUE_LIST NULL
+ READ_ONLY YES
+@@ -1691,7 +1999,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 16
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Number of rw_locks protecting buffer pool page_hash. Rounded up to the next power of 2
+ NUMERIC_MIN_VALUE 1
+ NUMERIC_MAX_VALUE 1024
+@@ -1705,7 +2013,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 16384
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Page size to use for all InnoDB tablespaces.
+ NUMERIC_MIN_VALUE 4096
+ NUMERIC_MAX_VALUE 65536
+@@ -1741,13 +2049,83 @@
+ ENUM_VALUE_LIST OFF,ON
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_PRINT_LOCK_WAIT_TIMEOUT_INFO
++SESSION_VALUE NULL
++GLOBAL_VALUE OFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE OFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT Print lock wait timeout info to MySQL error log (off by default)
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_PRIORITY_CLEANER
++SESSION_VALUE NULL
++GLOBAL_VALUE OFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE OFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT Make buffer pool cleaner and LRU manager threads acquire shared resources with priority
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_PRIORITY_IO
++SESSION_VALUE NULL
++GLOBAL_VALUE OFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE OFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT Make I/O threads acquire shared resources with priority
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_PRIORITY_MASTER
++SESSION_VALUE NULL
++GLOBAL_VALUE OFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE OFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT Make buffer pool cleaner thread acquire shared resources with priority
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_PRIORITY_PURGE
++SESSION_VALUE NULL
++GLOBAL_VALUE OFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE OFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT Make purge coordinator and worker threads acquire shared resources with priority
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME INNODB_PURGE_BATCH_SIZE
+ SESSION_VALUE NULL
+ GLOBAL_VALUE 300
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 300
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Number of UNDO log pages to purge in one batch from the history list.
+ NUMERIC_MIN_VALUE 1
+ NUMERIC_MAX_VALUE 5000
+@@ -1789,7 +2167,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 1
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Purge threads can be from 1 to 32. Default is 1.
+ NUMERIC_MIN_VALUE 1
+ NUMERIC_MAX_VALUE 32
+@@ -1817,7 +2195,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 56
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Number of pages that must be accessed sequentially for InnoDB to trigger a readahead.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 64
+@@ -1831,7 +2209,7 @@
+ GLOBAL_VALUE_ORIGIN CONFIG
+ DEFAULT_VALUE 4
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Number of background read I/O threads in InnoDB.
+ NUMERIC_MIN_VALUE 1
+ NUMERIC_MAX_VALUE 64
+@@ -1859,10 +2237,10 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Replication thread delay (ms) on the slave server if innodb_thread_concurrency is reached (0 by default)
+ NUMERIC_MIN_VALUE 0
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 0
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+@@ -1887,7 +2265,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 128
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Number of undo logs to use (deprecated).
+ NUMERIC_MIN_VALUE 1
+ NUMERIC_MAX_VALUE 128
+@@ -1901,7 +2279,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT An InnoDB page number.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 4294967295
+@@ -1909,6 +2287,48 @@
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_SCHED_PRIORITY_IO
++SESSION_VALUE NULL
++GLOBAL_VALUE 19
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 19
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE INT UNSIGNED
++VARIABLE_COMMENT Nice value for the I/O handler thread scheduling
++NUMERIC_MIN_VALUE 0
++NUMERIC_MAX_VALUE 39
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_SCHED_PRIORITY_MASTER
++SESSION_VALUE NULL
++GLOBAL_VALUE 19
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 19
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE INT UNSIGNED
++VARIABLE_COMMENT Nice value for the master thread scheduling
++NUMERIC_MIN_VALUE 0
++NUMERIC_MAX_VALUE 39
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_SCHED_PRIORITY_PURGE
++SESSION_VALUE NULL
++GLOBAL_VALUE 19
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 19
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE INT UNSIGNED
++VARIABLE_COMMENT Nice value for the purge thread scheduling
++NUMERIC_MIN_VALUE 0
++NUMERIC_MAX_VALUE 39
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME INNODB_SCRUB_LOG
+ SESSION_VALUE NULL
+ GLOBAL_VALUE OFF
+@@ -1937,6 +2357,34 @@
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_SHOW_LOCKS_HELD
++SESSION_VALUE NULL
++GLOBAL_VALUE 10
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 10
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE INT UNSIGNED
++VARIABLE_COMMENT Number of locks held to print for each InnoDB transaction in SHOW INNODB STATUS.
++NUMERIC_MIN_VALUE 0
++NUMERIC_MAX_VALUE 1000
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_SHOW_VERBOSE_LOCKS
++SESSION_VALUE NULL
++GLOBAL_VALUE 0
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 0
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE INT UNSIGNED
++VARIABLE_COMMENT Whether to show records locked in SHOW INNODB STATUS.
++NUMERIC_MIN_VALUE 0
++NUMERIC_MAX_VALUE 1
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME INNODB_SIMULATE_COMP_FAILURES
+ SESSION_VALUE NULL
+ GLOBAL_VALUE 0
+@@ -1957,7 +2405,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 1048576
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Memory buffer size for index creation
+ NUMERIC_MIN_VALUE 65536
+ NUMERIC_MAX_VALUE 67108864
+@@ -1971,10 +2419,10 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 6
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Maximum delay between polling for a spin lock (6 by default)
+ NUMERIC_MIN_VALUE 0
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 0
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+@@ -2014,7 +2462,7 @@
+ DEFAULT_VALUE nulls_equal
+ VARIABLE_SCOPE GLOBAL
+ VARIABLE_TYPE ENUM
+-VARIABLE_COMMENT Specifies how InnoDB index statistics collection code should treat NULLs. Possible values are NULLS_EQUAL (default), NULLS_UNEQUAL and NULLS_IGNORED
++VARIABLE_COMMENT Specifies how InnoDB index statistics collection code should treat NULLs
+ NUMERIC_MIN_VALUE NULL
+ NUMERIC_MAX_VALUE NULL
+ NUMERIC_BLOCK_SIZE NULL
+@@ -2181,7 +2629,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 1
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Size of the mutex/lock wait array.
+ NUMERIC_MIN_VALUE 1
+ NUMERIC_MAX_VALUE 1024
+@@ -2195,10 +2643,10 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 30
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Count of spin-loop rounds in InnoDB mutexes (30 by default)
+ NUMERIC_MIN_VALUE 0
+-NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_MAX_VALUE 4294967295
+ NUMERIC_BLOCK_SIZE 0
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+@@ -2223,7 +2671,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 1000
+@@ -2237,7 +2685,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 10000
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0 disable a sleep
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 1000000
+@@ -2259,6 +2707,34 @@
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_TRACK_CHANGED_PAGES
++SESSION_VALUE NULL
++GLOBAL_VALUE OFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE OFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT Track the redo log for changed pages and output a changed page bitmap
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT NONE
++VARIABLE_NAME INNODB_TRACK_REDO_LOG_NOW
++SESSION_VALUE NULL
++GLOBAL_VALUE OFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE OFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT Force log tracker to catch up with checkpoint now
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME INNODB_TRX_PURGE_VIEW_UPDATE_ONLY_DEBUG
+ SESSION_VALUE NULL
+ GLOBAL_VALUE OFF
+@@ -2307,7 +2783,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 128
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Number of undo logs to use.
+ NUMERIC_MIN_VALUE 1
+ NUMERIC_MAX_VALUE 128
+@@ -2321,7 +2797,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Number of undo tablespaces to use.
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 126
+@@ -2336,7 +2812,7 @@
+ DEFAULT_VALUE OFF
+ VARIABLE_SCOPE GLOBAL
+ VARIABLE_TYPE BOOLEAN
+-VARIABLE_COMMENT Prevent partial page writes, via atomic writes.The option is used to prevent partial writes in case of a crash/poweroff, as faster alternative to doublewrite buffer.Currently this option works only on Linux only with FusionIO device, and directFS filesystem.
++VARIABLE_COMMENT Prevent partial page writes, via atomic writes (beta). The option is used to prevent partial writes in case of a crash/poweroff, as faster alternative to doublewrite buffer. Currently this option works only on Linux only with FusionIO device, and directFS filesystem.
+ NUMERIC_MIN_VALUE NULL
+ NUMERIC_MAX_VALUE NULL
+ NUMERIC_BLOCK_SIZE NULL
+@@ -2357,6 +2833,20 @@
+ ENUM_VALUE_LIST OFF,ON
+ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT NONE
++VARIABLE_NAME INNODB_USE_GLOBAL_FLUSH_LOG_AT_TRX_COMMIT
++SESSION_VALUE NULL
++GLOBAL_VALUE ON
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE ON
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT Use global innodb_flush_log_at_trx_commit value. (default: ON).
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT NONE
+ VARIABLE_NAME INNODB_USE_MTFLUSH
+ SESSION_VALUE NULL
+ GLOBAL_VALUE OFF
+@@ -2371,6 +2861,20 @@
+ ENUM_VALUE_LIST OFF,ON
+ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT NONE
++VARIABLE_NAME INNODB_USE_STACKTRACE
++SESSION_VALUE NULL
++GLOBAL_VALUE OFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE OFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT Print stacktrace on long semaphore wait (off by default supported only on linux)
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY YES
++COMMAND_LINE_ARGUMENT NONE
+ VARIABLE_NAME INNODB_USE_SYS_MALLOC
+ SESSION_VALUE NULL
+ GLOBAL_VALUE ON
+@@ -2401,12 +2905,12 @@
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME INNODB_VERSION
+ SESSION_VALUE NULL
- -GLOBAL_VALUE 5.6.42
- +GLOBAL_VALUE 5.6.41-84.1
++-GLOBAL_VALUE 5.6.43
+++GLOBAL_VALUE 5.6.42-84.2
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE NULL
+ VARIABLE_SCOPE GLOBAL
+ VARIABLE_TYPE VARCHAR
+-VARIABLE_COMMENT InnoDB version
++VARIABLE_COMMENT Percona-InnoDB-plugin version
+ NUMERIC_MIN_VALUE NULL
+ NUMERIC_MAX_VALUE NULL
+ NUMERIC_BLOCK_SIZE NULL
+@@ -2419,7 +2923,7 @@
+ GLOBAL_VALUE_ORIGIN CONFIG
+ DEFAULT_VALUE 4
+ VARIABLE_SCOPE GLOBAL
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Number of background write I/O threads in InnoDB.
+ NUMERIC_MIN_VALUE 1
+ NUMERIC_MAX_VALUE 64
diff --cc mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff
index 44269b2c74a,00000000000..998d95e523f
mode 100644,000000..100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff
@@@ -1,697 -1,0 +1,697 @@@
+--- mysql-test/suite/sys_vars/r/sysvars_innodb.result 2018-07-30 23:41:05.030930072 +0200
++++ mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.reject 2018-07-31 09:45:20.330811949 +0200
+@@ -47,6 +47,20 @@
+ ENUM_VALUE_LIST OFF,ON
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_ADAPTIVE_HASH_INDEX_PARTITIONS
++SESSION_VALUE NULL
++GLOBAL_VALUE 1
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 1
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_COMMENT Number of InnoDB adaptive hash index partitions (default 1: disable partitioning)
++NUMERIC_MIN_VALUE 1
++NUMERIC_MAX_VALUE 64
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY YES
++COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME INNODB_ADAPTIVE_MAX_SLEEP_DELAY
+ SESSION_VALUE NULL
+ GLOBAL_VALUE 150000
+@@ -355,6 +369,20 @@
+ ENUM_VALUE_LIST OFF,ON
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_BUFFER_POOL_POPULATE
++SESSION_VALUE NULL
++GLOBAL_VALUE OFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE OFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT Deprecated. This option has no effect and will be removed in MariaDB 10.2.3.
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY YES
++COMMAND_LINE_ARGUMENT NONE
+ VARIABLE_NAME INNODB_BUFFER_POOL_SIZE
+ SESSION_VALUE NULL
+ GLOBAL_VALUE 8388608
+@@ -446,7 +474,7 @@
+ DEFAULT_VALUE ON
+ VARIABLE_SCOPE GLOBAL
+ VARIABLE_TYPE BOOLEAN
+-VARIABLE_COMMENT DEPRECATED. Use innodb_checksum_algorithm=NONE instead of setting this to OFF. Enable InnoDB checksums validation (enabled by default). Disable with --skip-innodb-checksums.
++VARIABLE_COMMENT DEPRECATED. Use innodb_checksum_algorithm=NONE instead of setting this to OFF
+ NUMERIC_MIN_VALUE NULL
+ NUMERIC_MAX_VALUE NULL
+ NUMERIC_BLOCK_SIZE NULL
+@@ -467,6 +495,104 @@
+ ENUM_VALUE_LIST CRC32,STRICT_CRC32,INNODB,STRICT_INNODB,NONE,STRICT_NONE
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_CLEANER_EVICTION_FACTOR
++SESSION_VALUE NULL
++GLOBAL_VALUE OFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE OFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT Make page cleaner LRU flushes use evicted instead of flushed page counts for its heuristics
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_CLEANER_FLUSH_CHUNK_SIZE
++SESSION_VALUE NULL
++GLOBAL_VALUE 100
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 100
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_COMMENT Divide page cleaner flush list flush batches into chunks of this size
++NUMERIC_MIN_VALUE 1
++NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_CLEANER_FREE_LIST_LWM
++SESSION_VALUE NULL
++GLOBAL_VALUE 10
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 10
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_COMMENT Page cleaner will keep on flushing the same buffer pool instance if its free list length is below this percentage of innodb_lru_scan_depth
++NUMERIC_MIN_VALUE 0
++NUMERIC_MAX_VALUE 100
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_CLEANER_LRU_CHUNK_SIZE
++SESSION_VALUE NULL
++GLOBAL_VALUE 100
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 100
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_COMMENT Divide page cleaner LRU list flush batches into chunks of this size
++NUMERIC_MIN_VALUE 1
++NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_CLEANER_LSN_AGE_FACTOR
++SESSION_VALUE NULL
++GLOBAL_VALUE HIGH_CHECKPOINT
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE HIGH_CHECKPOINT
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE ENUM
++VARIABLE_COMMENT The formula for LSN age factor for page cleaner adaptive flushing. LEGACY: Original Oracle MySQL 5.6 formula. HIGH_CHECKPOINT: (the default) Percona Server 5.6 formula.
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST LEGACY,HIGH_CHECKPOINT
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_CLEANER_MAX_FLUSH_TIME
++SESSION_VALUE NULL
++GLOBAL_VALUE 1000
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 1000
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_COMMENT The maximum time limit for a single flush list flush iteration by the page cleaner thread in miliseconds
++NUMERIC_MIN_VALUE 0
++NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_CLEANER_MAX_LRU_TIME
++SESSION_VALUE NULL
++GLOBAL_VALUE 1000
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 1000
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_COMMENT The maximum time limit for a single LRU tail flush iteration by the page cleaner thread in miliseconds
++NUMERIC_MIN_VALUE 0
++NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME INNODB_CMP_PER_INDEX_ENABLED
+ SESSION_VALUE NULL
+ GLOBAL_VALUE OFF
+@@ -565,6 +691,20 @@
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_CORRUPT_TABLE_ACTION
++SESSION_VALUE NULL
++GLOBAL_VALUE assert
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE assert
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE ENUM
++VARIABLE_COMMENT Warn corruptions of user tables as 'corrupt table' instead of not crashing itself, when used with file_per_table. All file io for the datafile after detected as corrupt are disabled, except for the deletion.
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST assert,warn,salvage
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME INNODB_DATA_FILE_PATH
+ SESSION_VALUE NULL
+ GLOBAL_VALUE ibdata1:12M:autoextend
+@@ -789,6 +929,20 @@
+ ENUM_VALUE_LIST NULL
+ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_EMPTY_FREE_LIST_ALGORITHM
++SESSION_VALUE NULL
++GLOBAL_VALUE LEGACY
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE BACKOFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE ENUM
++VARIABLE_COMMENT The algorithm to use for empty free list handling. Allowed values: LEGACY: Original Oracle MySQL 5.6 handling with single page flushes; BACKOFF: (default) Wait until cleaner produces a free page.
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST LEGACY,BACKOFF
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME INNODB_ENCRYPTION_ROTATE_KEY_AGE
+ SESSION_VALUE NULL
+ GLOBAL_VALUE 1
+@@ -859,6 +1013,20 @@
+ ENUM_VALUE_LIST OFF,ON,FORCE
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_FAKE_CHANGES
++SESSION_VALUE OFF
++GLOBAL_VALUE OFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE OFF
++VARIABLE_SCOPE SESSION
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT In the transaction after enabled, UPDATE, INSERT and DELETE only move the cursor to the records and do nothing other operations (no changes, no ibuf, no undo, no transaction log) in the transaction. This is to cause replication prefetch IO. ATTENTION: the transaction started after enabled is affected.
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME INNODB_FAST_SHUTDOWN
+ SESSION_VALUE NULL
+ GLOBAL_VALUE 1
+@@ -986,11 +1154,11 @@
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME INNODB_FLUSH_LOG_AT_TRX_COMMIT
+-SESSION_VALUE NULL
++SESSION_VALUE 1
+ GLOBAL_VALUE 1
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 1
+-VARIABLE_SCOPE GLOBAL
++VARIABLE_SCOPE SESSION
+ VARIABLE_TYPE BIGINT UNSIGNED
+ VARIABLE_COMMENT Controls the durability/speed trade-off for commits. Set to 0 (write and flush redo log to disk only once per second), 1 (flush to disk at each commit), 2 (write to log at commit but flush to disk only once per second) or 3 (flush to disk at prepare and at commit, slower and usually redundant). 1 and 3 guarantees that after a crash, committed transactions will not be lost and will be consistent with the binlog and other transactional engines. 2 can get inconsistent and lose transactions if there is a power failure or kernel crash but not if mysqld crashes. 0 has no guarantees in case of crash. 0 and 2 can be faster than 1 or 3.
+ NUMERIC_MIN_VALUE 0
+@@ -1069,6 +1237,20 @@
+ ENUM_VALUE_LIST NULL
+ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_FOREGROUND_PREFLUSH
++SESSION_VALUE NULL
++GLOBAL_VALUE EXPONENTIAL_BACKOFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE EXPONENTIAL_BACKOFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE ENUM
++VARIABLE_COMMENT The algorithm InnoDB uses for the query threads at sync preflush. Possible values are SYNC_PREFLUSH: perform a sync preflush as Oracle MySQL; EXPONENTIAL_BACKOFF: (default) wait for the page cleaner flush.
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST SYNC_PREFLUSH,EXPONENTIAL_BACKOFF
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME INNODB_FT_AUX_TABLE
+ SESSION_VALUE NULL
+ GLOBAL_VALUE
+@@ -1307,6 +1489,20 @@
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_KILL_IDLE_TRANSACTION
++SESSION_VALUE NULL
++GLOBAL_VALUE 0
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 0
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BIGINT
++VARIABLE_COMMENT No effect for this build.
++NUMERIC_MIN_VALUE 0
++NUMERIC_MAX_VALUE 9223372036854775807
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME INNODB_LARGE_PREFIX
+ SESSION_VALUE NULL
+ GLOBAL_VALUE OFF
+@@ -1335,6 +1531,20 @@
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_LOCKING_FAKE_CHANGES
++SESSION_VALUE NULL
++GLOBAL_VALUE ON
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE ON
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT ###EXPERIMENTAL### if enabled, transactions will get S row locks instead of X locks for fake changes. If disabled, fake change transactions will not take any locks at all.
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT NONE
+ VARIABLE_NAME INNODB_LOCKS_UNSAFE_FOR_BINLOG
+ SESSION_VALUE NULL
+ GLOBAL_VALUE OFF
+@@ -1377,6 +1587,62 @@
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_LOG_ARCHIVE
++SESSION_VALUE NULL
++GLOBAL_VALUE OFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE OFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT Set to 1 if you want to have logs archived.
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_LOG_ARCH_DIR
++SESSION_VALUE NULL
++GLOBAL_VALUE PATH
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE VARCHAR
++VARIABLE_COMMENT Where full logs should be archived.
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST NULL
++READ_ONLY YES
++COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_LOG_ARCH_EXPIRE_SEC
++SESSION_VALUE NULL
++GLOBAL_VALUE 0
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 0
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_COMMENT Expiration time for archived innodb transaction logs.
++NUMERIC_MIN_VALUE 0
++NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_LOG_BLOCK_SIZE
++SESSION_VALUE NULL
++GLOBAL_VALUE 512
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 512
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_COMMENT ###EXPERIMENTAL###: The log block size of the transaction log file. Changing for created log file is not supported. Use on your own risk!
++NUMERIC_MIN_VALUE 512
++NUMERIC_MAX_VALUE 65536
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY YES
++COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME INNODB_LOG_BUFFER_SIZE
+ SESSION_VALUE NULL
+ GLOBAL_VALUE 1048576
+@@ -1405,6 +1671,20 @@
+ ENUM_VALUE_LIST OFF,ON
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_LOG_CHECKSUM_ALGORITHM
++SESSION_VALUE NULL
++GLOBAL_VALUE INNODB
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE INNODB
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE ENUM
++VARIABLE_COMMENT The algorithm InnoDB uses for log block checksums. Possible values are CRC32 (hardware accelerated if the CPU supports it) write crc32, allow any of the other checksums to match when reading; STRICT_CRC32 write crc32, do not allow other algorithms to match when reading; INNODB write a software calculated checksum, allow any other checksums to match when reading; STRICT_INNODB write a software calculated checksum, do not allow other algorithms to match when reading; NONE write a constant magic number, do not do any checksum verification when reading (same as innodb_checksums=OFF); STRICT_NONE write a constant magic number, do not allow values other than that magic number when reading; Logs created when this option is set to crc32/strict_crc32/none/strict_none will not be readable by any MySQL version or Percona Server versions that donot support this feature
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST CRC32,STRICT_CRC32,INNODB,STRICT_INNODB,NONE,STRICT_NONE
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME INNODB_LOG_COMPRESSED_PAGES
+ SESSION_VALUE NULL
+ GLOBAL_VALUE ON
+@@ -1475,6 +1755,34 @@
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_MAX_BITMAP_FILE_SIZE
++SESSION_VALUE NULL
++GLOBAL_VALUE 104857600
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 104857600
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_COMMENT The maximum size of changed page bitmap files
++NUMERIC_MIN_VALUE 4096
++NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_MAX_CHANGED_PAGES
++SESSION_VALUE NULL
++GLOBAL_VALUE 1000000
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 1000000
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_COMMENT The maximum number of rows for INFORMATION_SCHEMA.INNODB_CHANGED_PAGES table, 0 - unlimited
++NUMERIC_MIN_VALUE 0
++NUMERIC_MAX_VALUE 18446744073709551615
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME INNODB_MAX_DIRTY_PAGES_PCT
+ SESSION_VALUE NULL
+ GLOBAL_VALUE 75.000000
+@@ -1659,7 +1967,7 @@
+ COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME INNODB_OPEN_FILES
+ SESSION_VALUE NULL
+-GLOBAL_VALUE 2000
++GLOBAL_VALUE 300
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 0
+ VARIABLE_SCOPE GLOBAL
+@@ -1741,6 +2049,76 @@
+ ENUM_VALUE_LIST OFF,ON
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_PRINT_LOCK_WAIT_TIMEOUT_INFO
++SESSION_VALUE NULL
++GLOBAL_VALUE OFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE OFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT Print lock wait timeout info to MySQL error log (off by default)
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_PRIORITY_CLEANER
++SESSION_VALUE NULL
++GLOBAL_VALUE OFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE OFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT Make buffer pool cleaner and LRU manager threads acquire shared resources with priority
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_PRIORITY_IO
++SESSION_VALUE NULL
++GLOBAL_VALUE OFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE OFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT Make I/O threads acquire shared resources with priority
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_PRIORITY_MASTER
++SESSION_VALUE NULL
++GLOBAL_VALUE OFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE OFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT Make buffer pool cleaner thread acquire shared resources with priority
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_PRIORITY_PURGE
++SESSION_VALUE NULL
++GLOBAL_VALUE OFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE OFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT Make purge coordinator and worker threads acquire shared resources with priority
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME INNODB_PURGE_BATCH_SIZE
+ SESSION_VALUE NULL
+ GLOBAL_VALUE 300
+@@ -1909,6 +2287,48 @@
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_SCHED_PRIORITY_IO
++SESSION_VALUE NULL
++GLOBAL_VALUE 19
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 19
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_COMMENT Nice value for the I/O handler thread scheduling
++NUMERIC_MIN_VALUE 0
++NUMERIC_MAX_VALUE 39
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_SCHED_PRIORITY_MASTER
++SESSION_VALUE NULL
++GLOBAL_VALUE 19
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 19
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_COMMENT Nice value for the master thread scheduling
++NUMERIC_MIN_VALUE 0
++NUMERIC_MAX_VALUE 39
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_SCHED_PRIORITY_PURGE
++SESSION_VALUE NULL
++GLOBAL_VALUE 19
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 19
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_COMMENT Nice value for the purge thread scheduling
++NUMERIC_MIN_VALUE 0
++NUMERIC_MAX_VALUE 39
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
+ VARIABLE_NAME INNODB_SCRUB_LOG
+ SESSION_VALUE NULL
+ GLOBAL_VALUE OFF
+@@ -1937,6 +2357,34 @@
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_SHOW_LOCKS_HELD
++SESSION_VALUE NULL
++GLOBAL_VALUE 10
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 10
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_COMMENT Number of locks held to print for each InnoDB transaction in SHOW INNODB STATUS.
++NUMERIC_MIN_VALUE 0
++NUMERIC_MAX_VALUE 1000
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
++VARIABLE_NAME INNODB_SHOW_VERBOSE_LOCKS
++SESSION_VALUE NULL
++GLOBAL_VALUE 0
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE 0
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_COMMENT Whether to show records locked in SHOW INNODB STATUS.
++NUMERIC_MIN_VALUE 0
++NUMERIC_MAX_VALUE 1
++NUMERIC_BLOCK_SIZE 0
++ENUM_VALUE_LIST NULL
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME INNODB_SIMULATE_COMP_FAILURES
+ SESSION_VALUE NULL
+ GLOBAL_VALUE 0
+@@ -2014,7 +2462,7 @@
+ DEFAULT_VALUE nulls_equal
+ VARIABLE_SCOPE GLOBAL
+ VARIABLE_TYPE ENUM
+-VARIABLE_COMMENT Specifies how InnoDB index statistics collection code should treat NULLs. Possible values are NULLS_EQUAL (default), NULLS_UNEQUAL and NULLS_IGNORED
++VARIABLE_COMMENT Specifies how InnoDB index statistics collection code should treat NULLs
+ NUMERIC_MIN_VALUE NULL
+ NUMERIC_MAX_VALUE NULL
+ NUMERIC_BLOCK_SIZE NULL
+@@ -2259,6 +2707,34 @@
+ ENUM_VALUE_LIST NULL
+ READ_ONLY NO
+ COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME INNODB_TRACK_CHANGED_PAGES
++SESSION_VALUE NULL
++GLOBAL_VALUE OFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE OFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT Track the redo log for changed pages and output a changed page bitmap
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT NONE
++VARIABLE_NAME INNODB_TRACK_REDO_LOG_NOW
++SESSION_VALUE NULL
++GLOBAL_VALUE OFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE OFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT Force log tracker to catch up with checkpoint now
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME INNODB_TRX_PURGE_VIEW_UPDATE_ONLY_DEBUG
+ SESSION_VALUE NULL
+ GLOBAL_VALUE OFF
+@@ -2336,7 +2812,7 @@
+ DEFAULT_VALUE OFF
+ VARIABLE_SCOPE GLOBAL
+ VARIABLE_TYPE BOOLEAN
+-VARIABLE_COMMENT Prevent partial page writes, via atomic writes.The option is used to prevent partial writes in case of a crash/poweroff, as faster alternative to doublewrite buffer.Currently this option works only on Linux only with FusionIO device, and directFS filesystem.
++VARIABLE_COMMENT Prevent partial page writes, via atomic writes (beta). The option is used to prevent partial writes in case of a crash/poweroff, as faster alternative to doublewrite buffer. Currently this option works only on Linux only with FusionIO device, and directFS filesystem.
+ NUMERIC_MIN_VALUE NULL
+ NUMERIC_MAX_VALUE NULL
+ NUMERIC_BLOCK_SIZE NULL
+@@ -2357,6 +2833,20 @@
+ ENUM_VALUE_LIST OFF,ON
+ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT NONE
++VARIABLE_NAME INNODB_USE_GLOBAL_FLUSH_LOG_AT_TRX_COMMIT
++SESSION_VALUE NULL
++GLOBAL_VALUE ON
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE ON
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT Use global innodb_flush_log_at_trx_commit value. (default: ON).
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT NONE
+ VARIABLE_NAME INNODB_USE_MTFLUSH
+ SESSION_VALUE NULL
+ GLOBAL_VALUE OFF
+@@ -2371,6 +2861,20 @@
+ ENUM_VALUE_LIST OFF,ON
+ READ_ONLY YES
+ COMMAND_LINE_ARGUMENT NONE
++VARIABLE_NAME INNODB_USE_STACKTRACE
++SESSION_VALUE NULL
++GLOBAL_VALUE OFF
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE OFF
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE BOOLEAN
++VARIABLE_COMMENT Print stacktrace on long semaphore wait (off by default supported only on linux)
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST OFF,ON
++READ_ONLY YES
++COMMAND_LINE_ARGUMENT NONE
+ VARIABLE_NAME INNODB_USE_SYS_MALLOC
+ SESSION_VALUE NULL
+ GLOBAL_VALUE ON
+@@ -2401,12 +2905,12 @@
+ COMMAND_LINE_ARGUMENT OPTIONAL
+ VARIABLE_NAME INNODB_VERSION
+ SESSION_VALUE NULL
- -GLOBAL_VALUE 5.6.42
- +GLOBAL_VALUE 5.6.41-84.1
++-GLOBAL_VALUE 5.6.43
+++GLOBAL_VALUE 5.6.42-84.2
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE NULL
+ VARIABLE_SCOPE GLOBAL
+ VARIABLE_TYPE VARCHAR
+-VARIABLE_COMMENT InnoDB version
++VARIABLE_COMMENT Percona-InnoDB-plugin version
+ NUMERIC_MIN_VALUE NULL
+ NUMERIC_MAX_VALUE NULL
+ NUMERIC_BLOCK_SIZE NULL
diff --cc mysql-test/suite/sys_vars/r/sysvars_innodb.result
index 60b5f52f648,00000000000..f747a493b79
mode 100644,000000..100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
@@@ -1,2429 -1,0 +1,2429 @@@
+select * from information_schema.system_variables
+where variable_name like 'innodb%' and
+variable_name not in (
+'innodb_disallow_writes', # only available WITH_WSREP
+'innodb_sched_priority_cleaner', # linux only
+'innodb_use_native_aio') # default value depends on OS
+order by variable_name;
+VARIABLE_NAME INNODB_ADAPTIVE_FLUSHING
+SESSION_VALUE NULL
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Attempt flushing dirty pages to avoid IO bursts at checkpoints.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_ADAPTIVE_FLUSHING_LWM
+SESSION_VALUE NULL
+GLOBAL_VALUE 10.000000
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 10.000000
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE DOUBLE
+VARIABLE_COMMENT Percentage of log capacity below which no adaptive flushing happens.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 70
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_ADAPTIVE_HASH_INDEX
+SESSION_VALUE NULL
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Enable InnoDB adaptive hash index (enabled by default). Disable with --skip-innodb-adaptive-hash-index.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_ADAPTIVE_MAX_SLEEP_DELAY
+SESSION_VALUE NULL
+GLOBAL_VALUE 150000
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 150000
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT The upper limit of the sleep delay in usec. Value of 0 disables it.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 1000000
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_ADDITIONAL_MEM_POOL_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 8388608
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 8388608
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator. Size of a memory pool InnoDB uses to store data dictionary information and other internal data structures.
+NUMERIC_MIN_VALUE 524288
+NUMERIC_MAX_VALUE 9223372036854775807
+NUMERIC_BLOCK_SIZE 1024
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_API_BK_COMMIT_INTERVAL
+SESSION_VALUE NULL
+GLOBAL_VALUE 5
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 5
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Background commit interval in seconds
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 1073741824
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_API_DISABLE_ROWLOCK
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Disable row lock when direct access InnoDB through InnoDB APIs
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_API_ENABLE_BINLOG
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Enable binlog for applications direct access InnoDB through InnoDB APIs
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_API_ENABLE_MDL
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Enable MDL for applications direct access InnoDB through InnoDB APIs
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_API_TRX_LEVEL
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT InnoDB API transaction isolation level
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 3
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_AUTOEXTEND_INCREMENT
+SESSION_VALUE NULL
+GLOBAL_VALUE 64
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 64
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Data file autoextend increment in megabytes
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 1000
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_AUTOINC_LOCK_MODE
+SESSION_VALUE NULL
+GLOBAL_VALUE 1
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 1
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT 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)
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 2
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_BACKGROUND_SCRUB_DATA_CHECK_INTERVAL
+SESSION_VALUE NULL
+GLOBAL_VALUE 3600
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 3600
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT check if spaces needs scrubbing every innodb_background_scrub_data_check_interval seconds
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_BACKGROUND_SCRUB_DATA_COMPRESSED
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Enable scrubbing of compressed data by background threads (same as encryption_threads)
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_BACKGROUND_SCRUB_DATA_INTERVAL
+SESSION_VALUE NULL
+GLOBAL_VALUE 604800
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 604800
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT scrub spaces that were last scrubbed longer than innodb_background_scrub_data_interval seconds ago
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_BACKGROUND_SCRUB_DATA_UNCOMPRESSED
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Enable scrubbing of uncompressed data by background threads (same as encryption_threads)
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_BUFFER_POOL_DUMP_AT_SHUTDOWN
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Dump the buffer pool into a file named @@innodb_buffer_pool_filename
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_BUFFER_POOL_DUMP_NOW
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Trigger an immediate dump of the buffer pool into a file named @@innodb_buffer_pool_filename
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_BUFFER_POOL_DUMP_PCT
+SESSION_VALUE NULL
+GLOBAL_VALUE 100
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 100
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Dump only the hottest N% of each buffer pool, defaults to 100
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 100
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_BUFFER_POOL_EVICT
+SESSION_VALUE NULL
+GLOBAL_VALUE
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Evict pages from the buffer pool
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_BUFFER_POOL_FILENAME
+SESSION_VALUE NULL
+GLOBAL_VALUE ib_buffer_pool
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ib_buffer_pool
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Filename to/from which to dump/load the InnoDB buffer pool
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_BUFFER_POOL_INSTANCES
+SESSION_VALUE NULL
+GLOBAL_VALUE 8
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT Number of buffer pool instances, set to higher value on high-end machines to increase scalability
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 64
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_BUFFER_POOL_LOAD_ABORT
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Abort a currently running load of the buffer pool
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_BUFFER_POOL_LOAD_AT_STARTUP
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Load the buffer pool from a file named @@innodb_buffer_pool_filename
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_BUFFER_POOL_LOAD_NOW
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Trigger an immediate load of the buffer pool from a file named @@innodb_buffer_pool_filename
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_BUFFER_POOL_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 8388608
+GLOBAL_VALUE_ORIGIN CONFIG
+DEFAULT_VALUE 134217728
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT The size of the memory buffer InnoDB uses to cache data and indexes of its tables.
+NUMERIC_MIN_VALUE 5242880
+NUMERIC_MAX_VALUE 9223372036854775807
+NUMERIC_BLOCK_SIZE 1048576
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_BUF_DUMP_STATUS_FREQUENCY
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT A number between [0, 100] that tells how oftern buffer pool dump status in percentages should be printed. E.g. 10 means that buffer pool dump status is printed when every 10% of number of buffer pool pages are dumped. Default is 0 (only start and end status is printed).
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 100
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_BUF_FLUSH_LIST_NOW
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Force dirty page flush now
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_CHANGE_BUFFERING
+SESSION_VALUE NULL
+GLOBAL_VALUE all
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE all
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Buffer changes to reduce random access: OFF, ON, inserting, deleting, changing, or purging.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_CHANGE_BUFFERING_DEBUG
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Debug flags for InnoDB change buffering (0=none, 2=crash at merge)
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 2
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_CHANGE_BUFFER_MAX_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 25
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 25
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Maximum on-disk size of change buffer in terms of percentage of the buffer pool.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 50
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_CHECKSUMS
+SESSION_VALUE NULL
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT DEPRECATED. Use innodb_checksum_algorithm=NONE instead of setting this to OFF. Enable InnoDB checksums validation (enabled by default). Disable with --skip-innodb-checksums.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_CHECKSUM_ALGORITHM
+SESSION_VALUE NULL
+GLOBAL_VALUE INNODB
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE INNODB
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT The algorithm InnoDB uses for page checksumming. Possible values are CRC32 (hardware accelerated if the CPU supports it) write crc32, allow any of the other checksums to match when reading; STRICT_CRC32 write crc32, do not allow other algorithms to match when reading; INNODB write a software calculated checksum, allow any other checksums to match when reading; STRICT_INNODB write a software calculated checksum, do not allow other algorithms to match when reading; NONE write a constant magic number, do not do any checksum verification when reading (same as innodb_checksums=OFF); STRICT_NONE write a constant magic number, do not allow values other than that magic number when reading; Files updated when this option is set to crc32 or strict_crc32 will not be readable by MySQL versions older than 5.6.3
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST CRC32,STRICT_CRC32,INNODB,STRICT_INNODB,NONE,STRICT_NONE
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_CMP_PER_INDEX_ENABLED
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Enable INFORMATION_SCHEMA.innodb_cmp_per_index, may have negative impact on performance (off by default)
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_COMMIT_CONCURRENCY
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 1000
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_COMPRESSION_ALGORITHM
+SESSION_VALUE NULL
+GLOBAL_VALUE zlib
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE zlib
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Compression algorithm used on page compression. One of: none, zlib, lz4, lzo, lzma, or bzip2
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST none,zlib,lz4,lzo,lzma,bzip2,snappy
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_COMPRESSION_FAILURE_THRESHOLD_PCT
+SESSION_VALUE NULL
+GLOBAL_VALUE 5
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 5
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT If the compression failure rate of a table is greater than this number more padding is added to the pages to reduce the failures. A value of zero implies no padding
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 100
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_COMPRESSION_LEVEL
+SESSION_VALUE NULL
+GLOBAL_VALUE 6
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 6
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Compression level used for zlib compression. 0 is no compression, 1 is fastest, 9 is best compression and default is 6.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 9
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_COMPRESSION_PAD_PCT_MAX
+SESSION_VALUE NULL
+GLOBAL_VALUE 50
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 50
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Percentage of empty space on a data page that can be reserved to make the page compressible.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 75
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_CONCURRENCY_TICKETS
+SESSION_VALUE NULL
+GLOBAL_VALUE 5000
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 5000
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of times a thread is allowed to enter InnoDB within the same SQL query after it has once got the ticket
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_DATA_FILE_PATH
+SESSION_VALUE NULL
+GLOBAL_VALUE ibdata1:12M:autoextend
+GLOBAL_VALUE_ORIGIN CONFIG
+DEFAULT_VALUE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Path to individual files and their sizes.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_DATA_FILE_SIZE_DEBUG
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT InnoDB system tablespace size to be set in recovery.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_DATA_HOME_DIR
+SESSION_VALUE NULL
+GLOBAL_VALUE
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT The common part for InnoDB table spaces.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_DEBUG_FORCE_SCRUBBING
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Perform extra scrubbing to increase test exposure
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_DEFAULT_ENCRYPTION_KEY_ID
+SESSION_VALUE 1
+GLOBAL_VALUE 1
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 1
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Default encryption key id used for table encryption.
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_DEFAULT_ROW_FORMAT
+SESSION_VALUE NULL
+GLOBAL_VALUE compact
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE compact
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT The default ROW FORMAT for all innodb tables created without explicit ROW_FORMAT. Possible values are REDUNDANT, COMPACT, and DYNAMIC. The ROW_FORMAT value COMPRESSED is not allowed
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST redundant,compact,dynamic
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_DEFRAGMENT
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Enable/disable InnoDB defragmentation (default FALSE). When set to FALSE, all existing defragmentation will be paused. And new defragmentation command will fail.Paused defragmentation commands will resume when this variable is set to true again.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_DEFRAGMENT_FILL_FACTOR
+SESSION_VALUE NULL
+GLOBAL_VALUE 0.900000
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0.900000
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE DOUBLE
+VARIABLE_COMMENT A number between [0.7, 1] that tells defragmentation how full it should fill a page. Default is 0.9. Number below 0.7 won't make much sense.This variable, together with innodb_defragment_fill_factor_n_recs, is introduced so defragmentation won't pack the page too full and cause page split on the next insert on every page. The variable indicating more defragmentation gain is the one effective.
+NUMERIC_MIN_VALUE 0.7
+NUMERIC_MAX_VALUE 1
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_DEFRAGMENT_FILL_FACTOR_N_RECS
+SESSION_VALUE NULL
+GLOBAL_VALUE 20
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 20
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT How many records of space defragmentation should leave on the page. This variable, together with innodb_defragment_fill_factor, is introduced so defragmentation won't pack the page too full and cause page split on the next insert on every page. The variable indicating more defragmentation gain is the one effective.
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 100
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_DEFRAGMENT_FREQUENCY
+SESSION_VALUE NULL
+GLOBAL_VALUE 40
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 40
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Do not defragment a single index more than this number of time per second.This controls the number of time defragmentation thread can request X_LOCK on an index. Defragmentation thread will check whether 1/defragment_frequency (s) has passed since it worked on this index last time, and put the index back to the queue if not enough time has passed. The actual frequency can only be lower than this given number.
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 1000
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_DEFRAGMENT_N_PAGES
+SESSION_VALUE NULL
+GLOBAL_VALUE 7
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 7
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Number of pages considered at once when merging multiple pages to defragment
+NUMERIC_MIN_VALUE 2
+NUMERIC_MAX_VALUE 32
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_DEFRAGMENT_STATS_ACCURACY
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT How many defragment stats changes there are before the stats are written to persistent storage. Set to 0 meaning disable defragment stats tracking.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_DISABLE_BACKGROUND_MERGE
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Disable change buffering merges by the master thread
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_DISABLE_SORT_FILE_CACHE
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Whether to disable OS system file cache for sort I/O
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_DOUBLEWRITE
+SESSION_VALUE NULL
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Enable InnoDB doublewrite buffer (enabled by default). Disable with --skip-innodb-doublewrite.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_DOUBLEWRITE_BATCH_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 120
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 120
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of pages reserved in doublewrite buffer for batch flushing
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 127
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_ENCRYPTION_ROTATE_KEY_AGE
+SESSION_VALUE NULL
+GLOBAL_VALUE 1
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 1
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Key rotation - re-encrypt in background all pages that were encrypted with a key that many (or more) versions behind. Value 0 indicates that key rotation is disabled.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_ENCRYPTION_ROTATION_IOPS
+SESSION_VALUE NULL
+GLOBAL_VALUE 100
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 100
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Use this many iops for background key rotation
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_ENCRYPTION_THREADS
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Number of threads performing background key rotation and scrubbing
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_ENCRYPT_LOG
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Enable redo log encryption
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_ENCRYPT_TABLES
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Enable encryption for tables. Don't forget to enable --innodb-encrypt-log too
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON,FORCE
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_FAST_SHUTDOWN
+SESSION_VALUE NULL
+GLOBAL_VALUE 1
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 1
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Speeds up the shutdown process of the InnoDB storage engine. Possible values are 0, 1 (faster) or 2 (fastest - crash-like).
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 2
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_FATAL_SEMAPHORE_WAIT_THRESHOLD
+SESSION_VALUE NULL
+GLOBAL_VALUE 600
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 600
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Maximum number of seconds that semaphore times out in InnoDB.
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_FILE_FORMAT
+SESSION_VALUE NULL
+GLOBAL_VALUE Antelope
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE Antelope
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT File format to use for new tables in .ibd files.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_FILE_FORMAT_CHECK
+SESSION_VALUE NULL
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Whether to perform system file format check.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_FILE_FORMAT_MAX
+SESSION_VALUE NULL
+GLOBAL_VALUE Antelope
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE Antelope
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT The highest file format in the tablespace.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_FILE_PER_TABLE
+SESSION_VALUE NULL
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Stores each InnoDB table to an .ibd file in the database dir.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_FIL_MAKE_PAGE_DIRTY_DEBUG
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Make the first page of the given tablespace dirty.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_FLUSHING_AVG_LOOPS
+SESSION_VALUE NULL
+GLOBAL_VALUE 30
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 30
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of iterations over which the background flushing is averaged.
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 1000
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_FLUSH_LOG_AT_TIMEOUT
+SESSION_VALUE NULL
+GLOBAL_VALUE 3
+GLOBAL_VALUE_ORIGIN CONFIG
+DEFAULT_VALUE 1
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Write and flush logs every (n) second.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 2700
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_FLUSH_LOG_AT_TRX_COMMIT
+SESSION_VALUE NULL
+GLOBAL_VALUE 1
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 1
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Controls the durability/speed trade-off for commits. Set to 0 (write and flush redo log to disk only once per second), 1 (flush to disk at each commit), 2 (write to log at commit but flush to disk only once per second) or 3 (flush to disk at prepare and at commit, slower and usually redundant). 1 and 3 guarantees that after a crash, committed transactions will not be lost and will be consistent with the binlog and other transactional engines. 2 can get inconsistent and lose transactions if there is a power failure or kernel crash but not if mysqld crashes. 0 has no guarantees in case of crash. 0 and 2 can be faster than 1 or 3.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 3
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_FLUSH_METHOD
+SESSION_VALUE NULL
+GLOBAL_VALUE
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT With which method to flush data.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_FLUSH_NEIGHBORS
+SESSION_VALUE NULL
+GLOBAL_VALUE 1
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 1
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Set to 0 (don't flush neighbors from buffer pool), 1 (flush contiguous neighbors from buffer pool) or 2 (flush neighbors from buffer pool), when flushing a block
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 2
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_FORCE_LOAD_CORRUPTED
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Force InnoDB to load metadata of corrupted table.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_FORCE_PRIMARY_KEY
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Do not allow to create table without primary key (off by default)
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_FORCE_RECOVERY
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Helps to save your data in case the disk image of the database becomes corrupt.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 6
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_FT_AUX_TABLE
+SESSION_VALUE NULL
+GLOBAL_VALUE
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT FTS internal auxiliary table to be checked
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_FT_CACHE_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 8000000
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 8000000
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT InnoDB Fulltext search cache size in bytes
+NUMERIC_MIN_VALUE 1600000
+NUMERIC_MAX_VALUE 80000000
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_FT_ENABLE_DIAG_PRINT
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Whether to enable additional FTS diagnostic printout
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_FT_ENABLE_STOPWORD
+SESSION_VALUE ON
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Create FTS index with stopword.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_FT_MAX_TOKEN_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 84
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 84
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT InnoDB Fulltext search maximum token size in characters
+NUMERIC_MIN_VALUE 10
+NUMERIC_MAX_VALUE 84
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_FT_MIN_TOKEN_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 3
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 3
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT InnoDB Fulltext search minimum token size in characters
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 16
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_FT_NUM_WORD_OPTIMIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 2000
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 2000
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT InnoDB Fulltext search number of words to optimize for each optimize table call
+NUMERIC_MIN_VALUE 1000
+NUMERIC_MAX_VALUE 10000
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_FT_RESULT_CACHE_LIMIT
+SESSION_VALUE NULL
+GLOBAL_VALUE 2000000000
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 2000000000
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT InnoDB Fulltext search query result cache limit in bytes
+NUMERIC_MIN_VALUE 1000000
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_FT_SERVER_STOPWORD_TABLE
+SESSION_VALUE NULL
+GLOBAL_VALUE
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT The user supplied stopword table name.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_FT_SORT_PLL_DEGREE
+SESSION_VALUE NULL
+GLOBAL_VALUE 2
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 2
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT InnoDB Fulltext search parallel sort degree, will round up to nearest power of 2 number
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 16
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_FT_TOTAL_CACHE_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 640000000
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 640000000
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Total memory allocated for InnoDB Fulltext Search cache
+NUMERIC_MIN_VALUE 32000000
+NUMERIC_MAX_VALUE 1600000000
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_FT_USER_STOPWORD_TABLE
+SESSION_VALUE
+GLOBAL_VALUE
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT User supplied stopword table name, effective in the session level.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_IDLE_FLUSH_PCT
+SESSION_VALUE NULL
+GLOBAL_VALUE 100
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 100
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Up to what percentage of dirty pages should be flushed when innodb finds it has spare resources to do so.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 100
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_IMMEDIATE_SCRUB_DATA_UNCOMPRESSED
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Enable scrubbing of data
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_INSTRUMENT_SEMAPHORES
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Enable semaphore request instrumentation. This could have some effect on performance but allows better information on long semaphore wait problems. (Default: not enabled)
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_IO_CAPACITY
+SESSION_VALUE NULL
+GLOBAL_VALUE 200
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 200
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of IOPs the server can do. Tunes the background IO rate
+NUMERIC_MIN_VALUE 100
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_IO_CAPACITY_MAX
+SESSION_VALUE NULL
+GLOBAL_VALUE 2000
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 18446744073709551615
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Limit to which innodb_io_capacity can be inflated.
+NUMERIC_MIN_VALUE 100
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_LARGE_PREFIX
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Support large index prefix length of REC_VERSION_56_MAX_INDEX_COL_LEN (3072) bytes.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Artificially limit the number of records per B-tree page (0=unlimited).
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_LOCKS_UNSAFE_FOR_BINLOG
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT DEPRECATED. This option may be removed in future releases. Please use READ COMMITTED transaction isolation level instead. Force InnoDB to not use next-key locking, to use only row-level locking.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_LOCK_SCHEDULE_ALGORITHM
+SESSION_VALUE NULL
+GLOBAL_VALUE fcfs
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE fcfs
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT The algorithm Innodb uses for deciding which locks to grant next when a lock is released. Possible values are FCFS grant the locks in First-Come-First-Served order; VATS use the Variance-Aware-Transaction-Scheduling algorithm, which uses an Eldest-Transaction-First heuristic.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST fcfs,vats
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_LOCK_WAIT_TIMEOUT
+SESSION_VALUE 50
+GLOBAL_VALUE 50
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 50
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 1073741824
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_LOG_BUFFER_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 1048576
+GLOBAL_VALUE_ORIGIN CONFIG
+DEFAULT_VALUE 16777216
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT The size of the buffer which InnoDB uses to write log to the log files on disk.
+NUMERIC_MIN_VALUE 262144
+NUMERIC_MAX_VALUE 9223372036854775807
+NUMERIC_BLOCK_SIZE 1024
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_LOG_CHECKPOINT_NOW
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Force checkpoint now
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_LOG_COMPRESSED_PAGES
+SESSION_VALUE NULL
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Enables/disables the logging of entire compressed page images. InnoDB logs the compressed pages to prevent corruption if the zlib compression algorithm changes. When turned OFF, InnoDB will assume that the zlib compression algorithm doesn't change.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_LOG_FILES_IN_GROUP
+SESSION_VALUE NULL
+GLOBAL_VALUE 2
+GLOBAL_VALUE_ORIGIN CONFIG
+DEFAULT_VALUE 2
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of log files in the log group. InnoDB writes to the files in a circular fashion.
+NUMERIC_MIN_VALUE 2
+NUMERIC_MAX_VALUE 100
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_LOG_FILE_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 5242880
+GLOBAL_VALUE_ORIGIN CONFIG
+DEFAULT_VALUE 50331648
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT Size of each log file in a log group.
+NUMERIC_MIN_VALUE 1048576
+NUMERIC_MAX_VALUE 9223372036854775807
+NUMERIC_BLOCK_SIZE 1048576
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_LOG_GROUP_HOME_DIR
+SESSION_VALUE NULL
+GLOBAL_VALUE PATH
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Path to InnoDB log files.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_LRU_SCAN_DEPTH
+SESSION_VALUE NULL
+GLOBAL_VALUE 100
+GLOBAL_VALUE_ORIGIN CONFIG
+DEFAULT_VALUE 1024
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT How deep to scan LRU to keep it clean
+NUMERIC_MIN_VALUE 100
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_MAX_DIRTY_PAGES_PCT
+SESSION_VALUE NULL
+GLOBAL_VALUE 75.000000
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 75.000000
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE DOUBLE
+VARIABLE_COMMENT Percentage of dirty pages allowed in bufferpool.
+NUMERIC_MIN_VALUE 0.001
+NUMERIC_MAX_VALUE 99.999
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_MAX_DIRTY_PAGES_PCT_LWM
+SESSION_VALUE NULL
+GLOBAL_VALUE 0.001000
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0.001000
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE DOUBLE
+VARIABLE_COMMENT Percentage of dirty pages at which flushing kicks in.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 99.999
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_MAX_PURGE_LAG
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Desired maximum length of the purge queue (0 = no limit)
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_MAX_PURGE_LAG_DELAY
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Maximum delay of user threads in micro-seconds
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 10000000
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_MIRRORED_LOG_GROUPS
+SESSION_VALUE NULL
+GLOBAL_VALUE 1
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT Number of identical copies of log groups we keep for the database. Currently this should be set to 1.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 10
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_MONITOR_DISABLE
+SESSION_VALUE NULL
+GLOBAL_VALUE
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Turn off a monitor counter
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_MONITOR_ENABLE
+SESSION_VALUE NULL
+GLOBAL_VALUE
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Turn on a monitor counter
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_MONITOR_RESET
+SESSION_VALUE NULL
+GLOBAL_VALUE
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Reset a monitor counter
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_MONITOR_RESET_ALL
+SESSION_VALUE NULL
+GLOBAL_VALUE
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Reset all values for a monitor counter
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_MTFLUSH_THREADS
+SESSION_VALUE NULL
+GLOBAL_VALUE 8
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 8
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT Number of multi-threaded flush threads
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 64
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_OLD_BLOCKS_PCT
+SESSION_VALUE NULL
+GLOBAL_VALUE 37
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 37
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Percentage of the buffer pool to reserve for 'old' blocks.
+NUMERIC_MIN_VALUE 5
+NUMERIC_MAX_VALUE 95
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_OLD_BLOCKS_TIME
+SESSION_VALUE NULL
+GLOBAL_VALUE 1000
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 1000
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Move blocks to the 'new' end of the buffer pool if the first access was at least this many milliseconds ago. The timeout is disabled if 0.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_ONLINE_ALTER_LOG_MAX_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 134217728
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 134217728
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Maximum modification log file size for online index creation
+NUMERIC_MIN_VALUE 65536
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_OPEN_FILES
+SESSION_VALUE NULL
+GLOBAL_VALUE 2000
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT How many files at the maximum InnoDB keeps open at the same time.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 9223372036854775807
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_OPTIMIZE_FULLTEXT_ONLY
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Only optimize the Fulltext index of the table
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_PAGE_HASH_LOCKS
+SESSION_VALUE NULL
+GLOBAL_VALUE 16
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 16
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of rw_locks protecting buffer pool page_hash. Rounded up to the next power of 2
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 1024
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_PAGE_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 16384
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 16384
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Page size to use for all InnoDB tablespaces.
+NUMERIC_MIN_VALUE 4096
+NUMERIC_MAX_VALUE 65536
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_PREFIX_INDEX_CLUSTER_OPTIMIZATION
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Enable prefix optimization to sometimes avoid cluster index lookups.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_PRINT_ALL_DEADLOCKS
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Print all deadlocks to MySQL error log (off by default)
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_PURGE_BATCH_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 300
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 300
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of UNDO log pages to purge in one batch from the history list.
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 5000
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_PURGE_RUN_NOW
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Set purge state to RUN
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_PURGE_STOP_NOW
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Set purge state to STOP
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_PURGE_THREADS
+SESSION_VALUE NULL
+GLOBAL_VALUE 1
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 1
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Purge threads can be from 1 to 32. Default is 1.
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 32
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_RANDOM_READ_AHEAD
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Whether to use read ahead for random access within an extent.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_READ_AHEAD_THRESHOLD
+SESSION_VALUE NULL
+GLOBAL_VALUE 56
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 56
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of pages that must be accessed sequentially for InnoDB to trigger a readahead.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 64
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_READ_IO_THREADS
+SESSION_VALUE NULL
+GLOBAL_VALUE 2
+GLOBAL_VALUE_ORIGIN CONFIG
+DEFAULT_VALUE 4
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of background read I/O threads in InnoDB.
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 64
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_READ_ONLY
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Start InnoDB in read only mode (off by default)
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_REPLICATION_DELAY
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Replication thread delay (ms) on the slave server if innodb_thread_concurrency is reached (0 by default)
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_ROLLBACK_ON_TIMEOUT
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Roll back the complete transaction on lock wait timeout, for 4.x compatibility (disabled by default)
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_ROLLBACK_SEGMENTS
+SESSION_VALUE NULL
+GLOBAL_VALUE 128
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 128
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of undo logs to use (deprecated).
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 128
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_SAVED_PAGE_NUMBER_DEBUG
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT An InnoDB page number.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_SCRUB_LOG
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Enable background redo log (ib_logfile0, ib_logfile1...) scrubbing
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_SCRUB_LOG_SPEED
+SESSION_VALUE NULL
+GLOBAL_VALUE 256
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 256
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Background redo log scrubbing speed in bytes/sec
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 50000
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_SIMULATE_COMP_FAILURES
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Simulate compression failures.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 99
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_SORT_BUFFER_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 1048576
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 1048576
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Memory buffer size for index creation
+NUMERIC_MIN_VALUE 65536
+NUMERIC_MAX_VALUE 67108864
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_SPIN_WAIT_DELAY
+SESSION_VALUE NULL
+GLOBAL_VALUE 6
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 6
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Maximum delay between polling for a spin lock (6 by default)
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_STATS_AUTO_RECALC
+SESSION_VALUE NULL
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT InnoDB automatic recalculation of persistent statistics enabled for all tables unless overridden at table level (automatic recalculation is only done when InnoDB decides that the table has changed too much and needs a new statistics)
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_STATS_INCLUDE_DELETE_MARKED
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Scan delete marked records for persistent stat
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_STATS_METHOD
+SESSION_VALUE NULL
+GLOBAL_VALUE nulls_equal
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE nulls_equal
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Specifies how InnoDB index statistics collection code should treat NULLs. Possible values are NULLS_EQUAL (default), NULLS_UNEQUAL and NULLS_IGNORED
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST nulls_equal,nulls_unequal,nulls_ignored
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_STATS_MODIFIED_COUNTER
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT The number of rows modified before we calculate new statistics (default 0 = current limits)
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_STATS_ON_METADATA
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Enable statistics gathering for metadata commands such as SHOW TABLE STATUS for tables that use transient statistics (off by default)
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_STATS_PERSISTENT
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN CONFIG
+DEFAULT_VALUE ON
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT InnoDB persistent statistics enabled for all tables unless overridden at table level
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_STATS_PERSISTENT_SAMPLE_PAGES
+SESSION_VALUE NULL
+GLOBAL_VALUE 20
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 20
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT The number of leaf index pages to sample when calculating persistent statistics (by ANALYZE, default 20)
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_STATS_SAMPLE_PAGES
+SESSION_VALUE NULL
+GLOBAL_VALUE 8
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 8
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Deprecated, use innodb_stats_transient_sample_pages instead
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_STATS_TRADITIONAL
+SESSION_VALUE NULL
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Enable traditional statistic calculation based on number of configured pages (default true)
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_STATS_TRANSIENT_SAMPLE_PAGES
+SESSION_VALUE NULL
+GLOBAL_VALUE 8
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 8
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT The number of leaf index pages to sample when calculating transient statistics (if persistent statistics are not used, default 8)
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_STATUS_OUTPUT
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Enable InnoDB monitor output to the error log.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_STATUS_OUTPUT_LOCKS
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Enable InnoDB lock monitor output to the error log. Requires innodb_status_output=ON.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_STRICT_MODE
+SESSION_VALUE OFF
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Use strict mode when evaluating create options.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_SUPPORT_XA
+SESSION_VALUE ON
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Enable InnoDB support for the XA two-phase commit
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_SYNC_ARRAY_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 1
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 1
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Size of the mutex/lock wait array.
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 1024
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_SYNC_SPIN_LOOPS
+SESSION_VALUE NULL
+GLOBAL_VALUE 30
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 30
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Count of spin-loop rounds in InnoDB mutexes (30 by default)
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_TABLE_LOCKS
+SESSION_VALUE ON
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Enable InnoDB locking in LOCK TABLES
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_THREAD_CONCURRENCY
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 1000
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_THREAD_SLEEP_DELAY
+SESSION_VALUE NULL
+GLOBAL_VALUE 10000
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 10000
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0 disable a sleep
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 1000000
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_TMPDIR
+SESSION_VALUE
+GLOBAL_VALUE
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Directory for temporary non-tablespace files.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_TRX_PURGE_VIEW_UPDATE_ONLY_DEBUG
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Pause actual purging any delete-marked records, but merely update the purge view. It is to create artificially the situation the purge view have been updated but the each purges were not done yet.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NULL
+VARIABLE_NAME INNODB_TRX_RSEG_N_SLOTS_DEBUG
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Debug flags for InnoDB to limit TRX_RSEG_N_SLOTS for trx_rsegf_undo_find_free()
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 1024
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NULL
+VARIABLE_NAME INNODB_UNDO_DIRECTORY
+SESSION_VALUE NULL
+GLOBAL_VALUE .
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE .
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Directory where undo tablespace files live, this path can be absolute.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_UNDO_LOGS
+SESSION_VALUE NULL
+GLOBAL_VALUE 128
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 128
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of undo logs to use.
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 128
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_UNDO_TABLESPACES
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of undo tablespaces to use.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 126
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_USE_ATOMIC_WRITES
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Prevent partial page writes, via atomic writes.The option is used to prevent partial writes in case of a crash/poweroff, as faster alternative to doublewrite buffer.Currently this option works only on Linux only with FusionIO device, and directFS filesystem.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_USE_FALLOCATE
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Preallocate files fast, using operating system functionality. On POSIX systems, posix_fallocate system call is used.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_USE_MTFLUSH
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Use multi-threaded flush. Default FALSE.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_USE_SYS_MALLOC
+SESSION_VALUE NULL
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT DEPRECATED. This option may be removed in future releases, together with the InnoDB's internal memory allocator. Use OS memory allocator instead of InnoDB's internal memory allocator
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_USE_TRIM
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Use trim. Default FALSE.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_VERSION
+SESSION_VALUE NULL
- GLOBAL_VALUE 5.6.42
++GLOBAL_VALUE 5.6.43
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE NULL
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT InnoDB version
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NULL
+VARIABLE_NAME INNODB_WRITE_IO_THREADS
+SESSION_VALUE NULL
+GLOBAL_VALUE 2
+GLOBAL_VALUE_ORIGIN CONFIG
+DEFAULT_VALUE 4
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of background write I/O threads in InnoDB.
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 64
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
diff --cc mysql-test/t/subselect_mat.test
index bf5de741ea0,66a6cc97acb..f554d86c5a9
--- a/mysql-test/t/subselect_mat.test
+++ b/mysql-test/t/subselect_mat.test
@@@ -268,18 -268,15 +268,31 @@@ SELECT * FROM t2 WHERE f IN ( SELECT LE
SELECT * FROM t2 WHERE f IN ( SELECT LEFT('foo',0) FROM t1 ORDER BY 1 );
DROP TABLE t1, t2;
+ --echo #
+ --echo # MDEV-18255: Server crashes in Bitmap<64u>::intersect
+ --echo #
+ create table t1 (v1 varchar(1)) engine=myisam ;
+ create table t2 (v1 varchar(1)) engine=myisam ;
+
+ explain
+ select 1 from t1 where exists
+ (select 1 from t1 where t1.v1 in (select t2.v1 from t2 having t2.v1 < 'j')) ;
+ select 1 from t1 where exists
+ (select 1 from t1 where t1.v1 in (select t2.v1 from t2 having t2.v1 < 'j')) ;
+ drop table t1,t2;
++
+--echo #
+--echo # MDEV-9489: Assertion `0' failed in Protocol::end_statement() on
+--echo # UNION ALL
+--echo #
+
+CREATE TABLE t1 (f1 INT);
+CREATE TABLE t2 (f2 INT);
+INSERT INTO t1 VALUES (1),(2);
+
+( SELECT 1 FROM t1 WHERE f1 NOT IN ( SELECT f2 FROM t2 ) LIMIT 0 )
+UNION ALL
+( SELECT 1 FROM t1 WHERE f1 NOT IN ( SELECT f2 FROM t2 ) )
+;
+
+drop table t1, t2;
diff --cc scripts/mysql_install_db.sh
index 0bbac8ba8c4,0c1dd7c724f..4c63245c923
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@@ -35,10 -35,10 +35,13 @@@ force=
in_rpm=0
ip_only=0
cross_bootstrap=0
+install_params=""
+auth_root_authentication_method=normal
+auth_root_socket_user='root'
+ dirname0=`dirname $0 2>/dev/null`
+ dirname0=`dirname $dirname0 2>/dev/null`
+
usage()
{
cat <<EOF
diff --cc sql/log.cc
index 767070799a9,6761934caf0..a1e7e5b218f
--- a/sql/log.cc
+++ b/sql/log.cc
@@@ -3923,10 -3757,11 +3923,10 @@@ int MYSQL_BIN_LOG::find_log_pos(LOG_INF
// if the log entry matches, null string matching anything
if (!log_name ||
- (log_name_len == fname_len-1 && full_fname[log_name_len] == '\n' &&
+ (log_name_len == fname_len &&
- !memcmp(full_fname, full_log_name, log_name_len)))
+ !strncmp(full_fname, full_log_name, log_name_len)))
{
DBUG_PRINT("info", ("Found log file entry"));
- full_fname[fname_len-1]= 0; // remove last \n
linfo->index_file_start_offset= offset;
linfo->index_file_offset = my_b_tell(&index_file);
break;
diff --cc sql/sql_table.cc
index 670838a4cbb,8a4c6e025fb..55b77c8b934
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@@ -6572,17 -6529,9 +6575,16 @@@ static bool fill_alter_inplace_info(TH
(i) Old table doesn't have primary key, new table has it and vice-versa
(ii) Primary key changed to another existing index
*/
- if ((new_key == new_pk) !=
- ((uint) (table_key - table->key_info) == table->s->primary_key))
+ if ((new_key == new_pk) != (table_key == old_pk))
goto index_changed;
+ /* Check that key comment is not changed. */
+ if (table_key->comment.length != new_key->comment.length ||
+ (table_key->comment.length &&
+ memcmp(table_key->comment.str, new_key->comment.str,
+ table_key->comment.length) != 0))
+ goto index_changed;
+
continue;
index_changed:
diff --cc storage/innobase/handler/handler0alter.cc
index c710a2403e3,40a04c8848f..7e8a8334a4d
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@@ -1,7 -1,7 +1,7 @@@
/*****************************************************************************
Copyright (c) 2005, 2018, Oracle and/or its affiliates. All Rights Reserved.
- Copyright (c) 2013, 2018, MariaDB Corporation.
-Copyright (c) 2017, 2019, MariaDB Corporation.
++Copyright (c) 2013, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
diff --cc storage/tokudb/hatoku_hton.h
index e632a9afe88,e90af067b00..816a66aa440
--- a/storage/tokudb/hatoku_hton.h
+++ b/storage/tokudb/hatoku_hton.h
@@@ -187,10 -187,9 +187,9 @@@ inline int tokudb_killed_callback(void
inline bool tokudb_killed_thd_callback(void* extra,
TOKUDB_UNUSED(uint64_t deleted_rows)) {
THD *thd = static_cast<THD *>(extra);
- return thd_killed(thd) != 0;
+ return thd_kill_level(thd) != 0;
}
- extern HASH tokudb_open_tables;
extern const char* tokudb_hton_name;
extern int tokudb_hton_initialized;
extern tokudb::thread::rwlock_t tokudb_hton_initialized_lock;
1
0
[Commits] 448c35a4c57: Merge remote-tracking branch 'origin/5.5-galera' into 10.0-galera
by jan 01 Feb '19
by jan 01 Feb '19
01 Feb '19
revision-id: 448c35a4c57b1739d72f28fa3412bed0011b60ac (mariadb-galera-10.0.37-4-g448c35a4c57)
parent(s): 944dbb5fd9f5759fe8602fe2179777a93d90a69e 074d51e6151377928864f34b3d8f798b7e8c23d9
author: Jan Lindström
committer: Jan Lindström
timestamp: 2019-02-01 11:16:31 +0200
message:
Merge remote-tracking branch 'origin/5.5-galera' into 10.0-galera
cmake/wsrep.cmake | 4 ++--
mysql-test/r/information_schema.result | 4 +---
mysql-test/r/show_check.result | 6 +++---
mysql-test/suite/funcs_1/r/is_columns_is.result | 16 ++++++++--------
4 files changed, 14 insertions(+), 16 deletions(-)
1
0
revision-id: 944dbb5fd9f5759fe8602fe2179777a93d90a69e (mariadb-galera-10.0.37-3-g944dbb5fd9f)
parent(s): d6feda205af1f05fa7143501674a2d8c28fda561
author: Oleksandr Byelkin
committer: Jan Lindström
timestamp: 2019-02-01 11:05:32 +0200
message:
postmerge rollbacks and fixes
---
mysql-test/mysql-test-run.pl | 21 +++++++++++++++------
mysql-test/suite/galera/r/galera_defaults.result | 1 +
sql/log_event.cc | 12 +-----------
zlib/CMakeLists.txt | 3 ++-
4 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 3ceeb1fab78..4d530e63d49 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -137,6 +137,8 @@ my $opt_start_dirty;
my $opt_start_exit;
my $start_only;
+our @global_suppressions;
+
END {
if ( defined $opt_tmpdir_pid and $opt_tmpdir_pid == $$ )
{
@@ -188,6 +190,8 @@ my @DEFAULT_SUITES= qw(
sys_vars-
unit-
vcol-
+ wsrep-
+ galera-
);
my $opt_suites;
@@ -359,6 +363,7 @@ my $opt_max_test_fail= env_or_val(MTR_MAX_TEST_FAIL => 10);
my $opt_core_on_failure= 0;
my $opt_parallel= $ENV{MTR_PARALLEL} || 1;
+my $opt_port_group_size = $ENV{MTR_PORT_GROUP_SIZE} || 20;
# lock file to stop tests
my $opt_stop_file= $ENV{MTR_STOP_FILE};
@@ -1135,6 +1140,7 @@ sub command_line_setup {
# Specify ports
'build-thread|mtr-build-thread=i' => \$opt_build_thread,
'port-base|mtr-port-base=i' => \$opt_port_base,
+ 'port-group-size=s' => \$opt_port_group_size,
# Test case authoring
'record' => \$opt_record,
@@ -1830,16 +1836,16 @@ sub set_build_thread_ports($) {
$ENV{MTR_BUILD_THREAD}= $build_thread;
# Calculate baseport
- $baseport= $build_thread * 20 + 10000;
- if ( $baseport < 5001 or $baseport + 19 >= 32767 )
+ $baseport= $build_thread * $opt_port_group_size + 10000;
+ if ( $baseport < 5001 or $baseport + $opt_port_group_size >= 32767 )
{
mtr_error("MTR_BUILD_THREAD number results in a port",
"outside 5001 - 32767",
- "($baseport - $baseport + 19)");
+ "($baseport - $baseport + $opt_port_group_size)");
}
mtr_report("Using MTR_BUILD_THREAD $build_thread,",
- "with reserved ports $baseport..".($baseport+19));
+ "with reserved ports $baseport..".($baseport+($opt_port_group_size-1)));
}
@@ -3392,8 +3398,8 @@ sub kill_leftovers ($) {
sub check_ports_free ($)
{
my $bthread= shift;
- my $portbase = $bthread * 10 + 10000;
- for ($portbase..$portbase+9){
+ my $portbase = $bthread * $opt_port_group_size + 10000;
+ for ($portbase..$portbase+($opt_port_group_size-1)){
if (mtr_ping_port($_)){
mtr_report(" - 'localhost:$_' was not free");
return 0; # One port was not free
@@ -4815,6 +4821,7 @@ sub extract_warning_lines ($$) {
# Perl code.
my @antipatterns =
(
+ @global_suppressions,
qr/error .*connecting to master/,
qr/Plugin 'ndbcluster' will be forced to shutdown/,
qr/InnoDB: Error: in ALTER TABLE `test`.`t[12]`/,
@@ -6534,6 +6541,8 @@ Options that specify ports
build-thread=# Can be set in environment variable MTR_BUILD_THREAD.
Set MTR_BUILD_THREAD="auto" to automatically aquire
a build thread id that is unique to current host
+ port-group-size=N Reserve groups of TCP ports of size N for each MTR thread
+
Options for test case authoring
diff --git a/mysql-test/suite/galera/r/galera_defaults.result b/mysql-test/suite/galera/r/galera_defaults.result
index e7a776e9047..8067daec146 100644
--- a/mysql-test/suite/galera/r/galera_defaults.result
+++ b/mysql-test/suite/galera/r/galera_defaults.result
@@ -18,6 +18,7 @@ ORDER BY VARIABLE_NAME;
VARIABLE_NAME VARIABLE_VALUE
WSREP_AUTO_INCREMENT_CONTROL ON
WSREP_CAUSAL_READS ON
+WSREP_CERTIFICATION_RULES strict
WSREP_CERTIFY_NONPK ON
WSREP_CLUSTER_ADDRESS gcomm://
WSREP_CLUSTER_NAME my_wsrep_cluster
diff --git a/sql/log_event.cc b/sql/log_event.cc
index cac31dad33d..8db8eb9f1fd 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -7768,12 +7768,7 @@ User_var_log_event(const char* buf, uint event_len,
val_len= uint4korr(buf + UV_VAL_IS_NULL + UV_VAL_TYPE_SIZE +
UV_CHARSET_NUMBER_SIZE);
- if (val + val_len > buf_end)
- {
- error= true;
- goto err;
- }
-
+
/**
We need to check if this is from an old server
that did not pack information for flags.
@@ -7786,11 +7781,6 @@ User_var_log_event(const char* buf, uint event_len,
we keep the flags set to UNDEF_F.
*/
uint bytes_read= ((val + val_len) - buf_start);
- if (bytes_read > event_len)
- {
- error= true;
- goto err;
- }
if ((data_written - bytes_read) > 0)
{
flags= (uint) *(buf + UV_VAL_IS_NULL + UV_VAL_TYPE_SIZE +
diff --git a/zlib/CMakeLists.txt b/zlib/CMakeLists.txt
index d09f6c13f50..0c224e7ce22 100644
--- a/zlib/CMakeLists.txt
+++ b/zlib/CMakeLists.txt
@@ -116,6 +116,7 @@ if(NOT MINGW)
win32/zlib1.rc # If present will override custom build rule below.
)
endif()
+
# parse the full version number from zlib.h and include in ZLIB_FULL_VERSION
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents)
string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*"
@@ -144,4 +145,4 @@ elseif(UNIX)
if(NOT APPLE)
set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"")
endif()
-endif()
\ No newline at end of file
+endif()
1
0
revision-id: d6feda205af1f05fa7143501674a2d8c28fda561 (mariadb-galera-10.0.37-2-gd6feda205af)
parent(s): c2caca02ac39454e18db8de563e7e7c8eaf8b1c7 368eda060f5922929eb4741e97b37a205591bdf3
author: Jan Lindström
committer: Jan Lindström
timestamp: 2019-02-01 11:02:03 +0200
message:
Merge tag 'mariadb-10.0.38' into 10.0-galera
CMakeLists.txt | 10 +-
client/CMakeLists.txt | 2 +-
client/mysqltest.cc | 51 +-
cmake/build_configurations/mysql_release.cmake | 1 -
cmake/ssl.cmake | 11 +-
cmake/zlib.cmake | 5 -
config.h.cmake | 6 +-
include/my_global.h | 2 +-
include/my_valgrind.h | 4 +-
include/mysql.h | 2 +-
include/mysql.h.pp | 2 +-
include/mysql/service_kill_statement.h | 4 +-
libmysqld/examples/CMakeLists.txt | 2 +-
mysql-test/disabled.def | 1 +
mysql-test/lib/v1/mysql-test-run.pl | 2 +-
mysql-test/mysql-test-run.pl | 2 +-
mysql-test/r/auto_increment_ranges_innodb.result | 14 +
mysql-test/r/bigint.result | 11 +
mysql-test/r/func_group_innodb.result | 30 +
mysql-test/r/huge_frm-6224.result | 2 +
mysql-test/r/innodb_ext_key.result | 95 +
mysql-test/r/mysql.result | 26 +
mysql-test/r/mysqldump.result | 6 +-
mysql-test/r/partition.result | 100 +
mysql-test/r/partition_innodb.result | 26 +
mysql-test/r/range_innodb.result | 42 +
mysql-test/r/read_only.result | 15 +-
mysql-test/r/row-checksum-old.result | 16 +
mysql-test/r/row-checksum.result | 16 +
mysql-test/r/stat_tables.result | 19 +
mysql-test/r/stat_tables_innodb.result | 19 +
mysql-test/r/subselect2.result | 22 +
mysql-test/r/subselect_exists2in.result | 4 +-
mysql-test/r/subselect_mat.result | 16 +
mysql-test/r/union.result | 38 +
mysql-test/r/view.result | 4 +-
.../suite/engines/iuds/r/insert_number.result | 100 +
.../engines/iuds/r/update_delete_number.result | 17 +
.../suite/innodb/r/alter_candidate_key.result | 107 +
mysql-test/suite/innodb/r/foreign_key.result | 33 +
mysql-test/suite/innodb/r/innodb-alter.result | 159 +-
mysql-test/suite/innodb/r/innodb-index.result | 33 +
.../suite/innodb/r/innodb-table-online.result | 11 -
.../suite/innodb/r/innodb-virtual-columns.result | 15 +
mysql-test/suite/innodb/r/innodb_28867993.result | 9 +
mysql-test/suite/innodb/t/alter_candidate_key.test | 72 +
mysql-test/suite/innodb/t/foreign_key.test | 31 +
mysql-test/suite/innodb/t/innodb-alter.test | 114 +-
mysql-test/suite/innodb/t/innodb-index.test | 30 +
mysql-test/suite/innodb/t/innodb-table-online.test | 4 -
.../suite/innodb/t/innodb-virtual-columns.test | 11 +
mysql-test/suite/innodb/t/innodb_28867993.test | 12 +
.../perfschema/r/dml_setup_instruments.result | 4 +-
.../suite/perfschema/t/dml_setup_instruments.test | 5 +-
mysql-test/suite/roles/flush_roles-17898.result | 13 +
mysql-test/suite/roles/flush_roles-17898.test | 11 +
mysql-test/suite/rpl/r/rpl_idempotency.result | 12 +
.../suite/rpl/r/rpl_row_big_table_id_32bit.result | 38 +
.../suite/rpl/r/rpl_row_big_table_id_64bit.result | 38 +
mysql-test/suite/rpl/t/rpl_idempotency.test | 21 +
mysql-test/suite/rpl/t/rpl_row_big_table_id.inc | 56 +
.../suite/rpl/t/rpl_row_big_table_id_32bit.test | 11 +
.../suite/rpl/t/rpl_row_big_table_id_64bit.test | 11 +
.../sys_vars/r/table_definition_cache_basic.result | 16 +-
.../sys_vars/t/table_definition_cache_basic.test | 6 +-
mysql-test/t/auto_increment_ranges_innodb.test | 13 +
mysql-test/t/bigint.test | 9 +
mysql-test/t/func_group_innodb.test | 26 +
mysql-test/t/huge_frm-6224.test | 11 +-
mysql-test/t/innodb_ext_key.test | 106 +
mysql-test/t/mysql.test | 22 +
mysql-test/t/mysqldump.test | 2 +-
mysql-test/t/partition.test | 61 +
mysql-test/t/partition_innodb.test | 30 +
mysql-test/t/range_innodb.test | 42 +
mysql-test/t/read_only.test | 21 +-
mysql-test/t/row-checksum.test | 17 +
mysql-test/t/stat_tables.test | 17 +
mysql-test/t/subselect2.test | 20 +
mysql-test/t/subselect_mat.test | 13 +
mysql-test/t/union.test | 35 +
mysql-test/unstable-tests | 119 +-
mysys/mf_iocache.c | 4 +
mysys/my_file.c | 7 +-
mysys/my_pread.c | 26 +-
mysys/my_read.c | 48 +-
mysys/safemalloc.c | 2 +-
res | 22 -
scripts/mysql_install_db.sh | 19 +-
scripts/mytop.sh | 19 +-
sql-common/client.c | 30 +-
sql/CMakeLists.txt | 2 +-
sql/handler.h | 12 +-
sql/item.h | 4 +
sql/item_cmpfunc.cc | 190 +-
sql/item_cmpfunc.h | 5 +
sql/log.cc | 6 +-
sql/log_event.cc | 2 +-
sql/mysql_install_db.cc | 72 +-
sql/opt_range.cc | 16 +-
sql/partition_info.cc | 54 +-
sql/partition_info.h | 1 +
sql/sql_acl.cc | 115 +-
sql/sql_array.h | 15 +-
sql/sql_const.h | 12 +-
sql/sql_lex.cc | 2 +
sql/sql_parse.cc | 7 +
sql/sql_repl.cc | 6 +-
sql/sql_select.cc | 4 +
sql/sql_statistics.cc | 43 +
sql/sql_statistics.h | 1 +
sql/sql_table.cc | 80 +-
sql/sql_type_int.h | 28 +
sql/sql_update.cc | 2 +-
sql/sql_yacc.yy | 23 +-
sql/sys_vars.cc | 8 +-
sql/table.cc | 48 +-
sql/table.h | 2 +-
sql/table_cache.cc | 5 +-
sql/unireg.h | 2 +-
storage/connect/global.h | 6 +-
storage/connect/ha_connect.cc | 4 +-
storage/connect/jsonudf.cpp | 12 +-
.../mysql-test/connect/r/jdbc_oracle.result | 18 +-
.../mysql-test/connect/r/jdbc_postgresql.result | 10 +-
.../connect/mysql-test/connect/r/part_table.result | 4 +-
.../connect/mysql-test/connect/t/part_table.test | 2 +-
storage/connect/plugutil.cpp | 28 +-
storage/connect/reldef.cpp | 11 +-
storage/connect/tabfmt.h | 2 +-
storage/connect/tabjson.cpp | 52 +-
storage/connect/tabjson.h | 8 +-
storage/connect/tabodbc.cpp | 317 +--
storage/connect/tabxml.cpp | 292 +--
storage/connect/tabxml.h | 6 +-
storage/connect/user_connect.cc | 4 +-
storage/innobase/buf/buf0buf.cc | 172 +-
storage/innobase/dict/dict0dict.cc | 7 +-
storage/innobase/dict/dict0mem.cc | 4 +-
storage/innobase/fil/fil0fil.cc | 27 +-
storage/innobase/fts/fts0fts.cc | 20 +-
storage/innobase/handler/ha_innodb.cc | 103 +-
storage/innobase/handler/ha_innodb.h | 2 +-
storage/innobase/handler/handler0alter.cc | 174 +-
storage/innobase/include/buf0buf.h | 6 +-
storage/innobase/include/dict0mem.h | 4 +-
storage/innobase/include/fil0fil.h | 20 +-
storage/innobase/include/os0file.h | 6 +-
storage/innobase/include/page0page.h | 15 +-
storage/innobase/include/page0zip.h | 15 -
storage/innobase/include/univ.i | 13 +-
storage/innobase/os/os0proc.cc | 3 -
storage/innobase/page/page0page.cc | 42 -
storage/innobase/page/page0zip.cc | 95 +-
storage/innobase/row/row0ftsort.cc | 7 +-
storage/innobase/row/row0merge.cc | 5 +-
storage/innobase/row/row0mysql.cc | 6 +-
storage/innobase/row/row0sel.cc | 4 +-
storage/innobase/srv/srv0start.cc | 4 +
storage/tokudb/PerconaFT/COPYING.APACHEv2 | 174 ++
storage/tokudb/PerconaFT/README.md | 5 +-
storage/tokudb/PerconaFT/ft/txn/txn_manager.h | 4 +-
.../tokudb/PerconaFT/locktree/concurrent_tree.cc | 14 +
.../tokudb/PerconaFT/locktree/concurrent_tree.h | 14 +
storage/tokudb/PerconaFT/locktree/keyrange.cc | 13 +
storage/tokudb/PerconaFT/locktree/keyrange.h | 13 +
storage/tokudb/PerconaFT/locktree/lock_request.cc | 13 +
storage/tokudb/PerconaFT/locktree/lock_request.h | 13 +
storage/tokudb/PerconaFT/locktree/locktree.cc | 13 +
storage/tokudb/PerconaFT/locktree/locktree.h | 13 +
storage/tokudb/PerconaFT/locktree/manager.cc | 13 +
storage/tokudb/PerconaFT/locktree/range_buffer.cc | 13 +
storage/tokudb/PerconaFT/locktree/range_buffer.h | 13 +
storage/tokudb/PerconaFT/locktree/treenode.cc | 13 +
storage/tokudb/PerconaFT/locktree/treenode.h | 13 +
storage/tokudb/PerconaFT/locktree/txnid_set.cc | 13 +
storage/tokudb/PerconaFT/locktree/txnid_set.h | 13 +
storage/tokudb/PerconaFT/locktree/wfg.cc | 13 +
storage/tokudb/PerconaFT/locktree/wfg.h | 13 +
.../PerconaFT/portability/toku_instr_mysql.cc | 12 +-
.../PerconaFT/portability/toku_instr_mysql.h | 11 +-
.../tokudb/PerconaFT/portability/toku_pthread.h | 78 +-
storage/tokudb/PerconaFT/util/growable_array.h | 13 +
storage/tokudb/PerconaFT/util/omt.cc | 2261 +++++++++++---------
storage/tokudb/PerconaFT/util/omt.h | 13 +
storage/tokudb/ha_tokudb.cc | 10 +
storage/tokudb/hatoku_hton.cc | 4 +-
storage/tokudb/hatoku_hton.h | 1 -
.../mysql-test/tokudb/t/change_column_bin.py | 0
.../tokudb/t/change_column_bin_rename.py | 0
.../mysql-test/tokudb/t/change_column_char.py | 0
.../tokudb/t/change_column_char_binary.py | 0
.../tokudb/t/change_column_char_charbinary.py | 0
.../tokudb/t/change_column_char_rename.py | 0
.../mysql-test/tokudb/t/change_column_int.py | 0
.../mysql-test/tokudb/t/change_column_int_key.py | 0
.../tokudb/t/change_column_int_not_supported.py | 0
.../tokudb/t/change_column_int_rename.py | 0
.../tokudb/mysql-test/tokudb_bugs/r/PS-4979.result | 2 +
.../tokudb/mysql-test/tokudb_bugs/t/PS-4979.test | 13 +
storage/tokudb/tokudb_background.cc | 4 +-
storage/tokudb/tokudb_sysvars.cc | 14 +-
storage/tokudb/tokudb_sysvars.h | 4 +-
storage/xtradb/buf/buf0buf.cc | 174 +-
storage/xtradb/dict/dict0dict.cc | 7 +-
storage/xtradb/dict/dict0mem.cc | 4 +-
storage/xtradb/fil/fil0fil.cc | 36 +-
storage/xtradb/fts/fts0fts.cc | 20 +-
storage/xtradb/fts/fts0pars.cc | 4 +-
storage/xtradb/fts/fts0pars.y | 4 +-
storage/xtradb/handler/ha_innodb.cc | 103 +-
storage/xtradb/handler/ha_innodb.h | 8 +-
storage/xtradb/handler/handler0alter.cc | 141 +-
storage/xtradb/include/buf0buf.h | 6 +-
storage/xtradb/include/data0type.ic | 1 +
storage/xtradb/include/dict0mem.h | 7 +-
storage/xtradb/include/fil0fil.h | 20 +-
storage/xtradb/include/page0page.h | 18 +-
storage/xtradb/include/univ.i | 15 +-
storage/xtradb/log/log0online.cc | 41 +-
storage/xtradb/os/os0proc.cc | 3 -
storage/xtradb/page/page0page.cc | 46 -
storage/xtradb/page/page0zip.cc | 87 +-
storage/xtradb/row/row0ftsort.cc | 7 +-
storage/xtradb/row/row0import.cc | 9 +-
storage/xtradb/row/row0mysql.cc | 15 +-
storage/xtradb/row/row0sel.cc | 5 +-
storage/xtradb/srv/srv0start.cc | 3 +
support-files/mysql.server.sh | 6 +-
unittest/mysys/lf-t.c | 5 -
unittest/mysys/my_atomic-t.c | 17 +-
unittest/mysys/thr_template.c | 31 +-
unittest/mysys/waiting_threads-t.c | 4 +-
win/packaging/heidisql.cmake | 2 +-
234 files changed, 5459 insertions(+), 2902 deletions(-)
diff --cc storage/innobase/handler/ha_innodb.cc
index 2244cd1101a,f7c8573cd62..ecf2318bf81
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@@ -9825,446 -9041,6 +9822,435 @@@ next_record
return(HA_ERR_END_OF_FILE);
}
- /*************************************************************************
- */
-
- void
- ha_innobase::ft_end()
- {
- fprintf(stderr, "ft_end()\n");
-
- rnd_end();
- }
+#ifdef WITH_WSREP
+extern dict_index_t*
+wsrep_dict_foreign_find_index(
+ dict_table_t* table,
+ const char** col_names,
+ const char** columns,
+ ulint n_cols,
+ dict_index_t* types_idx,
+ ibool check_charsets,
+ ulint check_null);
+
+inline
+const char*
+wsrep_key_type_to_str(wsrep_key_type type)
+{
+ switch (type) {
+ case WSREP_KEY_SHARED:
+ return "shared";
+ case WSREP_KEY_SEMI:
+ return "semi";
+ case WSREP_KEY_EXCLUSIVE:
+ return "exclusive";
+ };
+ return "unknown";
+}
+
+ulint
+wsrep_append_foreign_key(
+/*===========================*/
+ trx_t* trx, /*!< in: trx */
+ dict_foreign_t* foreign, /*!< in: foreign key constraint */
+ const rec_t* rec, /*!<in: clustered index record */
+ dict_index_t* index, /*!<in: clustered index */
+ ibool referenced, /*!<in: is check for referenced table */
+ wsrep_key_type key_type) /*!< in: access type of this key
+ (shared, exclusive, semi...) */
+{
+ ut_a(trx);
+ THD* thd = (THD*)trx->mysql_thd;
+ ulint rcode = DB_SUCCESS;
+ char cache_key[513] = {'\0'};
+ int cache_key_len;
+ bool const copy = true;
+
+ if (!wsrep_on(trx->mysql_thd) ||
+ wsrep_thd_exec_mode(thd) != LOCAL_STATE)
+ return DB_SUCCESS;
+
+ if (!thd || !foreign ||
+ (!foreign->referenced_table && !foreign->foreign_table))
+ {
+ WSREP_INFO("FK: %s missing in: %s",
+ (!thd) ? "thread" :
+ ((!foreign) ? "constraint" :
+ ((!foreign->referenced_table) ?
+ "referenced table" : "foreign table")),
+ (thd && wsrep_thd_query(thd)) ?
+ wsrep_thd_query(thd) : "void");
+ return DB_ERROR;
+ }
+
+ if ( !((referenced) ?
+ foreign->referenced_table : foreign->foreign_table))
+ {
+ WSREP_DEBUG("pulling %s table into cache",
+ (referenced) ? "referenced" : "foreign");
+ mutex_enter(&(dict_sys->mutex));
+ if (referenced)
+ {
+ foreign->referenced_table =
+ dict_table_get_low(
+ foreign->referenced_table_name_lookup);
+ if (foreign->referenced_table)
+ {
+ foreign->referenced_index =
+ wsrep_dict_foreign_find_index(
+ foreign->referenced_table, NULL,
+ foreign->referenced_col_names,
+ foreign->n_fields,
+ foreign->foreign_index,
+ TRUE, FALSE);
+ }
+ }
+ else
+ {
+ foreign->foreign_table =
+ dict_table_get_low(
+ foreign->foreign_table_name_lookup);
+ if (foreign->foreign_table)
+ {
+ foreign->foreign_index =
+ wsrep_dict_foreign_find_index(
+ foreign->foreign_table, NULL,
+ foreign->foreign_col_names,
+ foreign->n_fields,
+ foreign->referenced_index,
+ TRUE, FALSE);
+ }
+ }
+ mutex_exit(&(dict_sys->mutex));
+ }
+
+ if ( !((referenced) ?
+ foreign->referenced_table : foreign->foreign_table))
+ {
+ WSREP_WARN("FK: %s missing in query: %s",
+ (!foreign->referenced_table) ?
+ "referenced table" : "foreign table",
+ (wsrep_thd_query(thd)) ?
+ wsrep_thd_query(thd) : "void");
+ return DB_ERROR;
+ }
+ byte key[WSREP_MAX_SUPPORTED_KEY_LENGTH+1] = {'\0'};
+ ulint len = WSREP_MAX_SUPPORTED_KEY_LENGTH;
+
+ dict_index_t *idx_target = (referenced) ?
+ foreign->referenced_index : index;
+ dict_index_t *idx = (referenced) ?
+ UT_LIST_GET_FIRST(foreign->referenced_table->indexes) :
+ UT_LIST_GET_FIRST(foreign->foreign_table->indexes);
+ int i = 0;
+ while (idx != NULL && idx != idx_target) {
+ if (innobase_strcasecmp (idx->name, innobase_index_reserve_name) != 0) {
+ i++;
+ }
+ idx = UT_LIST_GET_NEXT(indexes, idx);
+ }
+ ut_a(idx);
+ key[0] = (char)i;
+
+ rcode = wsrep_rec_get_foreign_key(
+ &key[1], &len, rec, index, idx,
+ wsrep_protocol_version > 1);
+
+ if (rcode != DB_SUCCESS) {
+ WSREP_ERROR(
+ "FK key set failed: %lu (%lu %s), index: %s %s, %s",
+ rcode, referenced, wsrep_key_type_to_str(key_type),
+ (index && index->name) ? index->name :
+ "void index",
+ (index && index->table_name) ? index->table_name :
+ "void table",
+ wsrep_thd_query(thd));
+ return DB_ERROR;
+ }
+
+ strncpy(cache_key,
+ (wsrep_protocol_version > 1) ?
+ ((referenced) ?
+ foreign->referenced_table->name :
+ foreign->foreign_table->name) :
+ foreign->foreign_table->name, sizeof(cache_key) - 1);
+ cache_key_len = strlen(cache_key);
+#ifdef WSREP_DEBUG_PRINT
+ ulint j;
+ fprintf(stderr, "FK parent key, table: %s %s len: %lu ",
+ cache_key, (shared) ? "shared" : "exclusive", len+1);
+ for (j=0; j<len+1; j++) {
+ fprintf(stderr, " %hhX, ", key[j]);
+ }
+ fprintf(stderr, "\n");
+#endif
+ char *p = strchr(cache_key, '/');
+ if (p) {
+ *p = '\0';
+ } else {
+ WSREP_WARN("unexpected foreign key table %s %s",
+ foreign->referenced_table->name,
+ foreign->foreign_table->name);
+ }
+
+ wsrep_buf_t wkey_part[3];
+ wsrep_key_t wkey = {wkey_part, 3};
+ if (!wsrep_prepare_key_for_innodb(
+ (const uchar*)cache_key,
+ cache_key_len + 1,
+ (const uchar*)key, len+1,
+ wkey_part,
+ (size_t*)&wkey.key_parts_num)) {
+ WSREP_WARN("key prepare failed for cascaded FK: %s",
+ (wsrep_thd_query(thd)) ?
+ wsrep_thd_query(thd) : "void");
+ return DB_ERROR;
+ }
+ rcode = (int)wsrep->append_key(
+ wsrep,
+ wsrep_ws_handle(thd, trx),
+ &wkey,
+ 1,
+ key_type,
+ copy);
+ if (rcode) {
+ DBUG_PRINT("wsrep", ("row key failed: %lu", rcode));
+ WSREP_ERROR("Appending cascaded fk row key failed: %s, %lu",
+ (wsrep_thd_query(thd)) ?
+ wsrep_thd_query(thd) : "void", rcode);
+ return DB_ERROR;
+ }
+
+ return DB_SUCCESS;
+}
+
+static int
+wsrep_append_key(
+/*==================*/
+ THD *thd,
+ trx_t *trx,
+ TABLE_SHARE *table_share,
+ TABLE *table,
+ const char* key,
+ uint16_t key_len,
+ wsrep_key_type key_type /*!< in: access type of this key
+ (shared, exclusive, semi...) */
+)
+{
+ DBUG_ENTER("wsrep_append_key");
+ bool const copy = true;
+#ifdef WSREP_DEBUG_PRINT
+ fprintf(stderr, "%s conn %ld, trx %llu, keylen %d, table %s\n Query: %s ",
+ wsrep_key_type_to_str(key_type),
+ wsrep_thd_thread_id(thd), trx->id, key_len,
+ table_share->table_name.str, wsrep_thd_query(thd));
+ for (int i=0; i<key_len; i++) {
+ fprintf(stderr, "%hhX, ", key[i]);
+ }
+ fprintf(stderr, "\n");
+#endif
+ wsrep_buf_t wkey_part[3];
+ wsrep_key_t wkey = {wkey_part, 3};
+ if (!wsrep_prepare_key_for_innodb(
+ (const uchar*)table_share->table_cache_key.str,
+ table_share->table_cache_key.length,
+ (const uchar*)key, key_len,
+ wkey_part,
+ (size_t*)&wkey.key_parts_num)) {
+ WSREP_WARN("key prepare failed for: %s",
+ (wsrep_thd_query(thd)) ?
+ wsrep_thd_query(thd) : "void");
+ DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
+ }
+
+ int rcode = (int)wsrep->append_key(
+ wsrep,
+ wsrep_ws_handle(thd, trx),
+ &wkey,
+ 1,
+ key_type,
+ copy);
+ if (rcode) {
+ DBUG_PRINT("wsrep", ("row key failed: %d", rcode));
+ WSREP_WARN("Appending row key failed: %s, %d",
+ (wsrep_thd_query(thd)) ?
+ wsrep_thd_query(thd) : "void", rcode);
+ DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
+ }
+ DBUG_RETURN(0);
+}
+
+extern void compute_md5_hash(char *digest, const char *buf, int len);
+#define MD5_HASH compute_md5_hash
+
+static bool
+referenced_by_foreign_key2(dict_table_t* table,
+ dict_index_t* index) {
+ ut_ad(table != NULL);
+ ut_ad(index != NULL);
+
+ const dict_foreign_set* fks = &table->referenced_set;
+ for (dict_foreign_set::const_iterator it = fks->begin();
+ it != fks->end();
+ ++it)
+ {
+ dict_foreign_t* foreign = *it;
+ if (foreign->referenced_index != index) {
+ continue;
+ }
+ ut_ad(table == foreign->referenced_table);
+ return true;
+ }
+ return false;
+}
+
+int
+ha_innobase::wsrep_append_keys(
+/*==================*/
+ THD *thd,
+ wsrep_key_type key_type, /*!< in: access type of this key
+ (shared, exclusive, semi...) */
+ const uchar* record0, /* in: row in MySQL format */
+ const uchar* record1) /* in: row in MySQL format */
+{
+ int rcode;
+ DBUG_ENTER("wsrep_append_keys");
+
+ bool key_appended = false;
+ trx_t *trx = thd_to_trx(thd);
+
+ if (table_share && table_share->tmp_table != NO_TMP_TABLE) {
+ WSREP_DEBUG("skipping tmp table DML: THD: %lu tmp: %d SQL: %s",
+ wsrep_thd_thread_id(thd),
+ table_share->tmp_table,
+ (wsrep_thd_query(thd)) ?
+ wsrep_thd_query(thd) : "void");
+ DBUG_RETURN(0);
+ }
+
+ if (wsrep_protocol_version == 0) {
+ uint len;
+ char keyval[WSREP_MAX_SUPPORTED_KEY_LENGTH+1] = {'\0'};
+ char *key = &keyval[0];
+ ibool is_null;
+
+ len = wsrep_store_key_val_for_row(
+ thd, table, 0, key, WSREP_MAX_SUPPORTED_KEY_LENGTH,
+ record0, &is_null);
+
+ if (!is_null) {
+ rcode = wsrep_append_key(
+ thd, trx, table_share, table, keyval,
+ len, key_type);
+ if (rcode) DBUG_RETURN(rcode);
+ }
+ else
+ {
+ WSREP_DEBUG("NULL key skipped (proto 0): %s",
+ wsrep_thd_query(thd));
+ }
+ } else {
+ ut_a(table->s->keys <= 256);
+ uint i;
+ bool hasPK= false;
+
+ for (i=0; i<table->s->keys; ++i) {
+ KEY* key_info = table->key_info + i;
+ if (key_info->flags & HA_NOSAME) {
+ hasPK = true;
+ }
+ }
+
+ for (i=0; i<table->s->keys; ++i) {
+ uint len;
+ char keyval0[WSREP_MAX_SUPPORTED_KEY_LENGTH+1] = {'\0'};
+ char keyval1[WSREP_MAX_SUPPORTED_KEY_LENGTH+1] = {'\0'};
+ char* key0 = &keyval0[1];
+ char* key1 = &keyval1[1];
+ KEY* key_info = table->key_info + i;
+ ibool is_null;
+
+ dict_index_t* idx = innobase_get_index(i);
+ dict_table_t* tab = (idx) ? idx->table : NULL;
+
+ keyval0[0] = (char)i;
+ keyval1[0] = (char)i;
+
+ if (!tab) {
+ WSREP_WARN("MySQL-InnoDB key mismatch %s %s",
+ table->s->table_name.str,
+ key_info->name);
+ }
+ /* !hasPK == table with no PK, must append all non-unique keys */
+ if (!hasPK || key_info->flags & HA_NOSAME ||
+ ((tab &&
+ referenced_by_foreign_key2(tab, idx)) ||
+ (!tab && referenced_by_foreign_key()))) {
+
+ len = wsrep_store_key_val_for_row(
+ thd, table, i, key0,
+ WSREP_MAX_SUPPORTED_KEY_LENGTH,
+ record0, &is_null);
+ if (!is_null) {
+ rcode = wsrep_append_key(
+ thd, trx, table_share, table,
+ keyval0, len+1, key_type);
+ if (rcode) DBUG_RETURN(rcode);
+
+ if (key_info->flags & HA_NOSAME ||
+ key_type == WSREP_KEY_SHARED)
+ key_appended = true;
+ }
+ else
+ {
+ WSREP_DEBUG("NULL key skipped: %s",
+ wsrep_thd_query(thd));
+ }
+ if (record1) {
+ len = wsrep_store_key_val_for_row(
+ thd, table, i, key1,
+ WSREP_MAX_SUPPORTED_KEY_LENGTH,
+ record1, &is_null);
+ if (!is_null && memcmp(key0, key1, len)) {
+ rcode = wsrep_append_key(
+ thd, trx, table_share,
+ table,
+ keyval1, len+1, key_type);
+ if (rcode) DBUG_RETURN(rcode);
+ }
+ }
+ }
+ }
+ }
+
+ /* if no PK, calculate hash of full row, to be the key value */
+ if (!key_appended && wsrep_certify_nonPK) {
+ uchar digest[16];
+ int rcode;
+
+ wsrep_calc_row_hash(digest, record0, table, prebuilt, thd);
+ if ((rcode = wsrep_append_key(thd, trx, table_share, table,
+ (const char*) digest, 16,
+ key_type))) {
+ DBUG_RETURN(rcode);
+ }
+
+ if (record1) {
+ wsrep_calc_row_hash(
+ digest, record1, table, prebuilt, thd);
+ if ((rcode = wsrep_append_key(thd, trx, table_share,
+ table,
+ (const char*) digest,
+ 16, key_type))) {
+ DBUG_RETURN(rcode);
+ }
+ }
+ DBUG_RETURN(0);
+ }
+
+ DBUG_RETURN(0);
+}
+#endif /* WITH_WSREP */
-
/*********************************************************************//**
Stores a reference to the current row to 'ref' field of the handle. Note
that in the case where we have generated the clustered index for the
diff --cc storage/xtradb/handler/ha_innodb.cc
index 89539bfeed2,3a7b5b493a2..8c0db0231ed
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@@ -10591,446 -9812,6 +10593,435 @@@ next_record
return(HA_ERR_END_OF_FILE);
}
- /*************************************************************************
- */
-
- void
- ha_innobase::ft_end()
- {
- fprintf(stderr, "ft_end()\n");
-
- rnd_end();
- }
+#ifdef WITH_WSREP
+extern dict_index_t*
+wsrep_dict_foreign_find_index(
+ dict_table_t* table,
+ const char** col_names,
+ const char** columns,
+ ulint n_cols,
+ dict_index_t* types_idx,
+ ibool check_charsets,
+ ulint check_null);
+
+inline
+const char*
+wsrep_key_type_to_str(wsrep_key_type type)
+{
+ switch (type) {
+ case WSREP_KEY_SHARED:
+ return "shared";
+ case WSREP_KEY_SEMI:
+ return "semi";
+ case WSREP_KEY_EXCLUSIVE:
+ return "exclusive";
+ };
+ return "unknown";
+}
+
+ulint
+wsrep_append_foreign_key(
+/*===========================*/
+ trx_t* trx, /*!< in: trx */
+ dict_foreign_t* foreign, /*!< in: foreign key constraint */
+ const rec_t* rec, /*!<in: clustered index record */
+ dict_index_t* index, /*!<in: clustered index */
+ ibool referenced, /*!<in: is check for referenced table */
+ wsrep_key_type key_type) /*!< in: access type of this key
+ (shared, exclusive, semi...) */
+{
+ ut_a(trx);
+ THD* thd = (THD*)trx->mysql_thd;
+ ulint rcode = DB_SUCCESS;
+ char cache_key[513] = {'\0'};
+ int cache_key_len;
+ bool const copy = true;
+
+ if (!wsrep_on(trx->mysql_thd) ||
+ wsrep_thd_exec_mode(thd) != LOCAL_STATE)
+ return DB_SUCCESS;
+
+ if (!thd || !foreign ||
+ (!foreign->referenced_table && !foreign->foreign_table))
+ {
+ WSREP_INFO("FK: %s missing in: %s",
+ (!thd) ? "thread" :
+ ((!foreign) ? "constraint" :
+ ((!foreign->referenced_table) ?
+ "referenced table" : "foreign table")),
+ (thd && wsrep_thd_query(thd)) ?
+ wsrep_thd_query(thd) : "void");
+ return DB_ERROR;
+ }
+
+ if ( !((referenced) ?
+ foreign->referenced_table : foreign->foreign_table))
+ {
+ WSREP_DEBUG("pulling %s table into cache",
+ (referenced) ? "referenced" : "foreign");
+ mutex_enter(&(dict_sys->mutex));
+ if (referenced)
+ {
+ foreign->referenced_table =
+ dict_table_get_low(
+ foreign->referenced_table_name_lookup);
+ if (foreign->referenced_table)
+ {
+ foreign->referenced_index =
+ wsrep_dict_foreign_find_index(
+ foreign->referenced_table, NULL,
+ foreign->referenced_col_names,
+ foreign->n_fields,
+ foreign->foreign_index,
+ TRUE, FALSE);
+ }
+ }
+ else
+ {
+ foreign->foreign_table =
+ dict_table_get_low(
+ foreign->foreign_table_name_lookup);
+ if (foreign->foreign_table)
+ {
+ foreign->foreign_index =
+ wsrep_dict_foreign_find_index(
+ foreign->foreign_table, NULL,
+ foreign->foreign_col_names,
+ foreign->n_fields,
+ foreign->referenced_index,
+ TRUE, FALSE);
+ }
+ }
+ mutex_exit(&(dict_sys->mutex));
+ }
+
+ if ( !((referenced) ?
+ foreign->referenced_table : foreign->foreign_table))
+ {
+ WSREP_WARN("FK: %s missing in query: %s",
+ (!foreign->referenced_table) ?
+ "referenced table" : "foreign table",
+ (wsrep_thd_query(thd)) ?
+ wsrep_thd_query(thd) : "void");
+ return DB_ERROR;
+ }
+ byte key[WSREP_MAX_SUPPORTED_KEY_LENGTH+1] = {'\0'};
+ ulint len = WSREP_MAX_SUPPORTED_KEY_LENGTH;
+
+ dict_index_t *idx_target = (referenced) ?
+ foreign->referenced_index : index;
+ dict_index_t *idx = (referenced) ?
+ UT_LIST_GET_FIRST(foreign->referenced_table->indexes) :
+ UT_LIST_GET_FIRST(foreign->foreign_table->indexes);
+ int i = 0;
+ while (idx != NULL && idx != idx_target) {
+ if (innobase_strcasecmp (idx->name, innobase_index_reserve_name) != 0) {
+ i++;
+ }
+ idx = UT_LIST_GET_NEXT(indexes, idx);
+ }
+ ut_a(idx);
+ key[0] = (char)i;
+
+ rcode = wsrep_rec_get_foreign_key(
+ &key[1], &len, rec, index, idx,
+ wsrep_protocol_version > 1);
+
+ if (rcode != DB_SUCCESS) {
+ WSREP_ERROR(
+ "FK key set failed: %lu (%lu %s), index: %s %s, %s",
+ rcode, referenced, wsrep_key_type_to_str(key_type),
+ (index && index->name) ? index->name :
+ "void index",
+ (index && index->table_name) ? index->table_name :
+ "void table",
+ wsrep_thd_query(thd));
+ return DB_ERROR;
+ }
+
+ strncpy(cache_key,
+ (wsrep_protocol_version > 1) ?
+ ((referenced) ?
+ foreign->referenced_table->name :
+ foreign->foreign_table->name) :
+ foreign->foreign_table->name, sizeof(cache_key) - 1);
+ cache_key_len = strlen(cache_key);
+#ifdef WSREP_DEBUG_PRINT
+ ulint j;
+ fprintf(stderr, "FK parent key, table: %s %s len: %lu ",
+ cache_key, (shared) ? "shared" : "exclusive", len+1);
+ for (j=0; j<len+1; j++) {
+ fprintf(stderr, " %hhX, ", key[j]);
+ }
+ fprintf(stderr, "\n");
+#endif
+ char *p = strchr(cache_key, '/');
+ if (p) {
+ *p = '\0';
+ } else {
+ WSREP_WARN("unexpected foreign key table %s %s",
+ foreign->referenced_table->name,
+ foreign->foreign_table->name);
+ }
+
+ wsrep_buf_t wkey_part[3];
+ wsrep_key_t wkey = {wkey_part, 3};
+ if (!wsrep_prepare_key_for_innodb(
+ (const uchar*)cache_key,
+ cache_key_len + 1,
+ (const uchar*)key, len+1,
+ wkey_part,
+ (size_t*)&wkey.key_parts_num)) {
+ WSREP_WARN("key prepare failed for cascaded FK: %s",
+ (wsrep_thd_query(thd)) ?
+ wsrep_thd_query(thd) : "void");
+ return DB_ERROR;
+ }
+ rcode = (int)wsrep->append_key(
+ wsrep,
+ wsrep_ws_handle(thd, trx),
+ &wkey,
+ 1,
+ key_type,
+ copy);
+ if (rcode) {
+ DBUG_PRINT("wsrep", ("row key failed: %lu", rcode));
+ WSREP_ERROR("Appending cascaded fk row key failed: %s, %lu",
+ (wsrep_thd_query(thd)) ?
+ wsrep_thd_query(thd) : "void", rcode);
+ return DB_ERROR;
+ }
+
+ return DB_SUCCESS;
+}
+
+static int
+wsrep_append_key(
+/*==================*/
+ THD *thd,
+ trx_t *trx,
+ TABLE_SHARE *table_share,
+ TABLE *table,
+ const char* key,
+ uint16_t key_len,
+ wsrep_key_type key_type /*!< in: access type of this key
+ (shared, exclusive, semi...) */
+)
+{
+ DBUG_ENTER("wsrep_append_key");
+ bool const copy = true;
+#ifdef WSREP_DEBUG_PRINT
+ fprintf(stderr, "%s conn %ld, trx %llu, keylen %d, table %s\n Query: %s ",
+ wsrep_key_type_to_str(key_type),
+ wsrep_thd_thread_id(thd), trx->id, key_len,
+ table_share->table_name.str, wsrep_thd_query(thd));
+ for (int i=0; i<key_len; i++) {
+ fprintf(stderr, "%hhX, ", key[i]);
+ }
+ fprintf(stderr, "\n");
+#endif
+ wsrep_buf_t wkey_part[3];
+ wsrep_key_t wkey = {wkey_part, 3};
+ if (!wsrep_prepare_key_for_innodb(
+ (const uchar*)table_share->table_cache_key.str,
+ table_share->table_cache_key.length,
+ (const uchar*)key, key_len,
+ wkey_part,
+ (size_t*)&wkey.key_parts_num)) {
+ WSREP_WARN("key prepare failed for: %s",
+ (wsrep_thd_query(thd)) ?
+ wsrep_thd_query(thd) : "void");
+ DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
+ }
+
+ int rcode = (int)wsrep->append_key(
+ wsrep,
+ wsrep_ws_handle(thd, trx),
+ &wkey,
+ 1,
+ key_type,
+ copy);
+ if (rcode) {
+ DBUG_PRINT("wsrep", ("row key failed: %d", rcode));
+ WSREP_WARN("Appending row key failed: %s, %d",
+ (wsrep_thd_query(thd)) ?
+ wsrep_thd_query(thd) : "void", rcode);
+ DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
+ }
+ DBUG_RETURN(0);
+}
+
+extern void compute_md5_hash(char *digest, const char *buf, int len);
+#define MD5_HASH compute_md5_hash
+
+static bool
+referenced_by_foreign_key2(dict_table_t* table,
+ dict_index_t* index) {
+ ut_ad(table != NULL);
+ ut_ad(index != NULL);
+
+ const dict_foreign_set* fks = &table->referenced_set;
+ for (dict_foreign_set::const_iterator it = fks->begin();
+ it != fks->end();
+ ++it)
+ {
+ dict_foreign_t* foreign = *it;
+ if (foreign->referenced_index != index) {
+ continue;
+ }
+ ut_ad(table == foreign->referenced_table);
+ return true;
+ }
+ return false;
+}
+
+int
+ha_innobase::wsrep_append_keys(
+/*==================*/
+ THD *thd,
+ wsrep_key_type key_type, /*!< in: access type of this key
+ (shared, exclusive, semi...) */
+ const uchar* record0, /* in: row in MySQL format */
+ const uchar* record1) /* in: row in MySQL format */
+{
+ int rcode;
+ DBUG_ENTER("wsrep_append_keys");
+
+ bool key_appended = false;
+ trx_t *trx = thd_to_trx(thd);
+
+ if (table_share && table_share->tmp_table != NO_TMP_TABLE) {
+ WSREP_DEBUG("skipping tmp table DML: THD: %lu tmp: %d SQL: %s",
+ wsrep_thd_thread_id(thd),
+ table_share->tmp_table,
+ (wsrep_thd_query(thd)) ?
+ wsrep_thd_query(thd) : "void");
+ DBUG_RETURN(0);
+ }
+
+ if (wsrep_protocol_version == 0) {
+ uint len;
+ char keyval[WSREP_MAX_SUPPORTED_KEY_LENGTH+1] = {'\0'};
+ char *key = &keyval[0];
+ ibool is_null;
+
+ len = wsrep_store_key_val_for_row(
+ thd, table, 0, key, WSREP_MAX_SUPPORTED_KEY_LENGTH,
+ record0, prebuilt, &is_null);
+
+ if (!is_null) {
+ rcode = wsrep_append_key(
+ thd, trx, table_share, table, keyval,
+ len, key_type);
+ if (rcode) DBUG_RETURN(rcode);
+ }
+ else
+ {
+ WSREP_DEBUG("NULL key skipped (proto 0): %s",
+ wsrep_thd_query(thd));
+ }
+ } else {
+ ut_a(table->s->keys <= 256);
+ uint i;
+ bool hasPK= false;
+
+ for (i=0; i<table->s->keys; ++i) {
+ KEY* key_info = table->key_info + i;
+ if (key_info->flags & HA_NOSAME) {
+ hasPK = true;
+ }
+ }
+
+ for (i=0; i<table->s->keys; ++i) {
+ uint len;
+ char keyval0[WSREP_MAX_SUPPORTED_KEY_LENGTH+1] = {'\0'};
+ char keyval1[WSREP_MAX_SUPPORTED_KEY_LENGTH+1] = {'\0'};
+ char* key0 = &keyval0[1];
+ char* key1 = &keyval1[1];
+ KEY* key_info = table->key_info + i;
+ ibool is_null;
+
+ dict_index_t* idx = innobase_get_index(i);
+ dict_table_t* tab = (idx) ? idx->table : NULL;
+
+ keyval0[0] = (char)i;
+ keyval1[0] = (char)i;
+
+ if (!tab) {
+ WSREP_WARN("MySQL-InnoDB key mismatch %s %s",
+ table->s->table_name.str,
+ key_info->name);
+ }
+ /* !hasPK == table with no PK, must append all non-unique keys */
+ if (!hasPK || key_info->flags & HA_NOSAME ||
+ ((tab &&
+ referenced_by_foreign_key2(tab, idx)) ||
+ (!tab && referenced_by_foreign_key()))) {
+
+ len = wsrep_store_key_val_for_row(
+ thd, table, i, key0,
+ WSREP_MAX_SUPPORTED_KEY_LENGTH,
+ record0, prebuilt, &is_null);
+ if (!is_null) {
+ rcode = wsrep_append_key(
+ thd, trx, table_share, table,
+ keyval0, len+1, key_type);
+ if (rcode) DBUG_RETURN(rcode);
+
+ if (key_info->flags & HA_NOSAME ||
+ key_type == WSREP_KEY_SHARED)
+ key_appended = true;
+ }
+ else
+ {
+ WSREP_DEBUG("NULL key skipped: %s",
+ wsrep_thd_query(thd));
+ }
+ if (record1) {
+ len = wsrep_store_key_val_for_row(
+ thd, table, i, key1,
+ WSREP_MAX_SUPPORTED_KEY_LENGTH,
+ record1, prebuilt, &is_null);
+ if (!is_null && memcmp(key0, key1, len)) {
+ rcode = wsrep_append_key(
+ thd, trx, table_share,
+ table,
+ keyval1, len+1, key_type);
+ if (rcode) DBUG_RETURN(rcode);
+ }
+ }
+ }
+ }
+ }
+
+ /* if no PK, calculate hash of full row, to be the key value */
+ if (!key_appended && wsrep_certify_nonPK) {
+ uchar digest[16];
+ int rcode;
+
+ wsrep_calc_row_hash(digest, record0, table, prebuilt, thd);
+ if ((rcode = wsrep_append_key(thd, trx, table_share, table,
+ (const char*) digest, 16,
+ key_type))) {
+ DBUG_RETURN(rcode);
+ }
+
+ if (record1) {
+ wsrep_calc_row_hash(
+ digest, record1, table, prebuilt, thd);
+ if ((rcode = wsrep_append_key(thd, trx, table_share,
+ table,
+ (const char*) digest,
+ 16, key_type))) {
+ DBUG_RETURN(rcode);
+ }
+ }
+ DBUG_RETURN(0);
+ }
+
+ DBUG_RETURN(0);
+}
+#endif /* WITH_WSREP */
-
/*********************************************************************//**
Stores a reference to the current row to 'ref' field of the handle. Note
that in the case where we have generated the clustered index for the
1
0
revision-id: a3a4ea935541bbe4b44a51d7f808119702e35841 (mariadb-10.1.37-82-ga3a4ea93554)
parent(s): 560799ebd8efe11f4c4ae1bb9ed4d39185e03800
author: Oleksandr Byelkin
committer: Oleksandr Byelkin
timestamp: 2019-01-31 19:28:38 +0100
message:
postmerge rollbacks and fixes
---
mysql-test/mysql-test-run.pl | 21 +++++++++++++++------
mysql-test/suite/galera/r/galera_defaults.result | 1 +
plugin/wsrep_info/mysql-test/wsrep_info/suite.pm | 2 ++
sql/log_event.cc | 12 +-----------
zlib/CMakeLists.txt | 3 ++-
5 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index da72e7e1a9a..5fe616c67ae 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -139,6 +139,8 @@ my $opt_start_exit;
my $start_only;
my $file_wsrep_provider;
+our @global_suppressions;
+
END {
if ( defined $opt_tmpdir_pid and $opt_tmpdir_pid == $$ )
{
@@ -193,6 +195,8 @@ my @DEFAULT_SUITES= qw(
sys_vars-
unit-
vcol-
+ wsrep-
+ galera-
);
my $opt_suites;
@@ -353,6 +357,7 @@ my $opt_max_test_fail= env_or_val(MTR_MAX_TEST_FAIL => 10);
my $opt_core_on_failure= 0;
my $opt_parallel= $ENV{MTR_PARALLEL} || 1;
+my $opt_port_group_size = $ENV{MTR_PORT_GROUP_SIZE} || 20;
# lock file to stop tests
my $opt_stop_file= $ENV{MTR_STOP_FILE};
@@ -1113,6 +1118,7 @@ sub command_line_setup {
# Specify ports
'build-thread|mtr-build-thread=i' => \$opt_build_thread,
'port-base|mtr-port-base=i' => \$opt_port_base,
+ 'port-group-size=s' => \$opt_port_group_size,
# Test case authoring
'record' => \$opt_record,
@@ -1818,16 +1824,16 @@ sub set_build_thread_ports($) {
$ENV{MTR_BUILD_THREAD}= $build_thread;
# Calculate baseport
- $baseport= $build_thread * 20 + 10000;
- if ( $baseport < 5001 or $baseport + 19 >= 32767 )
+ $baseport= $build_thread * $opt_port_group_size + 10000;
+ if ( $baseport < 5001 or $baseport + $opt_port_group_size >= 32767 )
{
mtr_error("MTR_BUILD_THREAD number results in a port",
"outside 5001 - 32767",
- "($baseport - $baseport + 19)");
+ "($baseport - $baseport + $opt_port_group_size)");
}
mtr_report("Using MTR_BUILD_THREAD $build_thread,",
- "with reserved ports $baseport..".($baseport+19));
+ "with reserved ports $baseport..".($baseport+($opt_port_group_size-1)));
}
@@ -2988,8 +2994,8 @@ sub kill_leftovers ($) {
sub check_ports_free ($)
{
my $bthread= shift;
- my $portbase = $bthread * 10 + 10000;
- for ($portbase..$portbase+9){
+ my $portbase = $bthread * $opt_port_group_size + 10000;
+ for ($portbase..$portbase+($opt_port_group_size-1)){
if (mtr_ping_port($_)){
mtr_report(" - 'localhost:$_' was not free");
return 0; # One port was not free
@@ -4401,6 +4407,7 @@ sub extract_warning_lines ($$) {
# Perl code.
my @antipatterns =
(
+ @global_suppressions,
qr/error .*connecting to master/,
qr/InnoDB: Error: in ALTER TABLE `test`.`t[12]`/,
qr/InnoDB: Error: table `test`.`t[12]` .*does not exist in the InnoDB internal/,
@@ -6110,6 +6117,8 @@ Options that specify ports
build-thread=# Can be set in environment variable MTR_BUILD_THREAD.
Set MTR_BUILD_THREAD="auto" to automatically aquire
a build thread id that is unique to current host
+ port-group-size=N Reserve groups of TCP ports of size N for each MTR thread
+
Options for test case authoring
diff --git a/mysql-test/suite/galera/r/galera_defaults.result b/mysql-test/suite/galera/r/galera_defaults.result
index 6871ec6d56b..e7a2508c0f3 100644
--- a/mysql-test/suite/galera/r/galera_defaults.result
+++ b/mysql-test/suite/galera/r/galera_defaults.result
@@ -19,6 +19,7 @@ ORDER BY VARIABLE_NAME;
VARIABLE_NAME VARIABLE_VALUE
WSREP_AUTO_INCREMENT_CONTROL ON
WSREP_CAUSAL_READS ON
+WSREP_CERTIFICATION_RULES strict
WSREP_CERTIFY_NONPK ON
WSREP_CLUSTER_ADDRESS gcomm://
WSREP_CLUSTER_NAME my_wsrep_cluster
diff --git a/plugin/wsrep_info/mysql-test/wsrep_info/suite.pm b/plugin/wsrep_info/mysql-test/wsrep_info/suite.pm
index 9f684ae6b0c..cf4d124cb53 100644
--- a/plugin/wsrep_info/mysql-test/wsrep_info/suite.pm
+++ b/plugin/wsrep_info/mysql-test/wsrep_info/suite.pm
@@ -30,10 +30,12 @@ push @::global_suppressions,
qr(WSREP: Failed to send state UUID:.*),
qr(WSREP: wsrep_sst_receive_address.*),
qr(WSREP: Could not open saved state file for reading: .*),
+ qr(WSREP: Could not open state file for reading: .*),
qr(WSREP: last inactive check more than .* skipping check),
qr(WSREP: Gap in state sequence. Need state transfer.),
qr(WSREP: Failed to prepare for incremental state transfer: .*),
qr(WSREP: SYNC message from member .* in non-primary configuration. Ignored.),
+ qr|WSREP: access file\(.*gvwstate.dat\) failed\(No such file or directory\)|,
);
diff --git a/sql/log_event.cc b/sql/log_event.cc
index a4fc2dd5398..1b372778b88 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -7941,12 +7941,7 @@ User_var_log_event(const char* buf, uint event_len,
val_len= uint4korr(buf + UV_VAL_IS_NULL + UV_VAL_TYPE_SIZE +
UV_CHARSET_NUMBER_SIZE);
- if (val + val_len > buf_end)
- {
- error= true;
- goto err;
- }
-
+
/**
We need to check if this is from an old server
that did not pack information for flags.
@@ -7959,11 +7954,6 @@ User_var_log_event(const char* buf, uint event_len,
we keep the flags set to UNDEF_F.
*/
uint bytes_read= ((val + val_len) - buf_start);
- if (bytes_read > event_len)
- {
- error= true;
- goto err;
- }
if ((data_written - bytes_read) > 0)
{
flags= (uint) *(buf + UV_VAL_IS_NULL + UV_VAL_TYPE_SIZE +
diff --git a/zlib/CMakeLists.txt b/zlib/CMakeLists.txt
index d09f6c13f50..0c224e7ce22 100644
--- a/zlib/CMakeLists.txt
+++ b/zlib/CMakeLists.txt
@@ -116,6 +116,7 @@ if(NOT MINGW)
win32/zlib1.rc # If present will override custom build rule below.
)
endif()
+
# parse the full version number from zlib.h and include in ZLIB_FULL_VERSION
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents)
string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*"
@@ -144,4 +145,4 @@ elseif(UNIX)
if(NOT APPLE)
set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"")
endif()
-endif()
\ No newline at end of file
+endif()
1
0
[Commits] 43296f4: MDEV-17599 ALTER TABLE DROP CONSTRAINT does not work for foreign keys.
by holyfoot@askmonty.org 31 Jan '19
by holyfoot@askmonty.org 31 Jan '19
31 Jan '19
revision-id: 43296f4a90cc9281b4ddad498bfab4a4e43131b9 (mariadb-10.2.21-45-g43296f4)
parent(s): 97930df13c0e403940969ebb47398760b59f753c
committer: Alexey Botchkov
timestamp: 2019-01-31 16:23:12 +0400
message:
MDEV-17599 ALTER TABLE DROP CONSTRAINT does not work for foreign keys.
The list of table constraints doesn't include foreign keys.
So we replace DROP CONSTRAINT with DROP FOREIGN KEY in this case.
---
mysql-test/r/alter_table.result | 24 ++++++++++++++++++++++++
mysql-test/t/alter_table.test | 11 +++++++++++
sql/sql_table.cc | 38 ++++++++++++++++++++++++++++++++++++++
3 files changed, 73 insertions(+)
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result
index dcee72e..8ca62d9 100644
--- a/mysql-test/r/alter_table.result
+++ b/mysql-test/r/alter_table.result
@@ -2456,5 +2456,29 @@ ERROR 23000: Duplicate entry '1' for key 'i'
UNLOCK TABLES;
DROP TABLE t1;
#
+# MDEV-17599 ALTER TABLE DROP CONSTRAINT does not work for foreign keys.
+#
+CREATE TABLE t1(id INT PRIMARY KEY, c1 INT) ENGINE= INNODB;
+CREATE TABLE t2(id INT PRIMARY KEY, c1 INT, CONSTRAINT sid FOREIGN KEY (`c1`) REFERENCES t1 (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE= INNODB;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `id` int(11) NOT NULL,
+ `c1` int(11) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `sid` (`c1`),
+ CONSTRAINT `sid` FOREIGN KEY (`c1`) REFERENCES `t1` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ALTER TABLE t2 DROP CONSTRAINT sid;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `id` int(11) NOT NULL,
+ `c1` int(11) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `sid` (`c1`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE t2, t1;
+#
# End of 10.2 tests
#
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test
index df077c8..659cae1 100644
--- a/mysql-test/t/alter_table.test
+++ b/mysql-test/t/alter_table.test
@@ -2013,5 +2013,16 @@ DROP TABLE t1;
--echo #
+--echo # MDEV-17599 ALTER TABLE DROP CONSTRAINT does not work for foreign keys.
+--echo #
+
+CREATE TABLE t1(id INT PRIMARY KEY, c1 INT) ENGINE= INNODB;
+CREATE TABLE t2(id INT PRIMARY KEY, c1 INT, CONSTRAINT sid FOREIGN KEY (`c1`) REFERENCES t1 (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE= INNODB;
+SHOW CREATE TABLE t2;
+ALTER TABLE t2 DROP CONSTRAINT sid;
+SHOW CREATE TABLE t2;
+DROP TABLE t2, t1;
+
+--echo #
--echo # End of 10.2 tests
--echo #
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 1b426f8..c080e5a 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -8993,6 +8993,44 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
THD_STAGE_INFO(thd, stage_setup);
+
+ if (alter_info->flags & Alter_info::ALTER_DROP_CHECK_CONSTRAINT)
+ {
+ /*
+ ALTER TABLE DROP CONSTRAINT
+ should be replaced with ... DROP FOREIGN KEY
+ if the constraint is the FOREIGN KEY one.
+ */
+
+ List_iterator<Alter_drop> drop_it(alter_info->drop_list);
+ Alter_drop *drop;
+ alter_info->flags&= ~Alter_info::ALTER_DROP_CHECK_CONSTRAINT;
+
+ while ((drop= drop_it++))
+ {
+ if (drop->type == Alter_drop::CHECK_CONSTRAINT)
+ {
+ List <FOREIGN_KEY_INFO> fk_child_key_list;
+ FOREIGN_KEY_INFO *f_key;
+ table->file->get_foreign_key_list(thd, &fk_child_key_list);
+ List_iterator<FOREIGN_KEY_INFO> fk_key_it(fk_child_key_list);
+
+ while ((f_key= fk_key_it++))
+ {
+ if (my_strcasecmp(system_charset_info, f_key->foreign_id->str,
+ drop->name) == 0)
+ {
+ drop->type= Alter_drop::FOREIGN_KEY;
+ alter_info->flags|= Alter_info::DROP_FOREIGN_KEY;
+ goto do_continue;
+ }
+ }
+ }
+ alter_info->flags|= Alter_info::ALTER_DROP_CHECK_CONSTRAINT;
+do_continue:;
+ }
+ }
+
handle_if_exists_options(thd, table, alter_info);
/*
1
0
31 Jan '19
revision-id: 560799ebd8efe11f4c4ae1bb9ed4d39185e03800 (mariadb-10.1.37-81-g560799ebd8e)
parent(s): 6e2af7d084ca1bba79e60f05616aaefb6028ee9d c2caca02ac39454e18db8de563e7e7c8eaf8b1c7
author: Oleksandr Byelkin
committer: Oleksandr Byelkin
timestamp: 2019-01-31 09:34:34 +0100
message:
Merge branch '10.0-galera' into 10.1
cmake/wsrep.cmake | 2 +-
mysql-test/mysql-test-run.pl | 21 +-
mysql-test/r/alter_table.test | 1908 ++++++++++++++++++
mysql-test/r/grant.test | 2291 ++++++++++++++++++++++
mysql-test/r/lowercase_fs_off.test | 124 ++
mysql-test/r/sp-security.test | 1069 ++++++++++
mysql-test/r/type_float.test | 417 ++++
mysql-test/suite/sys_vars/r/all_vars.result | 1 +
mysql-test/suite/sys_vars/r/sysvars_wsrep.result | 14 +
sql/log_event.cc | 21 +
sql/sys_vars.cc | 13 +
sql/wsrep_mysqld.cc | 1 +
sql/wsrep_mysqld.h | 1 +
sql/wsrep_mysqld_c.h | 26 +
storage/innobase/handler/ha_innodb.cc | 64 +-
storage/innobase/handler/ha_innodb.h | 6 +-
storage/innobase/row/row0ins.cc | 39 +-
storage/xtradb/handler/ha_innodb.cc | 62 +-
storage/xtradb/handler/ha_innodb.h | 6 +-
storage/xtradb/row/row0ins.cc | 39 +-
zlib/CMakeLists.txt | 3 +-
21 files changed, 6053 insertions(+), 75 deletions(-)
diff --cc cmake/wsrep.cmake
index 9fa127380a4,0529f89b61c..b272df51adb
--- a/cmake/wsrep.cmake
+++ b/cmake/wsrep.cmake
@@@ -14,30 -14,51 +14,30 @@@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-# We need to generate a proper spec file even without --with-wsrep flag,
-# so WSREP_VERSION is produced regardless
+#
+# Galera library does not compile with windows
+#
+IF(UNIX)
+ SET(with_wsrep_default ON)
+ELSE()
+ SET(with_wsrep_default OFF)
+ENDIF()
+
+OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ${with_wsrep_default})
# Set the patch version
- SET(WSREP_PATCH_VERSION "23")
+ SET(WSREP_PATCH_VERSION "24")
-# MariaDB addition: Revision number of the last revision merged from
-# codership branch visible in @@visible_comment.
-# Branch : https://github.com/codership/mysql-wsrep/tree/5.6
-SET(WSREP_PATCH_REVNO "c3fc46e") # Should be updated on every merge.
-
-# MariaDB: Obtain patch revision number:
-# Update WSREP_PATCH_REVNO if WSREP_REV environment variable is set.
-IF (DEFINED ENV{WSREP_REV})
- SET(WSREP_PATCH_REVNO $ENV{WSREP_REV})
-ENDIF()
-
# Obtain wsrep API version
-EXECUTE_PROCESS(
- COMMAND sh -c "grep WSREP_INTERFACE_VERSION ${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h | cut -d '\"' -f 2"
- OUTPUT_VARIABLE WSREP_API_VERSION
- RESULT_VARIABLE RESULT
-)
-#FILE(WRITE "wsrep_config" "Debug: WSREP_API_VERSION result: ${RESULT}\n")
-STRING(REGEX REPLACE "(\r?\n)+$" "" WSREP_API_VERSION "${WSREP_API_VERSION}")
+FILE(STRINGS "${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h" WSREP_API_VERSION
+ LIMIT_COUNT 1 REGEX "WSREP_INTERFACE_VERSION")
+STRING(REGEX MATCH "([0-9]+)" WSREP_API_VERSION "${WSREP_API_VERSION}")
-IF(NOT WSREP_PATCH_REVNO)
- MESSAGE(WARNING "Could not determine bzr revision number, WSREP_VERSION will "
- "not contain the revision number.")
- SET(WSREP_VERSION
- "${WSREP_API_VERSION}.${WSREP_PATCH_VERSION}"
- )
-ELSE()
- SET(WSREP_VERSION
- "${WSREP_API_VERSION}.${WSREP_PATCH_VERSION}.r${WSREP_PATCH_REVNO}"
- )
-ENDIF()
+SET(WSREP_VERSION "${WSREP_API_VERSION}.${WSREP_PATCH_VERSION}"
+ CACHE INTERNAL "WSREP version")
-OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ON)
-IF (WITH_WSREP)
- SET(WSREP_C_FLAGS "-DWITH_WSREP -DWSREP_PROC_INFO -DMYSQL_MAX_VARIABLE_VALUE_LEN=2048")
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WSREP_C_FLAGS}")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WSREP_C_FLAGS}")
- SET(COMPILATION_COMMENT "${COMPILATION_COMMENT}, wsrep_${WSREP_VERSION}")
- SET(WITH_EMBEDDED_SERVER OFF CACHE INTERNAL "" FORCE)
-ENDIF()
+SET(WSREP_PROC_INFO ${WITH_WSREP})
-#
+IF(WITH_WSREP)
+ SET(WSREP_PATCH_VERSION "wsrep_${WSREP_VERSION}")
+ENDIF()
diff --cc mysql-test/mysql-test-run.pl
index 5fe616c67ae,0ea628f75e0..da72e7e1a9a
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@@ -137,10 -136,7 +137,8 @@@ my $opt_start
my $opt_start_dirty;
my $opt_start_exit;
my $start_only;
+my $file_wsrep_provider;
- our @global_suppressions;
-
END {
if ( defined $opt_tmpdir_pid and $opt_tmpdir_pid == $$ )
{
@@@ -4407,8 -4815,8 +4401,7 @@@ sub extract_warning_lines ($$)
# Perl code.
my @antipatterns =
(
- @global_suppressions,
qr/error .*connecting to master/,
- qr/Plugin 'ndbcluster' will be forced to shutdown/,
qr/InnoDB: Error: in ALTER TABLE `test`.`t[12]`/,
qr/InnoDB: Error: table `test`.`t[12]` .*does not exist in the InnoDB internal/,
qr/InnoDB: Warning: Setting innodb_use_sys_malloc/,
diff --cc mysql-test/suite/sys_vars/r/sysvars_wsrep.result
index db932ae8223,00000000000..e54afd2d64a
mode 100644,000000..100644
--- a/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
@@@ -1,619 -1,0 +1,633 @@@
+select * from information_schema.system_variables
+where variable_name like 'wsrep%'
+ order by variable_name;
+VARIABLE_NAME WSREP_AUTO_INCREMENT_CONTROL
+SESSION_VALUE NULL
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT To automatically control the assignment of autoincrement variables
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_CAUSAL_READS
+SESSION_VALUE OFF
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Setting this variable is equivalent to setting wsrep_sync_wait READ flag
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
++VARIABLE_NAME WSREP_CERTIFICATION_RULES
++SESSION_VALUE NULL
++GLOBAL_VALUE strict
++GLOBAL_VALUE_ORIGIN COMPILE-TIME
++DEFAULT_VALUE strict
++VARIABLE_SCOPE GLOBAL
++VARIABLE_TYPE ENUM
++VARIABLE_COMMENT Certification rules to use in the cluster. Possible values are: "strict": stricter rules that could result in more certification failures. "optimized": relaxed rules that allow more concurrency and cause less certification failures.
++NUMERIC_MIN_VALUE NULL
++NUMERIC_MAX_VALUE NULL
++NUMERIC_BLOCK_SIZE NULL
++ENUM_VALUE_LIST strict,optimized
++READ_ONLY NO
++COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_CERTIFY_NONPK
+SESSION_VALUE NULL
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Certify tables with no primary key
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_CLUSTER_ADDRESS
+SESSION_VALUE NULL
+GLOBAL_VALUE
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Address to initially connect to cluster
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_CLUSTER_NAME
+SESSION_VALUE NULL
+GLOBAL_VALUE my_wsrep_cluster
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE my_wsrep_cluster
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Name for the cluster
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_CONVERT_LOCK_TO_TRX
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT To convert locking sessions into transactions
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_DATA_HOME_DIR
+SESSION_VALUE NULL
+GLOBAL_VALUE DATADIR
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE DATADIR
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT home directory for wsrep provider
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_DBUG_OPTION
+SESSION_VALUE NULL
+GLOBAL_VALUE
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT DBUG options to provider library
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_DEBUG
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT To enable debug level logging
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_DESYNC
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT To desynchronize the node from the cluster
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_DIRTY_READS
+SESSION_VALUE OFF
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Allow reads even when the node is not in the primary component.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_DRUPAL_282555_WORKAROUND
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Enable a workaround to handle the cases where inserting a DEFAULT value into an auto-increment column could fail with duplicate key error
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_FORCED_BINLOG_FORMAT
+SESSION_VALUE NULL
+GLOBAL_VALUE NONE
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE NONE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT binlog format to take effect over user's choice
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST MIXED,STATEMENT,ROW,NONE
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_GTID_DOMAIN_ID
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT When wsrep_gtid_mode is set, this value is used as gtid_domain_id for galera transactions and also copied to the joiner nodes during state transfer. It is ignored, otherwise.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_GTID_MODE
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Automatically update the (joiner) node's wsrep_gtid_domain_id value with that of donor's (received during state transfer) and use it in place of gtid_domain_id for all galera transactions. When OFF (default), wsrep_gtid_domain_id is simply ignored (backward compatibility).
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_LOAD_DATA_SPLITTING
+SESSION_VALUE NULL
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT To commit LOAD DATA transaction after every 10K rows inserted
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_LOG_CONFLICTS
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT To log multi-master conflicts
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_MAX_WS_ROWS
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Max number of rows in write set
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 1048576
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_MAX_WS_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 2147483647
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 2147483647
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Max write set size (bytes)
+NUMERIC_MIN_VALUE 1024
+NUMERIC_MAX_VALUE 2147483647
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_MYSQL_REPLICATION_BUNDLE
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT mysql replication group commit
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 1000
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_NODE_ADDRESS
+SESSION_VALUE NULL
+GLOBAL_VALUE
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Specifies the node's network address, in the format ip address[:port]. Used in situations where autoguessing is not reliable. As of MariaDB 10.1.8, supports IPv6.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_NODE_INCOMING_ADDRESS
+SESSION_VALUE NULL
+GLOBAL_VALUE AUTO
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE AUTO
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Client connection address
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_NODE_NAME
+SESSION_VALUE NULL
+GLOBAL_VALUE HOSTNAME
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE HOSTNAME
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Name of this node. This name can be used in wsrep_sst_donor as a preferred donor. Note that multiple nodes in a cluster can have the same name.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_NOTIFY_CMD
+SESSION_VALUE NULL
+GLOBAL_VALUE
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_ON
+SESSION_VALUE OFF
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT To enable wsrep replication
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_OSU_METHOD
+SESSION_VALUE TOI
+GLOBAL_VALUE TOI
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE TOI
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Method for Online Schema Upgrade
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST TOI,RSU
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_PATCH_VERSION
+SESSION_VALUE NULL
+GLOBAL_VALUE wsrep_MAJVER.MINVER
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE NULL
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Wsrep patch version, for example wsrep_MAJVER.MINVER.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NULL
+VARIABLE_NAME WSREP_PROVIDER
+SESSION_VALUE NULL
+GLOBAL_VALUE none
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE none
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Path to replication provider library
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_PROVIDER_OPTIONS
+SESSION_VALUE NULL
+GLOBAL_VALUE
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Semicolon (;) separated list of wsrep options (see wsrep_provider_options documentation).
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_RECOVER
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Recover database state after crash and exit
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_REJECT_QUERIES
+SESSION_VALUE NULL
+GLOBAL_VALUE NONE
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE NONE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Variable to set to reject queries
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NONE,ALL,ALL_KILL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_REPLICATE_MYISAM
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT To enable myisam replication
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_RESTART_SLAVE
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Should MariaDB slave be restarted automatically, when node joins back to cluster
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_RETRY_AUTOCOMMIT
+SESSION_VALUE 1
+GLOBAL_VALUE 1
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 1
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Max number of times to retry a failed autocommit statement
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 10000
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_SLAVE_FK_CHECKS
+SESSION_VALUE NULL
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Should slave thread do foreign key constraint checks
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_SLAVE_THREADS
+SESSION_VALUE NULL
+GLOBAL_VALUE 1
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 1
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of slave appliers to launch
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 512
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_SLAVE_UK_CHECKS
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Should slave thread do secondary index uniqueness checks
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_SST_AUTH
+SESSION_VALUE NULL
+GLOBAL_VALUE
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Authentication for SST connection
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_SST_DONOR
+SESSION_VALUE NULL
+GLOBAL_VALUE
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT preferred donor node for the SST
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_SST_DONOR_REJECTS_QUERIES
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Reject client queries when donating state snapshot transfer
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_SST_METHOD
+SESSION_VALUE NULL
+GLOBAL_VALUE rsync
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE rsync
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT State snapshot transfer method
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_SST_RECEIVE_ADDRESS
+SESSION_VALUE NULL
+GLOBAL_VALUE AUTO
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE AUTO
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Address where node is waiting for SST contact
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_START_POSITION
+SESSION_VALUE NULL
+GLOBAL_VALUE 00000000-0000-0000-0000-000000000000:-1
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 00000000-0000-0000-0000-000000000000:-1
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT global transaction position to start from
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_SYNC_WAIT
+SESSION_VALUE 0
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Ensure "synchronous" read view before executing an operation of the type specified by bitmask: 1 - READ(includes SELECT, SHOW and BEGIN/START TRANSACTION); 2 - UPDATE and DELETE; 4 - INSERT and REPLACE
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 15
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
diff --cc sql/sys_vars.cc
index 16126c471c0,75b1f809d73..d1db14d7b35
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@@ -4940,14 -4680,25 +4940,27 @@@ static Sys_var_mybool Sys_wsrep_certify
GLOBAL_VAR(wsrep_certify_nonPK),
CMD_LINE(OPT_ARG), DEFAULT(TRUE));
+ static const char *wsrep_certification_rules_names[]= { "strict", "optimized", NullS };
+ static Sys_var_enum Sys_wsrep_certification_rules(
+ "wsrep_certification_rules",
+ "Certification rules to use in the cluster. Possible values are: "
+ "\"strict\": stricter rules that could result in more certification "
+ "failures. "
+ "\"optimized\": relaxed rules that allow more concurrency and "
+ "cause less certification failures.",
+ GLOBAL_VAR(wsrep_certification_rules), CMD_LINE(REQUIRED_ARG),
+ wsrep_certification_rules_names, DEFAULT(WSREP_CERTIFICATION_RULES_STRICT),
+ NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
+ ON_UPDATE(0));
+
static Sys_var_mybool Sys_wsrep_causal_reads(
- "wsrep_causal_reads", "(DEPRECATED) Setting this variable is equivalent "
+ "wsrep_causal_reads", "Setting this variable is equivalent "
"to setting wsrep_sync_wait READ flag",
- SESSION_VAR(wsrep_causal_reads), CMD_LINE(OPT_ARG), DEFAULT(FALSE),
+ SESSION_VAR(wsrep_causal_reads),
+ CMD_LINE(OPT_ARG, OPT_WSREP_CAUSAL_READS), DEFAULT(FALSE),
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
- ON_UPDATE(wsrep_causal_reads_update));
+ ON_UPDATE(wsrep_causal_reads_update),
+ DEPRECATED("'@@wsrep_sync_wait=1'"));
static Sys_var_uint Sys_wsrep_sync_wait(
"wsrep_sync_wait", "Ensure \"synchronous\" read view before executing "
diff --cc sql/wsrep_mysqld.h
index 2814f4013d8,4c98b9a624b..2b55fbe42ee
--- a/sql/wsrep_mysqld.h
+++ b/sql/wsrep_mysqld.h
@@@ -27,9 -21,7 +27,10 @@@ typedef struct st_mysql_show_var SHOW_V
#include <sql_priv.h>
//#include "rpl_gtid.h"
#include "../wsrep/wsrep_api.h"
+#include "mdl.h"
+#include "mysqld.h"
+#include "sql_table.h"
+ #include "wsrep_mysqld_c.h"
#define WSREP_UNDEFINED_TRX_ID ULONGLONG_MAX
diff --cc storage/innobase/handler/ha_innodb.cc
index 702f84a52d1,2244cd1101a..472fb86288f
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@@ -111,7 -108,7 +111,8 @@@ MYSQL_PLUGIN_IMPORT extern char mysql_u
#endif /* UNIV_DEBUG */
#include "fts0priv.h"
#include "page0zip.h"
+#include "fil0pagecompress.h"
+ #include "dict0priv.h"
#define thd_get_trx_isolation(X) ((enum_tx_isolation)thd_tx_isolation(X))
@@@ -134,10 -128,12 +135,10 @@@
# endif /* MYSQL_PLUGIN_IMPORT */
#ifdef WITH_WSREP
- #include "dict0priv.h"
+ #include "../../../wsrep/wsrep_api.h"
#include "../storage/innobase/include/ut0byte.h"
-#include <wsrep_mysqld.h>
-#include <wsrep_md5.h>
+#include <mysql/service_md5.h>
-extern my_bool wsrep_certify_nonPK;
class binlog_trx_data;
extern handlerton *binlog_hton;
@@@ -8448,8 -8015,9 +8449,9 @@@ report_error
&& wsrep_on(user_thd)
&& wsrep_thd_exec_mode(user_thd) == LOCAL_STATE
&& !wsrep_consistency_check(user_thd)
- && !wsrep_thd_skip_append_keys(user_thd)) {
+ && !wsrep_thd_ignore_table(user_thd)) {
- if (wsrep_append_keys(user_thd, false, record, NULL)) {
+ if (wsrep_append_keys(user_thd, WSREP_KEY_EXCLUSIVE, record,
+ NULL)) {
DBUG_PRINT("wsrep", ("row key failed"));
error_result = HA_ERR_INTERNAL_ERROR;
goto wsrep_error;
@@@ -9034,11 -8602,12 +9037,12 @@@ ha_innobase::delete_row
if (error == DB_SUCCESS &&
wsrep_thd_exec_mode(user_thd) == LOCAL_STATE &&
wsrep_on(user_thd) &&
- !wsrep_thd_skip_append_keys(user_thd))
+ !wsrep_thd_ignore_table(user_thd))
{
- if (wsrep_append_keys(user_thd, false, record, NULL)) {
+ if (wsrep_append_keys(user_thd, WSREP_KEY_EXCLUSIVE, record,
+ NULL)) {
DBUG_PRINT("wsrep", ("delete fail"));
- error = (dberr_t)HA_ERR_INTERNAL_ERROR;
+ error = (dberr_t) HA_ERR_INTERNAL_ERROR;
goto wsrep_error;
}
}
@@@ -10444,10 -10024,10 +10465,10 @@@ wsrep_append_foreign_key
wsrep_ws_handle(thd, trx),
&wkey,
1,
- shared ? WSREP_KEY_SHARED : WSREP_KEY_EXCLUSIVE,
+ key_type,
copy);
if (rcode) {
- DBUG_PRINT("wsrep", ("row key failed: %lu", rcode));
+ DBUG_PRINT("wsrep", ("row key failed: %zu", rcode));
WSREP_ERROR("Appending cascaded fk row key failed: %s, %lu",
(wsrep_thd_query(thd)) ?
wsrep_thd_query(thd) : "void", rcode);
diff --cc storage/innobase/row/row0ins.cc
index c50eaa2a653,271e93c6e80..c031c38163e
--- a/storage/innobase/row/row0ins.cc
+++ b/storage/innobase/row/row0ins.cc
@@@ -1638,16 -1643,34 +1643,34 @@@ run_again
}
if (check_ref) {
+ #ifdef WITH_WSREP
+ enum wsrep_key_type key_type = WSREP_KEY_EXCLUSIVE;
+ #endif WITH_WSREP
err = DB_SUCCESS;
+
#ifdef WITH_WSREP
+ if (upd_node != NULL) {
+ key_type = WSREP_KEY_SHARED;
+ } else {
+ switch (wsrep_certification_rules) {
+ case WSREP_CERTIFICATION_RULES_STRICT:
+ key_type = WSREP_KEY_EXCLUSIVE;
+ break;
+ case WSREP_CERTIFICATION_RULES_OPTIMIZED:
+ key_type = WSREP_KEY_SEMI;
+ break;
+ }
+ }
+
err = wsrep_append_foreign_key(
- thr_get_trx(thr),
- foreign,
- rec,
- check_index,
- check_ref,
+ thr_get_trx(thr),
+ foreign,
+ rec,
+ check_index,
+ check_ref,
- (upd_node) ? TRUE : FALSE);
- #endif /* WITH_WSREP */
+ key_type);
+ #endif /* WITH_WSREP */
+
goto end_scan;
} else if (foreign->type != 0) {
/* There is an ON UPDATE or ON DELETE
diff --cc storage/xtradb/handler/ha_innodb.cc
index d3be5155d27,89539bfeed2..c9db941b4bf
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@@ -109,7 -104,7 +109,8 @@@ this program; if not, write to the Fre
#endif /* UNIV_DEBUG */
#include "fts0priv.h"
#include "page0zip.h"
+#include "fil0pagecompress.h"
+ #include "dict0priv.h"
#define thd_get_trx_isolation(X) ((enum_tx_isolation)thd_tx_isolation(X))
@@@ -133,10 -125,12 +134,10 @@@
# endif /* MYSQL_PLUGIN_IMPORT */
#ifdef WITH_WSREP
- #include "dict0priv.h"
+ #include "../../../wsrep/wsrep_api.h"
#include "../storage/innobase/include/ut0byte.h"
-#include <wsrep_mysqld.h>
-#include <wsrep_md5.h>
+#include <mysql/service_md5.h>
-extern my_bool wsrep_certify_nonPK;
class binlog_trx_data;
extern handlerton *binlog_hton;
@@@ -9034,8 -8736,8 +9036,8 @@@ report_error
&& wsrep_on(user_thd)
&& wsrep_thd_exec_mode(user_thd) == LOCAL_STATE
&& !wsrep_consistency_check(user_thd)
- && !wsrep_thd_skip_append_keys(user_thd)) {
+ && !wsrep_thd_ignore_table(user_thd)) {
- if (wsrep_append_keys(user_thd, false, record, NULL)) {
+ if (wsrep_append_keys(user_thd, WSREP_KEY_EXCLUSIVE, record, NULL)) {
DBUG_PRINT("wsrep", ("row key failed"));
error_result = HA_ERR_INTERNAL_ERROR;
goto wsrep_error;
@@@ -9617,11 -9354,12 +9620,12 @@@ ha_innobase::delete_row
if (error == DB_SUCCESS &&
wsrep_thd_exec_mode(user_thd) == LOCAL_STATE &&
wsrep_on(user_thd) &&
- !wsrep_thd_skip_append_keys(user_thd))
+ !wsrep_thd_ignore_table(user_thd))
{
- if (wsrep_append_keys(user_thd, false, record, NULL)) {
+ if (wsrep_append_keys(user_thd, WSREP_KEY_EXCLUSIVE, record,
+ NULL)) {
DBUG_PRINT("wsrep", ("delete fail"));
- error = DB_ERROR;
+ error = (dberr_t) HA_ERR_INTERNAL_ERROR;
goto wsrep_error;
}
}
@@@ -11012,10 -10790,10 +11033,10 @@@ wsrep_append_foreign_key
wsrep_ws_handle(thd, trx),
&wkey,
1,
- shared ? WSREP_KEY_SHARED : WSREP_KEY_EXCLUSIVE,
+ key_type,
copy);
if (rcode) {
- DBUG_PRINT("wsrep", ("row key failed: %lu", rcode));
+ DBUG_PRINT("wsrep", ("row key failed: %zu", rcode));
WSREP_ERROR("Appending cascaded fk row key failed: %s, %lu",
(wsrep_thd_query(thd)) ?
wsrep_thd_query(thd) : "void", rcode);
@@@ -11041,8 -10820,8 +11063,8 @@@ wsrep_append_key
bool const copy = true;
#ifdef WSREP_DEBUG_PRINT
fprintf(stderr, "%s conn %ld, trx %llu, keylen %d, table %s\n Query: %s ",
- (shared) ? "Shared" : "Exclusive",
+ wsrep_key_type_to_str(key_type),
- wsrep_thd_thread_id(thd), trx->id, key_len,
+ thd_get_thread_id(thd), (long long)trx->id, key_len,
table_share->table_name.str, wsrep_thd_query(thd));
for (int i=0; i<key_len; i++) {
fprintf(stderr, "%hhX, ", key[i]);
diff --cc storage/xtradb/row/row0ins.cc
index 472be8ad848,b8ac976bea8..f146d1f68b1
--- a/storage/xtradb/row/row0ins.cc
+++ b/storage/xtradb/row/row0ins.cc
@@@ -1650,16 -1655,34 +1655,34 @@@ run_again
}
if (check_ref) {
+ #ifdef WITH_WSREP
+ enum wsrep_key_type key_type = WSREP_KEY_EXCLUSIVE;
+ #endif /* WITH_WSREP */
err = DB_SUCCESS;
+
#ifdef WITH_WSREP
+ if (upd_node != NULL) {
+ key_type = WSREP_KEY_SHARED;
+ } else {
+ switch (wsrep_certification_rules) {
+ case WSREP_CERTIFICATION_RULES_STRICT:
+ key_type = WSREP_KEY_EXCLUSIVE;
+ break;
+ case WSREP_CERTIFICATION_RULES_OPTIMIZED:
+ key_type = WSREP_KEY_SEMI;
+ break;
+ }
+ }
+
err = wsrep_append_foreign_key(
- thr_get_trx(thr),
- foreign,
- rec,
- check_index,
- check_ref,
+ thr_get_trx(thr),
+ foreign,
+ rec,
+ check_index,
+ check_ref,
- (upd_node) ? TRUE : FALSE);
- #endif /* WITH_WSREP */
+ key_type);
+ #endif /* WITH_WSREP */
+
goto end_scan;
} else if (foreign->type != 0) {
/* There is an ON UPDATE or ON DELETE
1
0