mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merge from 5.5 main
This commit is contained in:
@ -12,10 +12,9 @@ main.signal_demo3 @solaris # Bug#11753919 2010-01-20 alik Several
|
||||
main.sp @solaris # Bug#11753919 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||
main.wait_timeout @solaris # Bug#11758972 2010-04-26 alik wait_timeout fails on OpenSolaris
|
||||
|
||||
rpl.rpl_innodb_bug28430 # Bug#11754425
|
||||
rpl.rpl_bug37426 # WL#5867: skozlov: test case moved from unused bugs suite
|
||||
rpl.rpl_heartbeat_basic # BUG#12403008 2011-04-27 sven fails sporadically
|
||||
rpl.rpl_show_slave_hosts # BUG#12416700 2011-05-02 sven fails sporadically
|
||||
rpl.rpl_innodb_bug28430 # Bug#11754425
|
||||
rpl.rpl_row_sp011 @solaris # Bug#11753919 2011-07-25 sven Several test cases fail on Solaris with error Thread stack overrun
|
||||
|
||||
sys_vars.max_sp_recursion_depth_func @solaris # Bug#11753919 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||
sys_vars.wait_timeout_func # Bug#11750645 2010-04-26 alik wait_timeout_func fails
|
||||
|
8
mysql-test/include/daemon_example_bad_format.ini
Normal file
8
mysql-test/include/daemon_example_bad_format.ini
Normal file
@ -0,0 +1,8 @@
|
||||
#
|
||||
# Plugin configuration file. Place the following on a separate line:
|
||||
#
|
||||
# library binary file name (without .so or .dll)
|
||||
# component_name
|
||||
# [component_name] - additional components in plugin
|
||||
#
|
||||
libdaemon_example
|
9
mysql-test/include/daemon_example_bad_soname.ini
Normal file
9
mysql-test/include/daemon_example_bad_soname.ini
Normal file
@ -0,0 +1,9 @@
|
||||
#
|
||||
# Plugin configuration file. Place the following on a separate line:
|
||||
#
|
||||
# library binary file name (without .so or .dll)
|
||||
# component_name
|
||||
# [component_name] - additional components in plugin
|
||||
#
|
||||
libdaemon_BADNAME
|
||||
daemon_BADNAME
|
@ -39,3 +39,4 @@ ha_archive storage/archive ARCHIVE_PLUGIN
|
||||
ha_blackhole storage/blackhole BLACKHOLE_PLUGIN
|
||||
ha_federated storage/federated FEDERATED_PLUGIN
|
||||
mypluglib plugin/fulltext SIMPLE_PARSER
|
||||
libdaemon_example plugin/daemon_example DAEMONEXAMPLE
|
||||
|
@ -168,6 +168,7 @@ my $opt_suites;
|
||||
|
||||
our $opt_verbose= 0; # Verbose output, enable with --verbose
|
||||
our $exe_mysql;
|
||||
our $exe_mysql_plugin;
|
||||
our $exe_mysqladmin;
|
||||
our $exe_mysqltest;
|
||||
our $exe_libtool;
|
||||
@ -1950,6 +1951,7 @@ sub executable_setup () {
|
||||
# Look for the client binaries
|
||||
$exe_mysqladmin= mtr_exe_exists("$path_client_bindir/mysqladmin");
|
||||
$exe_mysql= mtr_exe_exists("$path_client_bindir/mysql");
|
||||
$exe_mysql_plugin= mtr_exe_exists("$path_client_bindir/mysql_plugin");
|
||||
|
||||
$exe_mysql_embedded= mtr_exe_maybe_exists("$basedir/libmysqld/examples/mysql_embedded");
|
||||
|
||||
@ -2357,6 +2359,7 @@ sub environment_setup {
|
||||
$ENV{'MYSQLADMIN'}= native_path($exe_mysqladmin);
|
||||
$ENV{'MYSQL_CLIENT_TEST'}= mysql_client_test_arguments();
|
||||
$ENV{'EXE_MYSQL'}= $exe_mysql;
|
||||
$ENV{'MYSQL_PLUGIN'}= $exe_mysql_plugin;
|
||||
$ENV{'MYSQL_EMBEDDED'}= $exe_mysql_embedded;
|
||||
|
||||
# ----------------------------------------------------
|
||||
|
@ -1398,6 +1398,12 @@ NULL
|
||||
SELECT WEEK(DATE_ADD(FROM_DAYS(1),INTERVAL 1 MONTH), 1);
|
||||
WEEK(DATE_ADD(FROM_DAYS(1),INTERVAL 1 MONTH), 1)
|
||||
NULL
|
||||
#
|
||||
# Bug#12584302 AFTER FIX FOR #12403504: ASSERTION FAILED: DELSUM+(INT) Y/4-TEMP > 0,
|
||||
#
|
||||
DO WEEK((DATE_ADD((CAST(0 AS DATE)), INTERVAL 1 YEAR_MONTH)), 5);
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '0'
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug#57039: constant subtime expression returns incorrect result.
|
||||
|
@ -1849,5 +1849,119 @@ unlock tables;
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
#
|
||||
# Test for bug #12828477 - "MDL SUBSYSTEM CREATES BIG OVERHEAD FOR
|
||||
# CERTAIN QUERIES TO INFORMATION_SCHEMA".
|
||||
#
|
||||
# Check that metadata locks which are acquired during the process
|
||||
# of opening tables/.FRMs/.TRG files while filling I_S table are
|
||||
# not kept to the end of statement. Keeping the locks has caused
|
||||
# performance problems in cases when big number of tables (.FRMs
|
||||
# or .TRG files) were scanned as cost of new lock acquisition has
|
||||
# increased linearly.
|
||||
drop database if exists mysqltest;
|
||||
create database mysqltest;
|
||||
use mysqltest;
|
||||
create table t0 (i int);
|
||||
create table t1 (j int);
|
||||
create table t2 (k int);
|
||||
#
|
||||
# Test that we don't keep locks in case when we to fill
|
||||
# I_S table we perform full-blown table open.
|
||||
#
|
||||
# Acquire lock on 't2' so upcoming RENAME is
|
||||
# blocked.
|
||||
lock tables t2 read;
|
||||
#
|
||||
# Switching to connection 'con12828477_1'.
|
||||
#
|
||||
# The below RENAME should wait on 't2' while
|
||||
# keeping X lock on 't1'.
|
||||
rename table t1 to t3, t2 to t1, t3 to t2;
|
||||
#
|
||||
# Switching to connection 'con12828477_2'.
|
||||
#
|
||||
# Wait while the above RENAME is blocked.
|
||||
# Issue query to I_S which will open 't0' and get
|
||||
# blocked on 't1' because of RENAME.
|
||||
select table_name, auto_increment from information_schema.tables where table_schema='mysqltest';
|
||||
#
|
||||
# Switching to connection 'con12828477_3'.
|
||||
#
|
||||
# Wait while the above SELECT is blocked.
|
||||
#
|
||||
# Check that it holds no lock on 't0' so it can be renamed.
|
||||
rename table t0 to t4;
|
||||
#
|
||||
# Switching to connection 'default'.
|
||||
#
|
||||
#
|
||||
# Unblock the first RENAME.
|
||||
unlock tables;
|
||||
#
|
||||
# Switching to connection 'con12828477_1'.
|
||||
#
|
||||
# Reap the first RENAME
|
||||
#
|
||||
# Switching to connection 'con12828477_2'.
|
||||
#
|
||||
# Reap SELECT to I_S.
|
||||
table_name auto_increment
|
||||
t0 NULL
|
||||
t1 NULL
|
||||
t2 NULL
|
||||
#
|
||||
# Switching to connection 'default'.
|
||||
#
|
||||
#
|
||||
# Now test that we don't keep locks in case when we to fill
|
||||
# I_S table we read .FRM or .TRG file only (this was the case
|
||||
# for which problem existed).
|
||||
#
|
||||
rename table t4 to t0;
|
||||
# Acquire lock on 't2' so upcoming RENAME is
|
||||
# blocked.
|
||||
lock tables t2 read;
|
||||
#
|
||||
# Switching to connection 'con12828477_1'.
|
||||
#
|
||||
# The below RENAME should wait on 't2' while
|
||||
# keeping X lock on 't1'.
|
||||
rename table t1 to t3, t2 to t1, t3 to t2;
|
||||
#
|
||||
# Switching to connection 'con12828477_2'.
|
||||
#
|
||||
# Wait while the above RENAME is blocked.
|
||||
# Issue query to I_S which will open 't0' and get
|
||||
# blocked on 't1' because of RENAME.
|
||||
select event_object_table, trigger_name from information_schema.triggers where event_object_schema='mysqltest';
|
||||
#
|
||||
# Switching to connection 'con12828477_3'.
|
||||
#
|
||||
# Wait while the above SELECT is blocked.
|
||||
#
|
||||
# Check that it holds no lock on 't0' so it can be renamed.
|
||||
rename table t0 to t4;
|
||||
#
|
||||
# Switching to connection 'default'.
|
||||
#
|
||||
#
|
||||
# Unblock the first RENAME.
|
||||
unlock tables;
|
||||
#
|
||||
# Switching to connection 'con12828477_1'.
|
||||
#
|
||||
# Reap the first RENAME
|
||||
#
|
||||
# Switching to connection 'con12828477_2'.
|
||||
#
|
||||
# Reap SELECT to I_S.
|
||||
event_object_table trigger_name
|
||||
#
|
||||
# Switching to connection 'default'.
|
||||
#
|
||||
#
|
||||
# Clean-up.
|
||||
drop database mysqltest;
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
|
@ -904,7 +904,8 @@ SELECT * FROM tm1;
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
CHECK TABLE tm1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.tm1 check Error Table 'test.t1' doesn't exist
|
||||
test.tm1 check Error Table 'test.t1' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.tm1 check Error Table 'test.t2' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.tm1 check Error Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.tm1 check error Corrupt
|
||||
CREATE TABLE t1(a INT);
|
||||
@ -912,7 +913,7 @@ SELECT * FROM tm1;
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
CHECK TABLE tm1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.tm1 check Error Table 'test.t2' doesn't exist
|
||||
test.tm1 check Error Table 'test.t2' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.tm1 check Error Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.tm1 check error Corrupt
|
||||
CREATE TABLE t2(a BLOB);
|
||||
@ -920,7 +921,7 @@ SELECT * FROM tm1;
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
CHECK TABLE tm1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.tm1 check Warning Table 'test.t2' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.tm1 check Error Table 'test.t2' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.tm1 check Error Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.tm1 check error Corrupt
|
||||
ALTER TABLE t2 MODIFY a INT;
|
||||
@ -3634,7 +3635,7 @@ test.t1 analyze Error Unable to open underlying table which is differently defin
|
||||
test.t1 analyze error Corrupt
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check Error Table 'test.t_not_exists' doesn't exist
|
||||
test.t1 check Error Table 'test.t_not_exists' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.t1 check Error Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.t1 check error Corrupt
|
||||
CHECKSUM TABLE t1;
|
||||
@ -3650,7 +3651,7 @@ test.t1 optimize Error Unable to open underlying table which is differently defi
|
||||
test.t1 optimize error Corrupt
|
||||
REPAIR TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair Error Table 'test.t_not_exists' doesn't exist
|
||||
test.t1 repair Error Table 'test.t_not_exists' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.t1 repair Error Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.t1 repair error Corrupt
|
||||
REPAIR TABLE t1 USE_FRM;
|
||||
@ -3676,4 +3677,37 @@ ALTER TABLE t1 engine=myisam;
|
||||
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE m1, t1;
|
||||
End of 6.0 tests
|
||||
#
|
||||
# Test for bug #11754210 - "45777: CHECK TABLE DOESN'T SHOW ALL
|
||||
# PROBLEMS FOR MERGE TABLE COMPLIANCE IN 5.1"
|
||||
#
|
||||
drop tables if exists t1, t2, t3, t4, m1;
|
||||
create table t1(id int) engine=myisam;
|
||||
create view t3 as select 1 as id;
|
||||
create table t4(id int) engine=memory;
|
||||
create table m1(id int) engine=merge union=(t1,t2,t3,t4);
|
||||
select * from m1;
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
# The below CHECK and REPAIR TABLE statements should
|
||||
# report all problems with underlying tables:
|
||||
# - absence of 't2',
|
||||
# - missing base table for 't3',
|
||||
# - wrong engine of 't4'.
|
||||
check table m1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.m1 check Error Table 'test.t2' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.m1 check Error Table 'test.t3' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.m1 check Error Table 'test.t4' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.m1 check Error Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.m1 check error Corrupt
|
||||
repair table m1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.m1 repair Error Table 'test.t2' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.m1 repair Error Table 'test.t3' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.m1 repair Error Table 'test.t4' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.m1 repair Error Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.m1 repair error Corrupt
|
||||
# Clean-up.
|
||||
drop tables m1, t1, t4;
|
||||
drop view t3;
|
||||
End of 5.5 tests
|
||||
|
110
mysql-test/r/mysql_plugin.result
Normal file
110
mysql-test/r/mysql_plugin.result
Normal file
@ -0,0 +1,110 @@
|
||||
#
|
||||
# Ensure the plugin isn't loaded.
|
||||
#
|
||||
SELECT * FROM mysql.plugin WHERE name = 'daemon_example' ORDER BY name;
|
||||
name dl
|
||||
#
|
||||
# Enable the plugin...
|
||||
#
|
||||
#
|
||||
# Ensure the plugin is now loaded.
|
||||
#
|
||||
SELECT * FROM mysql.plugin WHERE name = 'daemon_example' ORDER BY name;
|
||||
name dl
|
||||
daemon_example libdaemon_example.so
|
||||
#
|
||||
# Disable the plugin...
|
||||
#
|
||||
#
|
||||
# Ensure the plugin isn't loaded.
|
||||
#
|
||||
SELECT * FROM mysql.plugin WHERE name = 'daemon_example' ORDER BY name;
|
||||
name dl
|
||||
#
|
||||
# Attempt to load non-existant plugin
|
||||
#
|
||||
ERROR: Cannot read plugin config file NOT_THERE_AT_ALL. File does not exist.
|
||||
#
|
||||
# Attempt to use non-existant plugin.ini file
|
||||
#
|
||||
ERROR: Cannot read plugin config file daemon_example. File does not exist.
|
||||
#
|
||||
# Attempt to omit the plugin
|
||||
#
|
||||
ERROR: No plugin specified.
|
||||
#
|
||||
# Attempt to omit DISABLE|ENABLE
|
||||
#
|
||||
ERROR: missing operation. Please specify either '<plugin> ENABLE' or '<plugin> DISABLE'.
|
||||
#
|
||||
# Attempt to use bad paths - datadir
|
||||
#
|
||||
ERROR: Cannot access datadir at '/data_not_there/'.
|
||||
#
|
||||
# Attempt to use bad paths - basedir
|
||||
#
|
||||
ERROR: Cannot access basedir at '/basedir_not_there/'.
|
||||
#
|
||||
# Attempt to use bad paths - plugin_dir
|
||||
#
|
||||
ERROR: Cannot read plugin config file daemon_example. File does not exist.
|
||||
#
|
||||
# Attempt to use bad paths - mysqld
|
||||
#
|
||||
ERROR: Cannot access mysqld path '/mysqld_not_there/'.
|
||||
#
|
||||
# Attempt to use bad paths - my_print_defaults
|
||||
#
|
||||
ERROR: Cannot access my-print-defaults path '/my_print_defaults_not_there/'.
|
||||
#
|
||||
# Missing library
|
||||
#
|
||||
ERROR: The plugin library is missing or in a different location.
|
||||
#
|
||||
# Bad format for config file
|
||||
#
|
||||
ERROR: Cannot read plugin config file daemon_example. Bad format in plugin configuration file.
|
||||
#
|
||||
# Missing base_dir option
|
||||
#
|
||||
ERROR: Missing --basedir option.
|
||||
#
|
||||
# Missing data_dir option
|
||||
#
|
||||
ERROR: Missing --datadir option.
|
||||
#
|
||||
# Missing plugin_dir option
|
||||
#
|
||||
ERROR: Missing --plugin_dir option.
|
||||
#
|
||||
# Show the help.
|
||||
#
|
||||
mysql_plugin Ver V.V.VV Distrib XX.XX.XX
|
||||
Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
Enable or disable plugins.
|
||||
|
||||
Usage: mysql_plugin [options] <plugin> ENABLE|DISABLE
|
||||
|
||||
Options:
|
||||
-?, --help Display this help and exit.
|
||||
-b, --basedir=name The basedir for the server.
|
||||
-d, --datadir=name The datadir for the server.
|
||||
-p, --plugin-dir=name
|
||||
The plugin dir for the server.
|
||||
-i, --plugin-ini=name
|
||||
Read plugin information from configuration file specified
|
||||
instead of from <plugin-dir>/<plugin_name>.ini.
|
||||
-n, --no-defaults Do not read values from configuration file.
|
||||
-P, --print-defaults
|
||||
Show default values from configuration file.
|
||||
-m, --mysqld=name Path to mysqld executable. Example: /sbin/temp1/mysql/bin
|
||||
-f, --my-print-defaults=name
|
||||
Path to my_print_defaults executable. Example:
|
||||
/source/temp11/extra
|
||||
-v, --verbose More verbose output; you can use this multiple times to
|
||||
get even more verbose output.
|
||||
-V, --version Output version information and exit.
|
||||
|
||||
|
||||
mysql_plugin Ver V.V.VV Distrib XX.XX.XX
|
@ -7161,6 +7161,25 @@ init_connect
|
||||
SET @@GLOBAL.init_connect= @old_init_connect;
|
||||
DROP PROCEDURE p2;
|
||||
DROP PROCEDURE p5;
|
||||
#
|
||||
# Bug#11766594 59736: SELECT DISTINCT.. INCORRECT RESULT WITH DETERMINISTIC FUNCTION IN WHERE C
|
||||
#
|
||||
CREATE TABLE t1 (a INT, b INT, KEY(b));
|
||||
CREATE TABLE t2 (c INT, d INT, KEY(c));
|
||||
INSERT INTO t1 VALUES (1,1),(1,1),(1,2);
|
||||
INSERT INTO t2 VALUES (1,1),(1,2);
|
||||
CREATE FUNCTION f1() RETURNS INT DETERMINISTIC
|
||||
BEGIN
|
||||
DECLARE a int;
|
||||
-- SQL statement inside
|
||||
SELECT 1 INTO a;
|
||||
RETURN a;
|
||||
END $
|
||||
SELECT COUNT(DISTINCT d) FROM t1, t2 WHERE a = c AND b = f1();
|
||||
COUNT(DISTINCT d)
|
||||
2
|
||||
DROP FUNCTION f1;
|
||||
DROP TABLE t1, t2;
|
||||
# ------------------------------------------------------------------
|
||||
# -- End of 5.1 tests
|
||||
# ------------------------------------------------------------------
|
||||
|
@ -558,6 +558,52 @@ f1 bug13575(f1)
|
||||
3 ccc
|
||||
drop function bug13575|
|
||||
drop table t3|
|
||||
SELECT @@GLOBAL.storage_engine INTO @old_engine|
|
||||
SET @@GLOBAL.storage_engine=InnoDB|
|
||||
SET @@SESSION.storage_engine=InnoDB|
|
||||
SHOW GLOBAL VARIABLES LIKE 'storage_engine'|
|
||||
Variable_name Value
|
||||
storage_engine InnoDB
|
||||
SHOW SESSION VARIABLES LIKE 'storage_engine'|
|
||||
Variable_name Value
|
||||
storage_engine InnoDB
|
||||
CREATE PROCEDURE bug11758414()
|
||||
BEGIN
|
||||
SET @@GLOBAL.storage_engine="MyISAM";
|
||||
SET @@SESSION.storage_engine="MyISAM";
|
||||
# show defaults at execution time / that setting them worked
|
||||
SHOW GLOBAL VARIABLES LIKE 'storage_engine';
|
||||
SHOW SESSION VARIABLES LIKE 'storage_engine';
|
||||
CREATE TABLE t1 (id int);
|
||||
CREATE TABLE t2 (id int) ENGINE=InnoDB;
|
||||
# show we're heeding the default (at run-time, not parse-time!)
|
||||
SHOW CREATE TABLE t1;
|
||||
# show that we didn't break explicit override with ENGINE=...
|
||||
SHOW CREATE TABLE t2;
|
||||
END;
|
||||
|
|
||||
CALL bug11758414|
|
||||
Variable_name Value
|
||||
storage_engine MyISAM
|
||||
Variable_name Value
|
||||
storage_engine MyISAM
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`id` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SHOW GLOBAL VARIABLES LIKE 'storage_engine'|
|
||||
Variable_name Value
|
||||
storage_engine MyISAM
|
||||
SHOW SESSION VARIABLES LIKE 'storage_engine'|
|
||||
Variable_name Value
|
||||
storage_engine MyISAM
|
||||
DROP PROCEDURE bug11758414|
|
||||
DROP TABLE t1, t2|
|
||||
SET @@GLOBAL.storage_engine=@old_engine|
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
|
@ -63,42 +63,42 @@ row_format=compressed;
|
||||
create table t14(a int primary key) engine=innodb key_block_size=9;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=9.
|
||||
SELECT table_schema, table_name, row_format
|
||||
SELECT table_schema, table_name, row_format, data_length, index_length
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
table_schema table_name row_format
|
||||
test t0 Compact
|
||||
test t00 Compact
|
||||
test t1 Compact
|
||||
test t10 Dynamic
|
||||
test t11 Compressed
|
||||
test t12 Compressed
|
||||
test t13 Compressed
|
||||
test t14 Compact
|
||||
test t2 Redundant
|
||||
test t3 Compact
|
||||
test t4 Compact
|
||||
test t5 Redundant
|
||||
test t6 Redundant
|
||||
test t7 Redundant
|
||||
test t8 Compact
|
||||
test t9 Compact
|
||||
table_schema table_name row_format data_length index_length
|
||||
test t0 Compact 16384 0
|
||||
test t00 Compact 16384 0
|
||||
test t1 Compact 16384 0
|
||||
test t10 Dynamic 16384 0
|
||||
test t11 Compressed 1024 0
|
||||
test t12 Compressed 1024 0
|
||||
test t13 Compressed 8192 0
|
||||
test t14 Compact 16384 0
|
||||
test t2 Redundant 16384 0
|
||||
test t3 Compact 16384 0
|
||||
test t4 Compact 16384 0
|
||||
test t5 Redundant 16384 0
|
||||
test t6 Redundant 16384 0
|
||||
test t7 Redundant 16384 0
|
||||
test t8 Compact 16384 0
|
||||
test t9 Compact 16384 0
|
||||
drop table t0,t00,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14;
|
||||
alter table t1 key_block_size=0;
|
||||
alter table t1 row_format=dynamic;
|
||||
SELECT table_schema, table_name, row_format
|
||||
SELECT table_schema, table_name, row_format, data_length, index_length
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
table_schema table_name row_format
|
||||
test t1 Dynamic
|
||||
table_schema table_name row_format data_length index_length
|
||||
test t1 Dynamic 16384 0
|
||||
alter table t1 row_format=compact;
|
||||
SELECT table_schema, table_name, row_format
|
||||
SELECT table_schema, table_name, row_format, data_length, index_length
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
table_schema table_name row_format
|
||||
test t1 Compact
|
||||
table_schema table_name row_format data_length index_length
|
||||
test t1 Compact 16384 0
|
||||
alter table t1 row_format=redundant;
|
||||
SELECT table_schema, table_name, row_format
|
||||
SELECT table_schema, table_name, row_format, data_length, index_length
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
table_schema table_name row_format
|
||||
test t1 Redundant
|
||||
table_schema table_name row_format data_length index_length
|
||||
test t1 Redundant 16384 0
|
||||
drop table t1;
|
||||
create table t1(a int not null, b text, index(b(10))) engine=innodb
|
||||
key_block_size=1;
|
||||
@ -115,11 +115,11 @@ rollback;
|
||||
select a,left(b,40) from t1 natural join t2;
|
||||
a left(b,40)
|
||||
1 1abcdefghijklmnopqrstuvwxyzAAAAAAAAAAAAA
|
||||
SELECT table_schema, table_name, row_format
|
||||
SELECT table_schema, table_name, row_format, data_length, index_length
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
table_schema table_name row_format
|
||||
test t1 Compressed
|
||||
test t2 Compact
|
||||
table_schema table_name row_format data_length index_length
|
||||
test t1 Compressed 2048 1024
|
||||
test t2 Compact 16384 0
|
||||
drop table t1,t2;
|
||||
SET SESSION innodb_strict_mode = off;
|
||||
CREATE TABLE t1(
|
||||
@ -207,19 +207,19 @@ create table t8 (id int primary key) engine = innodb row_format = compressed;
|
||||
create table t9 (id int primary key) engine = innodb row_format = dynamic;
|
||||
create table t10(id int primary key) engine = innodb row_format = compact;
|
||||
create table t11(id int primary key) engine = innodb row_format = redundant;
|
||||
SELECT table_schema, table_name, row_format
|
||||
SELECT table_schema, table_name, row_format, data_length, index_length
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
table_schema table_name row_format
|
||||
test t1 Compact
|
||||
test t10 Compact
|
||||
test t11 Redundant
|
||||
test t3 Compressed
|
||||
test t4 Compressed
|
||||
test t5 Compressed
|
||||
test t6 Compressed
|
||||
test t7 Compressed
|
||||
test t8 Compressed
|
||||
test t9 Dynamic
|
||||
table_schema table_name row_format data_length index_length
|
||||
test t1 Compact 16384 0
|
||||
test t10 Compact 16384 0
|
||||
test t11 Redundant 16384 0
|
||||
test t3 Compressed 1024 0
|
||||
test t4 Compressed 2048 0
|
||||
test t5 Compressed 4096 0
|
||||
test t6 Compressed 8192 0
|
||||
test t7 Compressed 16384 0
|
||||
test t8 Compressed 8192 0
|
||||
test t9 Dynamic 16384 0
|
||||
drop table t1, t3, t4, t5, t6, t7, t8, t9, t10, t11;
|
||||
create table t1 (id int primary key) engine = innodb
|
||||
key_block_size = 8 row_format = compressed;
|
||||
@ -246,11 +246,11 @@ Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table 'test.t4' (errno: 1478)
|
||||
create table t5 (id int primary key) engine = innodb
|
||||
key_block_size = 8 row_format = default;
|
||||
SELECT table_schema, table_name, row_format
|
||||
SELECT table_schema, table_name, row_format, data_length, index_length
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
table_schema table_name row_format
|
||||
test t1 Compressed
|
||||
test t5 Compressed
|
||||
table_schema table_name row_format data_length index_length
|
||||
test t1 Compressed 8192 0
|
||||
test t5 Compressed 8192 0
|
||||
drop table t1, t5;
|
||||
create table t1 (id int primary key) engine = innodb
|
||||
key_block_size = 9 row_format = redundant;
|
||||
@ -276,9 +276,9 @@ Level Code Message
|
||||
Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16]
|
||||
Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table 'test.t2' (errno: 1478)
|
||||
SELECT table_schema, table_name, row_format
|
||||
SELECT table_schema, table_name, row_format, data_length, index_length
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
table_schema table_name row_format
|
||||
table_schema table_name row_format data_length index_length
|
||||
set global innodb_file_per_table = off;
|
||||
create table t1 (id int primary key) engine = innodb key_block_size = 1;
|
||||
ERROR HY000: Can't create table 'test.t1' (errno: 1478)
|
||||
@ -324,11 +324,11 @@ Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
|
||||
Error 1005 Can't create table 'test.t7' (errno: 1478)
|
||||
create table t8 (id int primary key) engine = innodb row_format = compact;
|
||||
create table t9 (id int primary key) engine = innodb row_format = redundant;
|
||||
SELECT table_schema, table_name, row_format
|
||||
SELECT table_schema, table_name, row_format, data_length, index_length
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
table_schema table_name row_format
|
||||
test t8 Compact
|
||||
test t9 Redundant
|
||||
table_schema table_name row_format data_length index_length
|
||||
test t8 Compact 16384 0
|
||||
test t9 Redundant 16384 0
|
||||
drop table t8, t9;
|
||||
set global innodb_file_per_table = on;
|
||||
set global innodb_file_format = `0`;
|
||||
@ -376,11 +376,11 @@ Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table 'test.t7' (errno: 1478)
|
||||
create table t8 (id int primary key) engine = innodb row_format = compact;
|
||||
create table t9 (id int primary key) engine = innodb row_format = redundant;
|
||||
SELECT table_schema, table_name, row_format
|
||||
SELECT table_schema, table_name, row_format, data_length, index_length
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
table_schema table_name row_format
|
||||
test t8 Compact
|
||||
test t9 Redundant
|
||||
table_schema table_name row_format data_length index_length
|
||||
test t8 Compact 16384 0
|
||||
test t9 Redundant 16384 0
|
||||
drop table t8, t9;
|
||||
set global innodb_file_per_table=0;
|
||||
set global innodb_file_format=Antelope;
|
||||
|
@ -39,19 +39,19 @@ create table t13(a int primary key) engine=innodb
|
||||
row_format=compressed;
|
||||
create table t14(a int primary key) engine=innodb key_block_size=9;
|
||||
|
||||
SELECT table_schema, table_name, row_format
|
||||
SELECT table_schema, table_name, row_format, data_length, index_length
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
|
||||
drop table t0,t00,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14;
|
||||
alter table t1 key_block_size=0;
|
||||
alter table t1 row_format=dynamic;
|
||||
SELECT table_schema, table_name, row_format
|
||||
SELECT table_schema, table_name, row_format, data_length, index_length
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
alter table t1 row_format=compact;
|
||||
SELECT table_schema, table_name, row_format
|
||||
SELECT table_schema, table_name, row_format, data_length, index_length
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
alter table t1 row_format=redundant;
|
||||
SELECT table_schema, table_name, row_format
|
||||
SELECT table_schema, table_name, row_format, data_length, index_length
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
drop table t1;
|
||||
|
||||
@ -84,7 +84,7 @@ connection default;
|
||||
disconnect a;
|
||||
disconnect b;
|
||||
|
||||
SELECT table_schema, table_name, row_format
|
||||
SELECT table_schema, table_name, row_format, data_length, index_length
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
drop table t1,t2;
|
||||
|
||||
@ -195,7 +195,7 @@ create table t9 (id int primary key) engine = innodb row_format = dynamic;
|
||||
create table t10(id int primary key) engine = innodb row_format = compact;
|
||||
create table t11(id int primary key) engine = innodb row_format = redundant;
|
||||
|
||||
SELECT table_schema, table_name, row_format
|
||||
SELECT table_schema, table_name, row_format, data_length, index_length
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
drop table t1, t3, t4, t5, t6, t7, t8, t9, t10, t11;
|
||||
|
||||
@ -221,7 +221,7 @@ show warnings;
|
||||
create table t5 (id int primary key) engine = innodb
|
||||
key_block_size = 8 row_format = default;
|
||||
|
||||
SELECT table_schema, table_name, row_format
|
||||
SELECT table_schema, table_name, row_format, data_length, index_length
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
drop table t1, t5;
|
||||
|
||||
@ -241,7 +241,7 @@ create table t2 (id int primary key) engine = innodb
|
||||
key_block_size = 9 row_format = dynamic;
|
||||
show warnings;
|
||||
|
||||
SELECT table_schema, table_name, row_format
|
||||
SELECT table_schema, table_name, row_format, data_length, index_length
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
|
||||
#test valid values with innodb_file_per_table unset
|
||||
@ -271,7 +271,7 @@ show warnings;
|
||||
create table t8 (id int primary key) engine = innodb row_format = compact;
|
||||
create table t9 (id int primary key) engine = innodb row_format = redundant;
|
||||
|
||||
SELECT table_schema, table_name, row_format
|
||||
SELECT table_schema, table_name, row_format, data_length, index_length
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
drop table t8, t9;
|
||||
|
||||
@ -303,7 +303,7 @@ show warnings;
|
||||
create table t8 (id int primary key) engine = innodb row_format = compact;
|
||||
create table t9 (id int primary key) engine = innodb row_format = redundant;
|
||||
|
||||
SELECT table_schema, table_name, row_format
|
||||
SELECT table_schema, table_name, row_format, data_length, index_length
|
||||
FROM information_schema.tables WHERE engine='innodb';
|
||||
drop table t8, t9;
|
||||
|
||||
|
@ -11,13 +11,7 @@ There should be *no* long test name listed below:
|
||||
select variable_name as `There should be *no* variables listed below:` from t2
|
||||
left join t1 on variable_name=test_name where test_name is null;
|
||||
There should be *no* variables listed below:
|
||||
INNODB_ROLLBACK_SEGMENTS
|
||||
INNODB_STATS_METHOD
|
||||
INNODB_FILE_FORMAT_MAX
|
||||
INNODB_LARGE_PREFIX
|
||||
INNODB_ROLLBACK_SEGMENTS
|
||||
INNODB_STATS_METHOD
|
||||
INNODB_FILE_FORMAT_MAX
|
||||
INNODB_LARGE_PREFIX
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
|
@ -1,59 +1,80 @@
|
||||
SET @start_global_value = @@global.innodb_file_format_max;
|
||||
SET @start_global_value = @@global.innodb_file_format_check;
|
||||
SELECT @start_global_value;
|
||||
@start_global_value
|
||||
Antelope
|
||||
Valid values are 'Antelope' and 'Barracuda'
|
||||
select @@global.innodb_file_format_max in ('Antelope', 'Barracuda');
|
||||
@@global.innodb_file_format_max in ('Antelope', 'Barracuda')
|
||||
1
|
||||
select @@global.innodb_file_format_max;
|
||||
@@global.innodb_file_format_max
|
||||
Antelope
|
||||
select @@session.innodb_file_format_max;
|
||||
ERROR HY000: Variable 'innodb_file_format_max' is a GLOBAL variable
|
||||
show global variables like 'innodb_file_format_max';
|
||||
Valid values are 'ON' and 'OFF'
|
||||
SELECT @@global.innodb_file_format_check in (0, 1);
|
||||
@@global.innodb_file_format_check in (0, 1)
|
||||
1
|
||||
SELECT @@global.innodb_file_format_check;
|
||||
@@global.innodb_file_format_check
|
||||
1
|
||||
SELECT @@session.innodb_file_format_check;
|
||||
ERROR HY000: Variable 'innodb_file_format_check' is a GLOBAL variable
|
||||
SHOW global variables LIKE 'innodb_file_format_check';
|
||||
Variable_name Value
|
||||
innodb_file_format_max Antelope
|
||||
show session variables like 'innodb_file_format_max';
|
||||
innodb_file_format_check ON
|
||||
SHOW session variables LIKE 'innodb_file_format_check';
|
||||
Variable_name Value
|
||||
innodb_file_format_max Antelope
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format_max';
|
||||
innodb_file_format_check ON
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_file_format_check';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_MAX Antelope
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format_max';
|
||||
INNODB_FILE_FORMAT_CHECK ON
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_file_format_check';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_MAX Antelope
|
||||
set global innodb_file_format_max='Antelope';
|
||||
select @@global.innodb_file_format_max;
|
||||
@@global.innodb_file_format_max
|
||||
Antelope
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format_max';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_MAX Antelope
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format_max';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_MAX Antelope
|
||||
set @@global.innodb_file_format_max='Barracuda';
|
||||
select @@global.innodb_file_format_max;
|
||||
@@global.innodb_file_format_max
|
||||
Barracuda
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format_max';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_MAX Barracuda
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format_max';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_MAX Barracuda
|
||||
set session innodb_file_format_max='Salmon';
|
||||
ERROR HY000: Variable 'innodb_file_format_max' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
set @@session.innodb_file_format_max='Salmon';
|
||||
ERROR HY000: Variable 'innodb_file_format_max' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
set global innodb_file_format_max=1.1;
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_file_format_max'
|
||||
set global innodb_file_format_max=1e1;
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_file_format_max'
|
||||
set global innodb_file_format_max='Salmon';
|
||||
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'Salmon'
|
||||
SET @@global.innodb_file_format_max = @start_global_value;
|
||||
SELECT @@global.innodb_file_format_max;
|
||||
@@global.innodb_file_format_max
|
||||
Antelope
|
||||
INNODB_FILE_FORMAT_CHECK ON
|
||||
SET @@global.innodb_file_format_check='Off';
|
||||
ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
|
||||
Expected error 'Read only variable'
|
||||
SET @@global.innodb_file_format_check=1;
|
||||
ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
|
||||
Expected error 'Read only variable'
|
||||
SET @@global.innodb_file_format_check=0;
|
||||
ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
|
||||
Expected error 'Read only variable'
|
||||
SET @@global.innodb_file_format_check='On';
|
||||
ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
|
||||
Expected error 'Read only variable'
|
||||
SET session innodb_large_prefix='OFF';
|
||||
ERROR HY000: Variable 'innodb_large_prefix' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SET @@session.innodb_stats_on_metadata='ON';
|
||||
ERROR HY000: Variable 'innodb_stats_on_metadata' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SELECT IF(@@GLOBAL.innodb_file_format_check, "ON", "OFF") = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_file_format_check';
|
||||
IF(@@GLOBAL.innodb_file_format_check, "ON", "OFF") = VARIABLE_VALUE
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@GLOBAL.innodb_file_format_check);
|
||||
COUNT(@@GLOBAL.innodb_file_format_check)
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_file_format_check';
|
||||
COUNT(VARIABLE_VALUE)
|
||||
1
|
||||
1 Expected
|
||||
SELECT @@innodb_file_format_check = @@GLOBAL.innodb_file_format_check;
|
||||
@@innodb_file_format_check = @@GLOBAL.innodb_file_format_check
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@innodb_file_format_check);
|
||||
COUNT(@@innodb_file_format_check)
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@local.innodb_file_format_check);
|
||||
ERROR HY000: Variable 'innodb_file_format_check' is a GLOBAL variable
|
||||
Expected error 'Variable is a GLOBAL variable'
|
||||
SELECT COUNT(@@SESSION.innodb_file_format_check);
|
||||
ERROR HY000: Variable 'innodb_file_format_check' is a GLOBAL variable
|
||||
Expected error 'Variable is a GLOBAL variable'
|
||||
SELECT COUNT(@@GLOBAL.innodb_file_format_check);
|
||||
COUNT(@@GLOBAL.innodb_file_format_check)
|
||||
1
|
||||
1 Expected
|
||||
SELECT innodb_file_format_check = @@SESSION.innodb_file_format_check;
|
||||
ERROR 42S22: Unknown column 'innodb_file_format_check' in 'field list'
|
||||
Expected error 'Readonly variable'
|
||||
|
@ -0,0 +1,65 @@
|
||||
SET @start_global_value = @@global.innodb_file_format_max;
|
||||
SELECT @start_global_value;
|
||||
@start_global_value
|
||||
Antelope
|
||||
Valid values are 'Antelope' and 'Barracuda'
|
||||
SELECT @@global.innodb_file_format_max in ('Antelope', 'Barracuda');
|
||||
@@global.innodb_file_format_max in ('Antelope', 'Barracuda')
|
||||
1
|
||||
SELECT @@global.innodb_file_format_max;
|
||||
@@global.innodb_file_format_max
|
||||
Antelope
|
||||
SELECT @@session.innodb_file_format_max;
|
||||
ERROR HY000: Variable 'innodb_file_format_max' is a GLOBAL variable
|
||||
SHOW global variables LIKE 'innodb_file_format_max';
|
||||
Variable_name Value
|
||||
innodb_file_format_max Antelope
|
||||
SHOW session variables LIKE 'innodb_file_format_max';
|
||||
Variable_name Value
|
||||
innodb_file_format_max Antelope
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_file_format_max';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_MAX Antelope
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_file_format_max';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_MAX Antelope
|
||||
SET global innodb_file_format_max='Antelope';
|
||||
SELECT @@global.innodb_file_format_max;
|
||||
@@global.innodb_file_format_max
|
||||
Antelope
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_file_format_max';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_MAX Antelope
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_file_format_max';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_MAX Antelope
|
||||
SET @@global.innodb_file_format_max='Barracuda';
|
||||
SELECT @@global.innodb_file_format_max;
|
||||
@@global.innodb_file_format_max
|
||||
Barracuda
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_file_format_max';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_MAX Barracuda
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_file_format_max';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_MAX Barracuda
|
||||
SET session innodb_file_format_max='Salmon';
|
||||
ERROR HY000: Variable 'innodb_file_format_max' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SET @@session.innodb_file_format_max='Salmon';
|
||||
ERROR HY000: Variable 'innodb_file_format_max' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SET global innodb_file_format_max=1.1;
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_file_format_max'
|
||||
SET global innodb_file_format_max=1e1;
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_file_format_max'
|
||||
SET global innodb_file_format_max='Salmon';
|
||||
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'Salmon'
|
||||
SET @@global.innodb_file_format_max = @start_global_value;
|
||||
SELECT @@global.innodb_file_format_max;
|
||||
@@global.innodb_file_format_max
|
||||
Antelope
|
@ -0,0 +1,64 @@
|
||||
SET @start_global_value = @@global.innodb_rollback_segments;
|
||||
SELECT @start_global_value;
|
||||
@start_global_value
|
||||
128
|
||||
Valid values are zero or above
|
||||
SELECT @@global.innodb_rollback_segments >=0;
|
||||
@@global.innodb_rollback_segments >=0
|
||||
1
|
||||
SELECT @@global.innodb_rollback_segments <=128;
|
||||
@@global.innodb_rollback_segments <=128
|
||||
1
|
||||
SELECT @@global.innodb_rollback_segments;
|
||||
@@global.innodb_rollback_segments
|
||||
128
|
||||
SELECT @@session.innodb_rollback_segments;
|
||||
ERROR HY000: Variable 'innodb_rollback_segments' is a GLOBAL variable
|
||||
SHOW global variables LIKE 'innodb_rollback_segments';
|
||||
Variable_name Value
|
||||
innodb_rollback_segments 128
|
||||
SHOW session variables LIKE 'innodb_rollback_segments';
|
||||
Variable_name Value
|
||||
innodb_rollback_segments 128
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_rollback_segments';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_ROLLBACK_SEGMENTS 128
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_rollback_segments';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_ROLLBACK_SEGMENTS 128
|
||||
SET global innodb_rollback_segments=100;
|
||||
SELECT @@global.innodb_rollback_segments;
|
||||
@@global.innodb_rollback_segments
|
||||
100
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_rollback_segments';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_ROLLBACK_SEGMENTS 100
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_rollback_segments';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_ROLLBACK_SEGMENTS 100
|
||||
SET session innodb_rollback_segments=1;
|
||||
ERROR HY000: Variable 'innodb_rollback_segments' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SET global innodb_rollback_segments=1.1;
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_rollback_segments'
|
||||
SET global innodb_rollback_segments=1e1;
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_rollback_segments'
|
||||
SET global innodb_rollback_segments="foo";
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_rollback_segments'
|
||||
SET global innodb_rollback_segments=-7;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect innodb_rollback_segments value: '-7'
|
||||
SELECT @@global.innodb_rollback_segments;
|
||||
@@global.innodb_rollback_segments
|
||||
1
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_rollback_segments';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_ROLLBACK_SEGMENTS 1
|
||||
SET @@global.innodb_rollback_segments = @start_global_value;
|
||||
SELECT @@global.innodb_rollback_segments;
|
||||
@@global.innodb_rollback_segments
|
||||
128
|
83
mysql-test/suite/sys_vars/r/innodb_stats_method_basic.result
Normal file
83
mysql-test/suite/sys_vars/r/innodb_stats_method_basic.result
Normal file
@ -0,0 +1,83 @@
|
||||
SET @start_global_value = @@global.innodb_stats_method;
|
||||
SELECT @start_global_value;
|
||||
@start_global_value
|
||||
nulls_equal
|
||||
Valid values are 'nulls_equal', 'nulls_unequal', 'nulls_ignored'
|
||||
SELECT @@global.innodb_stats_method in ('nulls_equal', 'nulls_unequal',
|
||||
'nulls_ignored');
|
||||
@@global.innodb_stats_method in ('nulls_equal', 'nulls_unequal',
|
||||
'nulls_ignored')
|
||||
1
|
||||
SELECT @@global.innodb_stats_method;
|
||||
@@global.innodb_stats_method
|
||||
nulls_equal
|
||||
SELECT @@session.innodb_stats_method;
|
||||
ERROR HY000: Variable 'innodb_stats_method' is a GLOBAL variable
|
||||
SHOW global variables LIKE 'innodb_stats_method';
|
||||
Variable_name Value
|
||||
innodb_stats_method nulls_equal
|
||||
SHOW session variables LIKE 'innodb_stats_method';
|
||||
Variable_name Value
|
||||
innodb_stats_method nulls_equal
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_stats_method';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_STATS_METHOD nulls_equal
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_stats_method';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_STATS_METHOD nulls_equal
|
||||
SET global innodb_stats_method='nulls_equal';
|
||||
SELECT @@global.innodb_stats_method;
|
||||
@@global.innodb_stats_method
|
||||
nulls_equal
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_stats_method';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_STATS_METHOD nulls_equal
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_stats_method';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_STATS_METHOD nulls_equal
|
||||
SET @@global.innodb_stats_method='nulls_unequal';
|
||||
SELECT @@global.innodb_stats_method;
|
||||
@@global.innodb_stats_method
|
||||
nulls_unequal
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_stats_method';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_STATS_METHOD nulls_unequal
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_stats_method';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_STATS_METHOD nulls_unequal
|
||||
SET global innodb_stats_method=2;
|
||||
SELECT @@global.innodb_stats_method;
|
||||
@@global.innodb_stats_method
|
||||
nulls_ignored
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_stats_method';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_STATS_METHOD nulls_ignored
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_stats_method';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_STATS_METHOD nulls_ignored
|
||||
SET session innodb_stats_method='nulls_equal';
|
||||
ERROR HY000: Variable 'innodb_stats_method' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SET @@session.innodb_stats_method='nulls_ignored';
|
||||
ERROR HY000: Variable 'innodb_stats_method' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SET global innodb_stats_method=1.1;
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_stats_method'
|
||||
SET global innodb_stats_method=4;
|
||||
ERROR 42000: Variable 'innodb_stats_method' can't be set to the value of '4'
|
||||
SET global innodb_stats_method=-2;
|
||||
ERROR 42000: Variable 'innodb_stats_method' can't be set to the value of '-2'
|
||||
SET global innodb_stats_method=1e1;
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_stats_method'
|
||||
SET global innodb_stats_method='some';
|
||||
ERROR 42000: Variable 'innodb_stats_method' can't be set to the value of 'some'
|
||||
SET @@global.innodb_stats_method = @start_global_value;
|
||||
SELECT @@global.innodb_stats_method;
|
||||
@@global.innodb_stats_method
|
||||
nulls_equal
|
@ -1,55 +1,95 @@
|
||||
|
||||
|
||||
# 2010-01-25 - Added
|
||||
#
|
||||
# 2011-08-02 - Added
|
||||
#
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
SET @start_global_value = @@global.innodb_file_format_max;
|
||||
SET @start_global_value = @@global.innodb_file_format_check;
|
||||
SELECT @start_global_value;
|
||||
|
||||
#
|
||||
# exists as global only
|
||||
#
|
||||
--echo Valid values are 'Antelope' and 'Barracuda'
|
||||
select @@global.innodb_file_format_max in ('Antelope', 'Barracuda');
|
||||
select @@global.innodb_file_format_max;
|
||||
--echo Valid values are 'ON' and 'OFF'
|
||||
SELECT @@global.innodb_file_format_check in (0, 1);
|
||||
SELECT @@global.innodb_file_format_check;
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.innodb_file_format_max;
|
||||
show global variables like 'innodb_file_format_max';
|
||||
show session variables like 'innodb_file_format_max';
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format_max';
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format_max';
|
||||
SELECT @@session.innodb_file_format_check;
|
||||
SHOW global variables LIKE 'innodb_file_format_check';
|
||||
SHOW session variables LIKE 'innodb_file_format_check';
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_file_format_check';
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_file_format_check';
|
||||
|
||||
#
|
||||
# show that it's writable
|
||||
# show that it's read only
|
||||
#
|
||||
set global innodb_file_format_max='Antelope';
|
||||
select @@global.innodb_file_format_max;
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format_max';
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format_max';
|
||||
set @@global.innodb_file_format_max='Barracuda';
|
||||
select @@global.innodb_file_format_max;
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format_max';
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format_max';
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SET @@global.innodb_file_format_check='Off';
|
||||
--echo Expected error 'Read only variable'
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SET @@global.innodb_file_format_check=1;
|
||||
--echo Expected error 'Read only variable'
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SET @@global.innodb_file_format_check=0;
|
||||
--echo Expected error 'Read only variable'
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SET @@global.innodb_file_format_check='On';
|
||||
--echo Expected error 'Read only variable'
|
||||
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
set session innodb_file_format_max='Salmon';
|
||||
SET session innodb_large_prefix='OFF';
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
set @@session.innodb_file_format_max='Salmon';
|
||||
SET @@session.innodb_stats_on_metadata='ON';
|
||||
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_file_format_max=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_file_format_max=1e1;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format_max='Salmon';
|
||||
|
||||
#
|
||||
# Cleanup
|
||||
# Check if the value in GLOBAL Table matches value in variable
|
||||
#
|
||||
|
||||
SET @@global.innodb_file_format_max = @start_global_value;
|
||||
SELECT @@global.innodb_file_format_max;
|
||||
SELECT IF(@@GLOBAL.innodb_file_format_check, "ON", "OFF") = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_file_format_check';
|
||||
--echo 1 Expected
|
||||
|
||||
SELECT COUNT(@@GLOBAL.innodb_file_format_check);
|
||||
--echo 1 Expected
|
||||
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_file_format_check';
|
||||
--echo 1 Expected
|
||||
|
||||
#
|
||||
# Check if accessing variable with and without GLOBAL point to same variable
|
||||
#
|
||||
SELECT @@innodb_file_format_check = @@GLOBAL.innodb_file_format_check;
|
||||
--echo 1 Expected
|
||||
|
||||
#
|
||||
# Check if innodb_doublewrite can be accessed with and without @@ sign
|
||||
#
|
||||
|
||||
SELECT COUNT(@@innodb_file_format_check);
|
||||
--echo 1 Expected
|
||||
|
||||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT COUNT(@@local.innodb_file_format_check);
|
||||
--echo Expected error 'Variable is a GLOBAL variable'
|
||||
|
||||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT COUNT(@@SESSION.innodb_file_format_check);
|
||||
--echo Expected error 'Variable is a GLOBAL variable'
|
||||
|
||||
SELECT COUNT(@@GLOBAL.innodb_file_format_check);
|
||||
--echo 1 Expected
|
||||
|
||||
--Error ER_BAD_FIELD_ERROR
|
||||
SELECT innodb_file_format_check = @@SESSION.innodb_file_format_check;
|
||||
--echo Expected error 'Readonly variable'
|
||||
|
@ -0,0 +1,60 @@
|
||||
#
|
||||
# 2011-08-02 - Added
|
||||
#
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
SET @start_global_value = @@global.innodb_file_format_max;
|
||||
SELECT @start_global_value;
|
||||
|
||||
#
|
||||
# exists as global only
|
||||
#
|
||||
--echo Valid values are 'Antelope' and 'Barracuda'
|
||||
SELECT @@global.innodb_file_format_max in ('Antelope', 'Barracuda');
|
||||
SELECT @@global.innodb_file_format_max;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT @@session.innodb_file_format_max;
|
||||
SHOW global variables LIKE 'innodb_file_format_max';
|
||||
SHOW session variables LIKE 'innodb_file_format_max';
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_file_format_max';
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_file_format_max';
|
||||
|
||||
#
|
||||
# show that it's writable
|
||||
#
|
||||
SET global innodb_file_format_max='Antelope';
|
||||
SELECT @@global.innodb_file_format_max;
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_file_format_max';
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_file_format_max';
|
||||
SET @@global.innodb_file_format_max='Barracuda';
|
||||
SELECT @@global.innodb_file_format_max;
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_file_format_max';
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_file_format_max';
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
SET session innodb_file_format_max='Salmon';
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
SET @@session.innodb_file_format_max='Salmon';
|
||||
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
SET global innodb_file_format_max=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
SET global innodb_file_format_max=1e1;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
SET global innodb_file_format_max='Salmon';
|
||||
|
||||
#
|
||||
# Cleanup
|
||||
#
|
||||
|
||||
SET @@global.innodb_file_format_max = @start_global_value;
|
||||
SELECT @@global.innodb_file_format_max;
|
@ -0,0 +1,58 @@
|
||||
#
|
||||
# 2011-08-01 Added
|
||||
#
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
SET @start_global_value = @@global.innodb_rollback_segments;
|
||||
SELECT @start_global_value;
|
||||
|
||||
#
|
||||
# exists as global only
|
||||
#
|
||||
--echo Valid values are zero or above
|
||||
SELECT @@global.innodb_rollback_segments >=0;
|
||||
SELECT @@global.innodb_rollback_segments <=128;
|
||||
SELECT @@global.innodb_rollback_segments;
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT @@session.innodb_rollback_segments;
|
||||
SHOW global variables LIKE 'innodb_rollback_segments';
|
||||
SHOW session variables LIKE 'innodb_rollback_segments';
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_rollback_segments';
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_rollback_segments';
|
||||
|
||||
#
|
||||
# show that it's writable
|
||||
#
|
||||
SET global innodb_rollback_segments=100;
|
||||
SELECT @@global.innodb_rollback_segments;
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_rollback_segments';
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_rollback_segments';
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
SET session innodb_rollback_segments=1;
|
||||
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
SET global innodb_rollback_segments=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
SET global innodb_rollback_segments=1e1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
SET global innodb_rollback_segments="foo";
|
||||
SET global innodb_rollback_segments=-7;
|
||||
SELECT @@global.innodb_rollback_segments;
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_rollback_segments';
|
||||
|
||||
#
|
||||
# cleanup
|
||||
#
|
||||
|
||||
SET @@global.innodb_rollback_segments = @start_global_value;
|
||||
SELECT @@global.innodb_rollback_segments;
|
72
mysql-test/suite/sys_vars/t/innodb_stats_method_basic.test
Normal file
72
mysql-test/suite/sys_vars/t/innodb_stats_method_basic.test
Normal file
@ -0,0 +1,72 @@
|
||||
#
|
||||
# 2011-08-05 - Added
|
||||
#
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
SET @start_global_value = @@global.innodb_stats_method;
|
||||
SELECT @start_global_value;
|
||||
|
||||
#
|
||||
# exists as global only
|
||||
#
|
||||
--echo Valid values are 'nulls_equal', 'nulls_unequal', 'nulls_ignored'
|
||||
SELECT @@global.innodb_stats_method in ('nulls_equal', 'nulls_unequal',
|
||||
'nulls_ignored');
|
||||
SELECT @@global.innodb_stats_method;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT @@session.innodb_stats_method;
|
||||
SHOW global variables LIKE 'innodb_stats_method';
|
||||
SHOW session variables LIKE 'innodb_stats_method';
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_stats_method';
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_stats_method';
|
||||
|
||||
#
|
||||
# show that it's writable
|
||||
#
|
||||
SET global innodb_stats_method='nulls_equal';
|
||||
SELECT @@global.innodb_stats_method;
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_stats_method';
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_stats_method';
|
||||
SET @@global.innodb_stats_method='nulls_unequal';
|
||||
SELECT @@global.innodb_stats_method;
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_stats_method';
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_stats_method';
|
||||
SET global innodb_stats_method=2;
|
||||
SELECT @@global.innodb_stats_method;
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_stats_method';
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_stats_method';
|
||||
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
SET session innodb_stats_method='nulls_equal';
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
SET @@session.innodb_stats_method='nulls_ignored';
|
||||
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
SET global innodb_stats_method=1.1;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
SET global innodb_stats_method=4;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
SET global innodb_stats_method=-2;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
SET global innodb_stats_method=1e1;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
SET global innodb_stats_method='some';
|
||||
|
||||
#
|
||||
# Cleanup
|
||||
#
|
||||
|
||||
SET @@global.innodb_stats_method = @start_global_value;
|
||||
SELECT @@global.innodb_stats_method;
|
@ -909,6 +909,12 @@ SELECT DATE_FORMAT('0000-00-11', '%w');
|
||||
SELECT MAKEDATE(11111111,1);
|
||||
SELECT WEEK(DATE_ADD(FROM_DAYS(1),INTERVAL 1 MONTH), 1);
|
||||
|
||||
--echo #
|
||||
--echo # Bug#12584302 AFTER FIX FOR #12403504: ASSERTION FAILED: DELSUM+(INT) Y/4-TEMP > 0,
|
||||
--echo #
|
||||
|
||||
DO WEEK((DATE_ADD((CAST(0 AS DATE)), INTERVAL 1 YEAR_MONTH)), 5);
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
--echo #
|
||||
|
@ -1543,8 +1543,6 @@ DROP TABLE t1, information_schema.tables;
|
||||
LOCK TABLES t1 READ, information_schema.tables READ;
|
||||
DROP TABLE t1;
|
||||
|
||||
# Wait till all disconnects are completed
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
#
|
||||
# Bug #43834 Assertion in Natural_join_column::db_name() on an I_S query
|
||||
@ -1608,6 +1606,186 @@ drop table t1;
|
||||
drop view v1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Test for bug #12828477 - "MDL SUBSYSTEM CREATES BIG OVERHEAD FOR
|
||||
--echo # CERTAIN QUERIES TO INFORMATION_SCHEMA".
|
||||
--echo #
|
||||
--echo # Check that metadata locks which are acquired during the process
|
||||
--echo # of opening tables/.FRMs/.TRG files while filling I_S table are
|
||||
--echo # not kept to the end of statement. Keeping the locks has caused
|
||||
--echo # performance problems in cases when big number of tables (.FRMs
|
||||
--echo # or .TRG files) were scanned as cost of new lock acquisition has
|
||||
--echo # increased linearly.
|
||||
--disable_warnings
|
||||
drop database if exists mysqltest;
|
||||
--enable_warnings
|
||||
create database mysqltest;
|
||||
use mysqltest;
|
||||
create table t0 (i int);
|
||||
create table t1 (j int);
|
||||
create table t2 (k int);
|
||||
|
||||
--echo #
|
||||
--echo # Test that we don't keep locks in case when we to fill
|
||||
--echo # I_S table we perform full-blown table open.
|
||||
--echo #
|
||||
|
||||
--echo # Acquire lock on 't2' so upcoming RENAME is
|
||||
--echo # blocked.
|
||||
lock tables t2 read;
|
||||
|
||||
--echo #
|
||||
--echo # Switching to connection 'con12828477_1'.
|
||||
--echo #
|
||||
connect (con12828477_1, localhost, root,,mysqltest);
|
||||
--echo # The below RENAME should wait on 't2' while
|
||||
--echo # keeping X lock on 't1'.
|
||||
--send rename table t1 to t3, t2 to t1, t3 to t2
|
||||
|
||||
--echo #
|
||||
--echo # Switching to connection 'con12828477_2'.
|
||||
--echo #
|
||||
connect (con12828477_2, localhost, root,,mysqltest);
|
||||
--echo # Wait while the above RENAME is blocked.
|
||||
let $wait_condition=
|
||||
select count(*) = 1 from information_schema.processlist
|
||||
where state = "Waiting for table metadata lock" and
|
||||
info = "rename table t1 to t3, t2 to t1, t3 to t2";
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--echo # Issue query to I_S which will open 't0' and get
|
||||
--echo # blocked on 't1' because of RENAME.
|
||||
--send select table_name, auto_increment from information_schema.tables where table_schema='mysqltest'
|
||||
|
||||
--echo #
|
||||
--echo # Switching to connection 'con12828477_3'.
|
||||
--echo #
|
||||
connect (con12828477_3, localhost, root,,mysqltest);
|
||||
--echo # Wait while the above SELECT is blocked.
|
||||
let $wait_condition=
|
||||
select count(*) = 1 from information_schema.processlist
|
||||
where state = "Waiting for table metadata lock" and
|
||||
info = "select table_name, auto_increment from information_schema.tables where table_schema='mysqltest'";
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--echo #
|
||||
--echo # Check that it holds no lock on 't0' so it can be renamed.
|
||||
rename table t0 to t4;
|
||||
|
||||
--echo #
|
||||
--echo # Switching to connection 'default'.
|
||||
--echo #
|
||||
connection default;
|
||||
--echo #
|
||||
--echo # Unblock the first RENAME.
|
||||
unlock tables;
|
||||
|
||||
--echo #
|
||||
--echo # Switching to connection 'con12828477_1'.
|
||||
--echo #
|
||||
connection con12828477_1;
|
||||
--echo # Reap the first RENAME
|
||||
--reap
|
||||
|
||||
--echo #
|
||||
--echo # Switching to connection 'con12828477_2'.
|
||||
--echo #
|
||||
connection con12828477_2;
|
||||
--echo # Reap SELECT to I_S.
|
||||
--reap
|
||||
|
||||
--echo #
|
||||
--echo # Switching to connection 'default'.
|
||||
--echo #
|
||||
connection default;
|
||||
|
||||
--echo #
|
||||
--echo # Now test that we don't keep locks in case when we to fill
|
||||
--echo # I_S table we read .FRM or .TRG file only (this was the case
|
||||
--echo # for which problem existed).
|
||||
--echo #
|
||||
|
||||
rename table t4 to t0;
|
||||
--echo # Acquire lock on 't2' so upcoming RENAME is
|
||||
--echo # blocked.
|
||||
lock tables t2 read;
|
||||
|
||||
--echo #
|
||||
--echo # Switching to connection 'con12828477_1'.
|
||||
--echo #
|
||||
connection con12828477_1;
|
||||
--echo # The below RENAME should wait on 't2' while
|
||||
--echo # keeping X lock on 't1'.
|
||||
--send rename table t1 to t3, t2 to t1, t3 to t2
|
||||
|
||||
--echo #
|
||||
--echo # Switching to connection 'con12828477_2'.
|
||||
--echo #
|
||||
connection con12828477_2;
|
||||
--echo # Wait while the above RENAME is blocked.
|
||||
let $wait_condition=
|
||||
select count(*) = 1 from information_schema.processlist
|
||||
where state = "Waiting for table metadata lock" and
|
||||
info = "rename table t1 to t3, t2 to t1, t3 to t2";
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--echo # Issue query to I_S which will open 't0' and get
|
||||
--echo # blocked on 't1' because of RENAME.
|
||||
--send select event_object_table, trigger_name from information_schema.triggers where event_object_schema='mysqltest'
|
||||
|
||||
--echo #
|
||||
--echo # Switching to connection 'con12828477_3'.
|
||||
--echo #
|
||||
connection con12828477_3;
|
||||
--echo # Wait while the above SELECT is blocked.
|
||||
let $wait_condition=
|
||||
select count(*) = 1 from information_schema.processlist
|
||||
where state = "Waiting for table metadata lock" and
|
||||
info = "select event_object_table, trigger_name from information_schema.triggers where event_object_schema='mysqltest'";
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--echo #
|
||||
--echo # Check that it holds no lock on 't0' so it can be renamed.
|
||||
rename table t0 to t4;
|
||||
|
||||
--echo #
|
||||
--echo # Switching to connection 'default'.
|
||||
--echo #
|
||||
connection default;
|
||||
--echo #
|
||||
--echo # Unblock the first RENAME.
|
||||
unlock tables;
|
||||
|
||||
--echo #
|
||||
--echo # Switching to connection 'con12828477_1'.
|
||||
--echo #
|
||||
connection con12828477_1;
|
||||
--echo # Reap the first RENAME
|
||||
--reap
|
||||
|
||||
--echo #
|
||||
--echo # Switching to connection 'con12828477_2'.
|
||||
--echo #
|
||||
connection con12828477_2;
|
||||
--echo # Reap SELECT to I_S.
|
||||
--reap
|
||||
|
||||
--echo #
|
||||
--echo # Switching to connection 'default'.
|
||||
--echo #
|
||||
connection default;
|
||||
disconnect con12828477_1;
|
||||
disconnect con12828477_2;
|
||||
disconnect con12828477_3;
|
||||
|
||||
--echo #
|
||||
--echo # Clean-up.
|
||||
drop database mysqltest;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.5 tests
|
||||
--echo #
|
||||
|
||||
# Wait till all disconnects are completed
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
@ -2798,7 +2798,32 @@ UNLOCK TABLES;
|
||||
DROP TABLE m1, t1;
|
||||
|
||||
|
||||
--echo End of 6.0 tests
|
||||
--echo #
|
||||
--echo # Test for bug #11754210 - "45777: CHECK TABLE DOESN'T SHOW ALL
|
||||
--echo # PROBLEMS FOR MERGE TABLE COMPLIANCE IN 5.1"
|
||||
--echo #
|
||||
--disable_warnings
|
||||
drop tables if exists t1, t2, t3, t4, m1;
|
||||
--enable_warnings
|
||||
create table t1(id int) engine=myisam;
|
||||
create view t3 as select 1 as id;
|
||||
create table t4(id int) engine=memory;
|
||||
create table m1(id int) engine=merge union=(t1,t2,t3,t4);
|
||||
--error ER_WRONG_MRG_TABLE
|
||||
select * from m1;
|
||||
--echo # The below CHECK and REPAIR TABLE statements should
|
||||
--echo # report all problems with underlying tables:
|
||||
--echo # - absence of 't2',
|
||||
--echo # - missing base table for 't3',
|
||||
--echo # - wrong engine of 't4'.
|
||||
check table m1;
|
||||
repair table m1;
|
||||
--echo # Clean-up.
|
||||
drop tables m1, t1, t4;
|
||||
drop view t3;
|
||||
|
||||
|
||||
--echo End of 5.5 tests
|
||||
|
||||
--disable_result_log
|
||||
--disable_query_log
|
||||
|
1
mysql-test/t/mysql_plugin-master.opt
Normal file
1
mysql-test/t/mysql_plugin-master.opt
Normal file
@ -0,0 +1 @@
|
||||
--plugin-dir=$DAEMONEXAMPLE_DIR
|
318
mysql-test/t/mysql_plugin.test
Normal file
318
mysql-test/t/mysql_plugin.test
Normal file
@ -0,0 +1,318 @@
|
||||
#
|
||||
# Test mysql_plugin tool
|
||||
#
|
||||
# This test contains test cases for testing the mysql_plugin client with
|
||||
# the daemon_example plugin. Test cases include tests for:
|
||||
#
|
||||
# - successful enable/disable
|
||||
# - incorrect paths
|
||||
# - missing paths/options
|
||||
#
|
||||
# Implementation Notes
|
||||
#
|
||||
# The mysql_plugin tool now accepts --mysqld the path to mysqld server. The
|
||||
# mysqld path is extracted from MYSQLD_BOOTSTRAP_CMD line. We also extract
|
||||
# the path of MYSQLD_BASEDIR (where mysql exists) and use it for the errmsg
|
||||
# file. The directories differ between Windows and Unix but the Perl script
|
||||
# included below will pick as per platform.
|
||||
#
|
||||
# The test is also designed to issue the --skip directive if the location of
|
||||
# the mysqld, my_print_defaults, or daemon_example.ini files cannot be found.
|
||||
#
|
||||
|
||||
--source include/not_embedded.inc
|
||||
|
||||
# Add the datadir, basedir, plugin_dir to the bootstrap command
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
let $MYSQL_BASEDIR= `select @@basedir`;
|
||||
let $MYSQL_ERRMSG_BASEDIR=`select @@lc_messages_dir`;
|
||||
let $PLUGIN_DIR=`select @@plugin_dir`;
|
||||
|
||||
--disable_abort_on_error
|
||||
|
||||
# Perl script to extract the location of the basedir from environment
|
||||
# variables. This is needed to ensure the test will run on the PB machines
|
||||
# designed to test release as well as debug builds. It also checks for the
|
||||
# location of the my_print_defaults and daemon_example.ini files.
|
||||
|
||||
perl;
|
||||
use File::Basename;
|
||||
my ($mysqld)= split " ", $ENV{MYSQLD_BOOTSTRAP_CMD};
|
||||
my $mysqld_basedir=dirname($mysqld);
|
||||
my $my_print_defaults= $ENV{MYSQL_MY_PRINT_DEFAULTS};
|
||||
my $my_print_defaults_basedir=dirname($my_print_defaults);
|
||||
my $daemonexample_ini= "$ENV{DAEMONEXAMPLE_DIR}/daemon_example.ini";
|
||||
my $plugindir_ini= "$ENV{PLUGIN_DIR}/daemon_example.ini";
|
||||
my $notfound= "";
|
||||
open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/mysqld.inc") or die;
|
||||
print FILE "let \$MYSQLD= $mysqld;\n";
|
||||
print FILE "let \$MYSQLD_BASEDIR= $mysqld_basedir;\n";
|
||||
print FILE "let \$MYSQL_MY_PRINT_DEFAULTS_BASEDIR= $my_print_defaults_basedir;\n";
|
||||
if ((!-e $daemonexample_ini) || (!-r $daemonexample_ini))
|
||||
{
|
||||
print FILE "let \$DAEMONEXAMPLE_DIR= $not_found;\n";
|
||||
}
|
||||
if ((!-e $plugindir_ini) || (!-r $plugindir_ini))
|
||||
{
|
||||
print FILE "let \$PLUGIN_DIR= $not_found;\n";
|
||||
}
|
||||
close FILE;
|
||||
EOF
|
||||
|
||||
|
||||
source $MYSQL_TMP_DIR/mysqld.inc;
|
||||
remove_file $MYSQL_TMP_DIR/mysqld.inc;
|
||||
|
||||
# The mysql_plugin tool expects a directory structure like in the installed
|
||||
# mysql version, so errmsg.sys will be copied to "basedir/share", we create
|
||||
# and remove this structure.
|
||||
|
||||
--mkdir $MYSQLD_BASEDIR/share
|
||||
--mkdir $MYSQLD_BASEDIR/share/mysql
|
||||
--copy_file $MYSQL_ERRMSG_BASEDIR/english/errmsg.sys $MYSQLD_BASEDIR/share/errmsg.sys
|
||||
--copy_file $MYSQL_ERRMSG_BASEDIR/english/errmsg.sys $MYSQLD_BASEDIR/share/mysql/errmsg.sys
|
||||
|
||||
# The mysql_plugin tool now accepts --my-print-defaults which points to the
|
||||
# executable my_print_defaults.exe we can get this path from the variable
|
||||
# $MYSQL_MY_PRINT_DEFAULTS.
|
||||
|
||||
# Check for my_print_defaults location. Skip if not found.
|
||||
if ($MYSQL_MY_PRINT_DEFAULTS_BASEDIR == '')
|
||||
{
|
||||
--skip Test requires known location of my_print_defaults executable.
|
||||
}
|
||||
|
||||
# Check for mysqld location. Skip if not found.
|
||||
if ($MYSQLD == '')
|
||||
{
|
||||
--skip Test requires known location of mysqld executable.
|
||||
}
|
||||
|
||||
# Check for daemon_example.ini location. Skip if not found in either
|
||||
# the plugin_dir path or the daemon_example_dir path.
|
||||
if ($PLUGIN_DIR == '')
|
||||
{
|
||||
if ($DAEMONEXAMPLE_DIR == '')
|
||||
{
|
||||
--skip Test requires known location of daemon_example.ini file.
|
||||
}
|
||||
let $PLUGIN_DIR = $DAEMONEXAMPLE_DIR;
|
||||
}
|
||||
|
||||
# Build client command for reuse.
|
||||
|
||||
let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN --datadir=$MYSQLD_DATADIR --basedir=$MYSQLD_BASEDIR --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
|
||||
|
||||
--echo #
|
||||
--echo # Ensure the plugin isn't loaded.
|
||||
--echo #
|
||||
SELECT * FROM mysql.plugin WHERE name = 'daemon_example' ORDER BY name;
|
||||
|
||||
--echo #
|
||||
--echo # Enable the plugin...
|
||||
--echo #
|
||||
let $expect_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
|
||||
# MTR will remove this file later, but this might be too late.
|
||||
--error 0,1
|
||||
--remove_file $expect_file
|
||||
--write_file $expect_file
|
||||
wait
|
||||
EOF
|
||||
--shutdown_server 10
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
#
|
||||
# Enable the plugin
|
||||
#
|
||||
--exec $MYSQL_PLUGIN_CMD ENABLE daemon_example
|
||||
|
||||
#
|
||||
# Ensure enabling an enabled plugin doesn't fail
|
||||
--exec $MYSQL_PLUGIN_CMD ENABLE daemon_example
|
||||
|
||||
#
|
||||
# Restart the server
|
||||
#
|
||||
--append_file $expect_file
|
||||
restart
|
||||
EOF
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
--echo #
|
||||
--echo # Ensure the plugin is now loaded.
|
||||
--echo #
|
||||
--replace_regex /\.dll/.so/
|
||||
SELECT * FROM mysql.plugin WHERE name = 'daemon_example' ORDER BY name;
|
||||
|
||||
--echo #
|
||||
--echo # Disable the plugin...
|
||||
--echo #
|
||||
# MTR will remove this file later, but this might be too late.
|
||||
--error 0,1
|
||||
--remove_file $expect_file
|
||||
--write_file $expect_file
|
||||
wait
|
||||
EOF
|
||||
--shutdown_server 10
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
#
|
||||
# Disable the plugin
|
||||
#
|
||||
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example
|
||||
|
||||
#
|
||||
# Restart the server
|
||||
#
|
||||
--append_file $expect_file
|
||||
restart
|
||||
EOF
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
--echo #
|
||||
--echo # Ensure the plugin isn't loaded.
|
||||
--echo #
|
||||
SELECT * FROM mysql.plugin WHERE name = 'daemon_example' ORDER BY name;
|
||||
|
||||
#
|
||||
# Stop the server for error conditions
|
||||
#
|
||||
let $expect_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
|
||||
# MTR will remove this file later, but this might be too late.
|
||||
--error 0,1
|
||||
--remove_file $expect_file
|
||||
--write_file $expect_file
|
||||
wait
|
||||
EOF
|
||||
--shutdown_server 10
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
--echo #
|
||||
--echo # Attempt to load non-existant plugin
|
||||
--echo #
|
||||
--error 1,2,256
|
||||
--exec $MYSQL_PLUGIN_CMD DISABLE NOT_THERE_AT_ALL 2>&1
|
||||
|
||||
--echo #
|
||||
--echo # Attempt to use non-existant plugin.ini file
|
||||
--echo #
|
||||
--error 1,2,7,256
|
||||
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example --plugin-ini=/NOT/THERE/pi.ini 2>&1
|
||||
|
||||
--echo #
|
||||
--echo # Attempt to omit the plugin
|
||||
--echo #
|
||||
--error 1,2,256
|
||||
--exec $MYSQL_PLUGIN_CMD DISABLE 2>&1
|
||||
|
||||
--echo #
|
||||
--echo # Attempt to omit DISABLE|ENABLE
|
||||
--echo #
|
||||
--error 1,2,256
|
||||
--exec $MYSQL_PLUGIN_CMD daemon_example 2>&1
|
||||
|
||||
--echo #
|
||||
--echo # Attempt to use bad paths - datadir
|
||||
--echo #
|
||||
let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=/data_not_there/ --basedir=$MYSQL_BASEDIR --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
|
||||
--error 1,2,256
|
||||
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
|
||||
|
||||
--echo #
|
||||
--echo # Attempt to use bad paths - basedir
|
||||
--echo #
|
||||
let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=/basedir_not_there/ --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
|
||||
--error 1,2,256
|
||||
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
|
||||
|
||||
--echo #
|
||||
--echo # Attempt to use bad paths - plugin_dir
|
||||
--echo #
|
||||
let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=/plugin_not_there/ --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
|
||||
--error 1,2,256
|
||||
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
|
||||
|
||||
--echo #
|
||||
--echo # Attempt to use bad paths - mysqld
|
||||
--echo #
|
||||
let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=$PLUGIN_DIR --mysqld=/mysqld_not_there/ --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
|
||||
--error 1,2,256
|
||||
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
|
||||
|
||||
--echo #
|
||||
--echo # Attempt to use bad paths - my_print_defaults
|
||||
--echo #
|
||||
let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=/my_print_defaults_not_there/;
|
||||
--error 1,2,256
|
||||
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Missing library
|
||||
--echo #
|
||||
let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=$PLUGIN_DIR --plugin-ini=$MYSQL_TEST_DIR/include/daemon_example_bad_soname.ini --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
|
||||
--error 1,2,256
|
||||
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
|
||||
|
||||
--echo #
|
||||
--echo # Bad format for config file
|
||||
--echo #
|
||||
let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --basedir=$MYSQL_BASEDIR --plugin-dir=$PLUGIN_DIR --plugin-ini=$MYSQL_TEST_DIR/include/daemon_example_bad_format.ini --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
|
||||
--error 1,2,256
|
||||
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
|
||||
|
||||
--echo #
|
||||
--echo # Missing base_dir option
|
||||
--echo #
|
||||
let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQLD_DATADIR --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
|
||||
--error 1,2,139,256
|
||||
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
|
||||
|
||||
--echo #
|
||||
--echo # Missing data_dir option
|
||||
--echo #
|
||||
let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --basedir=$MYSQL_BASEDIR --plugin-dir=$PLUGIN_DIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
|
||||
--error 1,2,139,256
|
||||
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
|
||||
|
||||
--echo #
|
||||
--echo # Missing plugin_dir option
|
||||
--echo #
|
||||
let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQL_DATADIR --basedir=$MYSQL_BASEDIR --mysqld=$MYSQLD_BASEDIR --my-print-defaults=$MYSQL_MY_PRINT_DEFAULTS_BASEDIR;
|
||||
--error 1,2,139,256
|
||||
--exec $MYSQL_PLUGIN_CMD DISABLE daemon_example 2>&1
|
||||
|
||||
--echo #
|
||||
--echo # Show the help.
|
||||
--echo #
|
||||
replace_result $MYSQL_PLUGIN mysql_plugin;
|
||||
--replace_regex /Ver [0-9.]+ Distrib [0-9.]+/Ver V.V.VV Distrib XX.XX.XX/ /XX-m[0-9]+/XX/
|
||||
--exec $MYSQL_PLUGIN --help
|
||||
|
||||
replace_result $MYSQL_PLUGIN mysql_plugin;
|
||||
--replace_regex /Ver [0-9.]+ Distrib [0-9.]+/Ver V.V.VV Distrib XX.XX.XX/ /XX-m[0-9]+/XX/
|
||||
--exec $MYSQL_PLUGIN --version
|
||||
|
||||
#
|
||||
# Restart the server
|
||||
#
|
||||
--append_file $expect_file
|
||||
restart
|
||||
EOF
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
#
|
||||
# Cleanup
|
||||
# MTR will remove this file later, but this might be too late.
|
||||
--error 0,1
|
||||
--remove_file $expect_file
|
||||
|
||||
# Cleanup the share folder in the binary path.
|
||||
--remove_file $MYSQLD_BASEDIR/share/errmsg.sys
|
||||
--rmdir $MYSQLD_BASEDIR/share/mysql
|
||||
--rmdir $MYSQLD_BASEDIR/share
|
||||
|
||||
--enable_abort_on_error
|
@ -8376,6 +8376,33 @@ SET @@GLOBAL.init_connect= @old_init_connect;
|
||||
DROP PROCEDURE p2;
|
||||
DROP PROCEDURE p5;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#11766594 59736: SELECT DISTINCT.. INCORRECT RESULT WITH DETERMINISTIC FUNCTION IN WHERE C
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT, b INT, KEY(b));
|
||||
CREATE TABLE t2 (c INT, d INT, KEY(c));
|
||||
INSERT INTO t1 VALUES (1,1),(1,1),(1,2);
|
||||
INSERT INTO t2 VALUES (1,1),(1,2);
|
||||
|
||||
DELIMITER $;
|
||||
|
||||
CREATE FUNCTION f1() RETURNS INT DETERMINISTIC
|
||||
BEGIN
|
||||
DECLARE a int;
|
||||
-- SQL statement inside
|
||||
SELECT 1 INTO a;
|
||||
RETURN a;
|
||||
END $
|
||||
|
||||
DELIMITER ;$
|
||||
|
||||
SELECT COUNT(DISTINCT d) FROM t1, t2 WHERE a = c AND b = f1();
|
||||
|
||||
DROP FUNCTION f1;
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
|
||||
--echo # ------------------------------------------------------------------
|
||||
--echo # -- End of 5.1 tests
|
||||
--echo # ------------------------------------------------------------------
|
||||
|
@ -598,6 +598,39 @@ select distinct f1, bug13575(f1) from t3 order by f1|
|
||||
drop function bug13575|
|
||||
drop table t3|
|
||||
|
||||
#
|
||||
# BUG#11758414: Default storage_engine not honored when set
|
||||
# from within a stored procedure
|
||||
#
|
||||
SELECT @@GLOBAL.storage_engine INTO @old_engine|
|
||||
SET @@GLOBAL.storage_engine=InnoDB|
|
||||
SET @@SESSION.storage_engine=InnoDB|
|
||||
# show defaults at define-time
|
||||
SHOW GLOBAL VARIABLES LIKE 'storage_engine'|
|
||||
SHOW SESSION VARIABLES LIKE 'storage_engine'|
|
||||
CREATE PROCEDURE bug11758414()
|
||||
BEGIN
|
||||
SET @@GLOBAL.storage_engine="MyISAM";
|
||||
SET @@SESSION.storage_engine="MyISAM";
|
||||
# show defaults at execution time / that setting them worked
|
||||
SHOW GLOBAL VARIABLES LIKE 'storage_engine';
|
||||
SHOW SESSION VARIABLES LIKE 'storage_engine';
|
||||
CREATE TABLE t1 (id int);
|
||||
CREATE TABLE t2 (id int) ENGINE=InnoDB;
|
||||
# show we're heeding the default (at run-time, not parse-time!)
|
||||
SHOW CREATE TABLE t1;
|
||||
# show that we didn't break explicit override with ENGINE=...
|
||||
SHOW CREATE TABLE t2;
|
||||
END;
|
||||
|
|
||||
CALL bug11758414|
|
||||
# show that changing defaults within SP stuck
|
||||
SHOW GLOBAL VARIABLES LIKE 'storage_engine'|
|
||||
SHOW SESSION VARIABLES LIKE 'storage_engine'|
|
||||
DROP PROCEDURE bug11758414|
|
||||
DROP TABLE t1, t2|
|
||||
SET @@GLOBAL.storage_engine=@old_engine|
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.1 tests
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user