summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <antony@ppcg5.local>2007-03-02 08:43:45 -0800
committerunknown <antony@ppcg5.local>2007-03-02 08:43:45 -0800
commit1fc7f2117bddfcf91e1220f22714beb86d26c544 (patch)
tree23fe49e9ab83f6badb4e173587f9e194490a3859 /mysql-test
parent1eb71c68cb1b2f335a8e6b393cdb3e724ea65a0a (diff)
downloadmariadb-git-1fc7f2117bddfcf91e1220f22714beb86d26c544.tar.gz
WL#2936
"Server Variables for Plugins" Implement support for plugins to declare server variables. Demonstrate functionality by removing InnoDB specific code from sql/* New feature for HASH - HASH_UNIQUE flag New feature for DYNAMIC_ARRAY - initializer accepts preallocated ptr. Completed support for plugin reference counting. include/hash.h: New flag for HASH HASH_UNIQUE include/my_getopt.h: New data types for options: ENUM and SET. Use typelib to enumerate possible values. New flag variable: my_getopt_skip_unknown include/my_sys.h: change to DYNAMIC_ARRAY init functions to support pre-allocated buffers include/mysql.h: relocate inclusion of typelib due to longlong requirement include/mysql/plugin.h: wl2936 New declarations for plugin server variable support. New functions for use by plugins include/mysys_err.h: new my_getopt return value: EXIT_ARGUMENT_INVALID include/typelib.h: new typelib function: find_typeset(), returns an int which is a SET of the elements in the typelib mysql-test/r/im_utils.result: change to more specific command line settings --skip-innodb => --skip-plugin-innodb etc. mysql-test/r/log_tables.result: set default storage engine to MEMORY so that test will succeed even when some of the other named storage engines are not present mysql-test/r/ndb_dd_basic.result: change in error message mysql-test/r/partition_innodb.result: change in results mysql-test/r/ps_1general.result: bdb doesn't exist, use myisam for a non-transactional engine mysql-test/r/variables.result: information schema doesn't sort row results for server variables. mysql-test/t/log_tables.test: set default storage engine to MEMORY so that test will succeed even when some of the other named storage engines are not present mysql-test/t/ndb_dd_basic.test: ALTER LOGFILE GROUP no longer silently fail here mysql-test/t/partition_innodb.test: ALTER TABLE no longer silently fails for unknown storage engine mysql-test/t/ps_1general.test: remove unneccessary parts use myisam as it is an always present non-transactional engine mysql-test/t/variables.test: information schema doesn't sort row results for server variables. mysql-test/t/warnings_engine_disabled-master.opt: use the new style command line option mysys/array.c: change to DYNAMIC_ARRAY init functions to support pre-allocated buffers mysys/hash.c: New flag for HASH HASH_UNIQUE Implement HASH_UNIQUE functionality by performing a hash_search mysys/my_getopt.c: New data types for options: ENUM and SET. Use typelib to enumerate possible values. New flag variable: my_getopt_skip_unknown mysys/typelib.c: new typelib function: find_typeset(), returns an int which is a SET of the elements in the typelib sql/ha_ndbcluster.cc: use ha_statistic_increment() method instead of statistic_increment() function ha_ndbcluster variable has gone away. sql/ha_partition.cc: fix for reference counting sql/ha_partition.h: fix for reference counting sql/handler.cc: fixes for reference counting sql/handler.h: fixes for reference counting some new methods to aid storage engine writers sql/item_func.cc: find_sys_var() function now requires thd sql/item_sum.cc: fixes for ref counting sql/mysql_priv.h: remove unneccessary globals. new lock: LOCK_system_variables_hash sql/mysqld.cc: Remove InnoBase specific code. Support plugin command line processing. sql/set_var.cc: Remove InnoBase specific declarations Remove redundant declarations changes to permit new variables at run time changes for ref counting sql/set_var.h: changes to permit new variables at run time changes for ref counting sql/sql_base.cc: changes for ref counting sql/sql_cache.cc: mark code as needing work in the future sql/sql_class.cc: new functions to aid plugin authors initialize variables for dynamic plugin variables sql/sql_class.h: remove InnoBase specific declarations New declarations for plugin variables. sql/sql_connect.cc: initialization and cleanup of plugin variables sql/sql_delete.cc: change for ref counting sql/sql_insert.cc: change for ref counting sql/sql_lex.cc: changes for ref counting and plugin variables sql/sql_lex.h: add properties for plugin ref counting, add to distructor to clean up sql/sql_partition.cc: changes for ref counting sql/sql_plugin.cc: WL2936 Plugin Variables New methods and code to support server variables for plugins. New code to complete plugin reference counting Debug code adds further indirection so that malloc debugging can be used to aid finding plugin ref count leaks sql/sql_plugin.h: WL2936 Plugin Variables New methods and code to support server variables for plugins. New code to complete plugin reference counting Debug code adds further indirection so that malloc debugging can be used to aid finding plugin ref count leaks sql/sql_repl.cc: replication system variables moved here from set_var.cc sql/sql_repl.h: new function to initialise replication server variables sql/sql_select.cc: changes for ref counting sql/sql_show.cc: changes for ref counting sql/sql_table.cc: changes for ref counting sql/sql_tablespace.cc: use supplied functions instead of digging into data structures manually sql/sql_yacc.yy: changes for ref counting find_sys_var() now requires thd parameter changes on reporting errors to keep user-visible behaviour the same. sql/structs.h: changes for ref counting sql/table.cc: changes for ref counting sql/table.h: changes for ref counting storage/federated/ha_federated.cc: use ha_statistic_increment() method instead of statistic_increment() function storage/heap/ha_heap.cc: use ha_statistic_increment() method instead of statistic_increment() function storage/innobase/handler/ha_innodb.cc: use ha_statistic_increment() method instead of statistic_increment() function WL2936 Move InnoBase specific code out of mysqld.cc and into here Declare all required server variables for InnoBase storage/innobase/include/trx0trx.h: store a bit more state so that InnoBase does not have to dig into mysqld internal data structures. storage/myisam/ha_myisam.cc: use ha_statistic_increment() method instead of statistic_increment() function storage/myisammrg/ha_myisammrg.cc: use ha_statistic_increment() method instead of statistic_increment() function
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/im_utils.result8
-rw-r--r--mysql-test/r/log_tables.result3
-rw-r--r--mysql-test/r/ndb_dd_basic.result4
-rw-r--r--mysql-test/r/partition_innodb.result5
-rw-r--r--mysql-test/r/ps_1general.result3
-rw-r--r--mysql-test/r/variables.result16
-rw-r--r--mysql-test/t/log_tables.test3
-rw-r--r--mysql-test/t/ndb_dd_basic.test1
-rw-r--r--mysql-test/t/partition_innodb.test1
-rw-r--r--mysql-test/t/ps_1general.test8
-rw-r--r--mysql-test/t/variables.test16
-rw-r--r--mysql-test/t/warnings_engine_disabled-master.opt2
12 files changed, 35 insertions, 35 deletions
diff --git a/mysql-test/r/im_utils.result b/mysql-test/r/im_utils.result
index b7c68965ada..b2885030637 100644
--- a/mysql-test/r/im_utils.result
+++ b/mysql-test/r/im_utils.result
@@ -20,8 +20,8 @@ character-sets-dir VALUE
basedir VALUE
server_id VALUE
skip-stack-trace VALUE
-skip-innodb VALUE
-skip-ndbcluster VALUE
+skip-plugin-innodb VALUE
+skip-plugin-ndbcluster VALUE
log-output VALUE
SHOW INSTANCE OPTIONS mysqld2;
option_name value
@@ -38,8 +38,8 @@ character-sets-dir VALUE
basedir VALUE
server_id VALUE
skip-stack-trace VALUE
-skip-innodb VALUE
-skip-ndbcluster VALUE
+skip-plugin-innodb VALUE
+skip-plugin-ndbcluster VALUE
nonguarded VALUE
log-output VALUE
START INSTANCE mysqld2;
diff --git a/mysql-test/r/log_tables.result b/mysql-test/r/log_tables.result
index 8264f252287..5a90c22fa06 100644
--- a/mysql-test/r/log_tables.result
+++ b/mysql-test/r/log_tables.result
@@ -169,6 +169,8 @@ lock tables mysql.slow_log READ LOCAL, mysql.general_log READ LOCAL;
unlock tables;
set global general_log='OFF';
set global slow_query_log='OFF';
+set @save_storage_engine= @@session.storage_engine;
+set storage_engine= MEMORY;
alter table mysql.slow_log engine=ndb;
ERROR HY000: This storage engine cannot be used for log tables"
alter table mysql.slow_log engine=innodb;
@@ -177,6 +179,7 @@ alter table mysql.slow_log engine=archive;
ERROR HY000: This storage engine cannot be used for log tables"
alter table mysql.slow_log engine=blackhole;
ERROR HY000: This storage engine cannot be used for log tables"
+set storage_engine= @save_storage_engine;
drop table mysql.slow_log;
drop table mysql.general_log;
drop table mysql.general_log;
diff --git a/mysql-test/r/ndb_dd_basic.result b/mysql-test/r/ndb_dd_basic.result
index 724b42b6db3..91bd111bbdf 100644
--- a/mysql-test/r/ndb_dd_basic.result
+++ b/mysql-test/r/ndb_dd_basic.result
@@ -10,9 +10,7 @@ ALTER LOGFILE GROUP lg1
ADD UNDOFILE 'undofile02.dat'
INITIAL_SIZE = 4M
ENGINE=XYZ;
-Warnings:
-Error 1286 Unknown table engine 'XYZ'
-Error 1466 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
+ERROR 42000: Unknown table engine 'XYZ'
CREATE TABLESPACE ts1
ADD DATAFILE 'datafile.dat'
USE LOGFILE GROUP lg1
diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result
index 8619d0909ee..799f1b2c76f 100644
--- a/mysql-test/r/partition_innodb.result
+++ b/mysql-test/r/partition_innodb.result
@@ -54,7 +54,7 @@ create table t1 (a int)
engine = x
partition by key (a);
Warnings:
-Error 1286 Unknown table engine 'x'
+Warning 1266 Using storage engine MyISAM for table 't1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -66,8 +66,7 @@ engine = innodb
partition by list (a)
(partition p0 values in (0));
alter table t1 engine = x;
-Warnings:
-Error 1286 Unknown table engine 'x'
+ERROR 42000: Unknown table engine 'x'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/r/ps_1general.result b/mysql-test/r/ps_1general.result
index 762ceeaa03b..26692a992fe 100644
--- a/mysql-test/r/ps_1general.result
+++ b/mysql-test/r/ps_1general.result
@@ -303,8 +303,9 @@ prepare stmt4 from ' show variables like ''sql_mode'' ';
execute stmt4;
Variable_name Value
sql_mode
-prepare stmt4 from ' show engine bdb logs ';
+prepare stmt4 from ' show engine myisam logs ';
execute stmt4;
+Type Name Status
prepare stmt4 from ' show grants for user ';
prepare stmt4 from ' show create table t2 ';
prepare stmt4 from ' show master status ';
diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result
index ec4c7c9b2aa..dc5874436e4 100644
--- a/mysql-test/r/variables.result
+++ b/mysql-test/r/variables.result
@@ -236,7 +236,7 @@ net_buffer_length 1024
net_read_timeout 300
net_retry_count 10
net_write_timeout 200
-select * from information_schema.global_variables where variable_name like 'net_%';
+select * from information_schema.global_variables where variable_name like 'net_%' order by 1;
VARIABLE_NAME VARIABLE_VALUE
NET_BUFFER_LENGTH 1024
NET_READ_TIMEOUT 300
@@ -248,7 +248,7 @@ net_buffer_length 2048
net_read_timeout 600
net_retry_count 10
net_write_timeout 500
-select * from information_schema.session_variables where variable_name like 'net_%';
+select * from information_schema.session_variables where variable_name like 'net_%' order by 1;
VARIABLE_NAME VARIABLE_VALUE
NET_BUFFER_LENGTH 2048
NET_READ_TIMEOUT 600
@@ -261,7 +261,7 @@ net_buffer_length 1024
net_read_timeout 900
net_retry_count 10
net_write_timeout 1000
-select * from information_schema.global_variables where variable_name like 'net_%';
+select * from information_schema.global_variables where variable_name like 'net_%' order by 1;
VARIABLE_NAME VARIABLE_VALUE
NET_BUFFER_LENGTH 1024
NET_READ_TIMEOUT 900
@@ -273,7 +273,7 @@ net_buffer_length 7168
net_read_timeout 600
net_retry_count 10
net_write_timeout 500
-select * from information_schema.session_variables where variable_name like 'net_%';
+select * from information_schema.session_variables where variable_name like 'net_%' order by 1;
VARIABLE_NAME VARIABLE_VALUE
NET_BUFFER_LENGTH 7168
NET_READ_TIMEOUT 600
@@ -314,7 +314,7 @@ query_prealloc_size 8192
range_alloc_block_size 2048
transaction_alloc_block_size 8192
transaction_prealloc_size 4096
-select * from information_schema.session_variables where variable_name like '%alloc%';
+select * from information_schema.session_variables where variable_name like '%alloc%' order by 1;
VARIABLE_NAME VARIABLE_VALUE
QUERY_ALLOC_BLOCK_SIZE 8192
QUERY_PREALLOC_SIZE 8192
@@ -336,7 +336,7 @@ query_prealloc_size 18432
range_alloc_block_size 16384
transaction_alloc_block_size 19456
transaction_prealloc_size 20480
-select * from information_schema.session_variables where variable_name like '%alloc%';
+select * from information_schema.session_variables where variable_name like '%alloc%' order by 1;
VARIABLE_NAME VARIABLE_VALUE
QUERY_ALLOC_BLOCK_SIZE 17408
QUERY_PREALLOC_SIZE 18432
@@ -353,7 +353,7 @@ query_prealloc_size 8192
range_alloc_block_size 2048
transaction_alloc_block_size 8192
transaction_prealloc_size 4096
-select * from information_schema.session_variables where variable_name like '%alloc%';
+select * from information_schema.session_variables where variable_name like '%alloc%' order by 1;
VARIABLE_NAME VARIABLE_VALUE
QUERY_ALLOC_BLOCK_SIZE 8192
QUERY_PREALLOC_SIZE 8192
@@ -881,7 +881,7 @@ ssl_capath #
ssl_cert #
ssl_cipher #
ssl_key #
-select * from information_schema.session_variables where variable_name like 'ssl%';
+select * from information_schema.session_variables where variable_name like 'ssl%' order by 1;
VARIABLE_NAME VARIABLE_VALUE
SSL_CA #
SSL_CAPATH #
diff --git a/mysql-test/t/log_tables.test b/mysql-test/t/log_tables.test
index f1ff91a6d1d..b02a47dde6b 100644
--- a/mysql-test/t/log_tables.test
+++ b/mysql-test/t/log_tables.test
@@ -252,6 +252,8 @@ set global general_log='OFF';
set global slow_query_log='OFF';
# check that alter table doesn't work for other engines
+set @save_storage_engine= @@session.storage_engine;
+set storage_engine= MEMORY;
--error ER_UNSUPORTED_LOG_ENGINE
alter table mysql.slow_log engine=ndb;
--error ER_UNSUPORTED_LOG_ENGINE
@@ -260,6 +262,7 @@ alter table mysql.slow_log engine=innodb;
alter table mysql.slow_log engine=archive;
--error ER_UNSUPORTED_LOG_ENGINE
alter table mysql.slow_log engine=blackhole;
+set storage_engine= @save_storage_engine;
drop table mysql.slow_log;
drop table mysql.general_log;
diff --git a/mysql-test/t/ndb_dd_basic.test b/mysql-test/t/ndb_dd_basic.test
index 5d43d7997b0..551c3c089ae 100644
--- a/mysql-test/t/ndb_dd_basic.test
+++ b/mysql-test/t/ndb_dd_basic.test
@@ -21,6 +21,7 @@ INITIAL_SIZE 16M
UNDO_BUFFER_SIZE = 1M
ENGINE=MYISAM;
+--error ER_UNKNOWN_STORAGE_ENGINE
ALTER LOGFILE GROUP lg1
ADD UNDOFILE 'undofile02.dat'
INITIAL_SIZE = 4M
diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test
index 782e204742f..9f8792c924f 100644
--- a/mysql-test/t/partition_innodb.test
+++ b/mysql-test/t/partition_innodb.test
@@ -71,6 +71,7 @@ engine = innodb
partition by list (a)
(partition p0 values in (0));
+--error ER_UNKNOWN_STORAGE_ENGINE
alter table t1 engine = x;
show create table t1;
drop table t1;
diff --git a/mysql-test/t/ps_1general.test b/mysql-test/t/ps_1general.test
index a9d4488b1be..2d5dd14e847 100644
--- a/mysql-test/t/ps_1general.test
+++ b/mysql-test/t/ps_1general.test
@@ -321,14 +321,8 @@ prepare stmt4 from ' show status like ''Threads_running'' ';
execute stmt4;
prepare stmt4 from ' show variables like ''sql_mode'' ';
execute stmt4;
-# The output depends on the bdb being enabled and on the history
-# history (actions of the bdb engine).
-# That is the reason why, we switch the output here off.
-# (The real output will be tested in ps_6bdb.test)
---disable_result_log
-prepare stmt4 from ' show engine bdb logs ';
+prepare stmt4 from ' show engine myisam logs ';
execute stmt4;
---enable_result_log
prepare stmt4 from ' show grants for user ';
prepare stmt4 from ' show create table t2 ';
prepare stmt4 from ' show master status ';
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test
index 4f91b75ced1..cde0d0f7374 100644
--- a/mysql-test/t/variables.test
+++ b/mysql-test/t/variables.test
@@ -151,14 +151,14 @@ set global net_retry_count=10, session net_retry_count=10;
set global net_buffer_length=1024, net_write_timeout=200, net_read_timeout=300;
set session net_buffer_length=2048, net_write_timeout=500, net_read_timeout=600;
show global variables like 'net_%';
-select * from information_schema.global_variables where variable_name like 'net_%';
+select * from information_schema.global_variables where variable_name like 'net_%' order by 1;
show session variables like 'net_%';
-select * from information_schema.session_variables where variable_name like 'net_%';
+select * from information_schema.session_variables where variable_name like 'net_%' order by 1;
set session net_buffer_length=8000, global net_read_timeout=900, net_write_timeout=1000;
show global variables like 'net_%';
-select * from information_schema.global_variables where variable_name like 'net_%';
+select * from information_schema.global_variables where variable_name like 'net_%' order by 1;
show session variables like 'net_%';
-select * from information_schema.session_variables where variable_name like 'net_%';
+select * from information_schema.session_variables where variable_name like 'net_%' order by 1;
set net_buffer_length=1;
show variables like 'net_buffer_length';
select * from information_schema.session_variables where variable_name like 'net_buffer_length';
@@ -175,7 +175,7 @@ set @@rand_seed1=10000000,@@rand_seed2=1000000;
select ROUND(RAND(),5);
show variables like '%alloc%';
-select * from information_schema.session_variables where variable_name like '%alloc%';
+select * from information_schema.session_variables where variable_name like '%alloc%' order by 1;
set @@range_alloc_block_size=1024*16;
set @@query_alloc_block_size=1024*17+2;
set @@query_prealloc_size=1024*18;
@@ -183,12 +183,12 @@ set @@transaction_alloc_block_size=1024*20-1;
set @@transaction_prealloc_size=1024*21-1;
select @@query_alloc_block_size;
show variables like '%alloc%';
-select * from information_schema.session_variables where variable_name like '%alloc%';
+select * from information_schema.session_variables where variable_name like '%alloc%' order by 1;
set @@range_alloc_block_size=default;
set @@query_alloc_block_size=default, @@query_prealloc_size=default;
set transaction_alloc_block_size=default, @@transaction_prealloc_size=default;
show variables like '%alloc%';
-select * from information_schema.session_variables where variable_name like '%alloc%';
+select * from information_schema.session_variables where variable_name like '%alloc%' order by 1;
#
# Bug #10904 Illegal mix of collations between
@@ -669,7 +669,7 @@ select @@ssl_ca, @@ssl_capath, @@ssl_cert, @@ssl_cipher, @@ssl_key;
--replace_column 2 #
show variables like 'ssl%';
--replace_column 2 #
-select * from information_schema.session_variables where variable_name like 'ssl%';
+select * from information_schema.session_variables where variable_name like 'ssl%' order by 1;
#
# Bug #19616: make log_queries_not_using_indexes available in SHOW VARIABLES
diff --git a/mysql-test/t/warnings_engine_disabled-master.opt b/mysql-test/t/warnings_engine_disabled-master.opt
index 99837e4a4cb..f51c1789a16 100644
--- a/mysql-test/t/warnings_engine_disabled-master.opt
+++ b/mysql-test/t/warnings_engine_disabled-master.opt
@@ -1 +1 @@
---loose-skip-ndb
+--loose-skip-plugin-ndbcluster