diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-10-11 12:55:42 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-10-11 12:55:42 +0200 |
commit | ae6330080102f31edd6cd3b49028f0f3e39be769 (patch) | |
tree | b277d27fcc4f0471c86fd0b756f120718b8d759a /mysql-test | |
parent | 8feff690b6d1f09acb6a68315669e75924da5f80 (diff) | |
parent | 3e8731dee04ec5f47557e0a0f55aa5f6f8d1f698 (diff) | |
download | mariadb-git-ae6330080102f31edd6cd3b49028f0f3e39be769.tar.gz |
merge
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/include/default_mysqld.cnf | 2 | ||||
-rw-r--r-- | mysql-test/r/feedback_plugin_install.result | 13 | ||||
-rw-r--r-- | mysql-test/r/feedback_plugin_load.result | 11 | ||||
-rw-r--r-- | mysql-test/r/feedback_plugin_send.result | 15 | ||||
-rw-r--r-- | mysql-test/r/trigger.result | 19 | ||||
-rw-r--r-- | mysql-test/t/feedback_plugin_install.opt | 1 | ||||
-rw-r--r-- | mysql-test/t/feedback_plugin_install.test | 15 | ||||
-rw-r--r-- | mysql-test/t/feedback_plugin_load.opt | 2 | ||||
-rw-r--r-- | mysql-test/t/feedback_plugin_load.test | 10 | ||||
-rw-r--r-- | mysql-test/t/feedback_plugin_send.test | 24 | ||||
-rw-r--r-- | mysql-test/t/fulltext_plugin.test | 3 | ||||
-rw-r--r-- | mysql-test/t/trigger.test | 25 |
12 files changed, 139 insertions, 1 deletions
diff --git a/mysql-test/include/default_mysqld.cnf b/mysql-test/include/default_mysqld.cnf index e46c3bc3c17..a1b477c51dd 100644 --- a/mysql-test/include/default_mysqld.cnf +++ b/mysql-test/include/default_mysqld.cnf @@ -15,6 +15,8 @@ max_heap_table_size= 1M loose-skip-innodb loose-skip-pbxt +loose-skip-feedback +loose-feedback-user-info= mysql-test loose-innodb_data_file_path= ibdata1:10M:autoextend diff --git a/mysql-test/r/feedback_plugin_install.result b/mysql-test/r/feedback_plugin_install.result new file mode 100644 index 00000000000..4b3b0226fae --- /dev/null +++ b/mysql-test/r/feedback_plugin_install.result @@ -0,0 +1,13 @@ +install plugin feedback soname 'feedback.so'; +select plugin_status from information_schema.plugins where plugin_name='feedback'; +plugin_status +ACTIVE +select * from information_schema.feedback where variable_name like 'feed%' + and variable_name not like '%_uid'; +VARIABLE_NAME VARIABLE_VALUE +FEEDBACK 1.0 +FEEDBACK_SEND_RETRY_WAIT 60 +FEEDBACK_SEND_TIMEOUT 60 +FEEDBACK_URL http://mariadb.org/feedback_plugin/post +FEEDBACK_USER_INFO mysql-test +uninstall plugin feedback; diff --git a/mysql-test/r/feedback_plugin_load.result b/mysql-test/r/feedback_plugin_load.result new file mode 100644 index 00000000000..bc02b920a11 --- /dev/null +++ b/mysql-test/r/feedback_plugin_load.result @@ -0,0 +1,11 @@ +select plugin_status from information_schema.plugins where plugin_name='feedback'; +plugin_status +ACTIVE +select * from information_schema.feedback where variable_name like 'feed%' + and variable_name not like '%_uid'; +VARIABLE_NAME VARIABLE_VALUE +FEEDBACK 1.0 +FEEDBACK_SEND_RETRY_WAIT 60 +FEEDBACK_SEND_TIMEOUT 60 +FEEDBACK_URL http://mariadb.org/feedback_plugin/post +FEEDBACK_USER_INFO mysql-test diff --git a/mysql-test/r/feedback_plugin_send.result b/mysql-test/r/feedback_plugin_send.result new file mode 100644 index 00000000000..22379e26248 --- /dev/null +++ b/mysql-test/r/feedback_plugin_send.result @@ -0,0 +1,15 @@ +select plugin_status from information_schema.plugins where plugin_name='feedback'; +plugin_status +ACTIVE +select * from information_schema.feedback where variable_name like 'feed%' + and variable_name not like '%_uid'; +VARIABLE_NAME VARIABLE_VALUE +FEEDBACK 1.0 +FEEDBACK_SEND_RETRY_WAIT 60 +FEEDBACK_SEND_TIMEOUT 60 +FEEDBACK_URL http://mariadb.org/feedback_plugin/post +FEEDBACK_USER_INFO mysql-test +feedback plugin: report to 'http://mariadb.org/feedback_plugin/post' was sent +feedback plugin: server replied 'ok' +feedback plugin: report to 'http://mariadb.org/feedback_plugin/post' was sent +feedback plugin: server replied 'ok' diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result index 089845560ed..efe63285c9c 100644 --- a/mysql-test/r/trigger.result +++ b/mysql-test/r/trigger.result @@ -2117,3 +2117,22 @@ b DROP DATABASE db1; USE test; End of 5.1 tests. +create table t1 (i int); +create table t2 (i int); +flush tables; +flush status; +CREATE DEFINER=`root`@`localhost` TRIGGER trg AFTER DELETE ON t1 FOR EACH ROW BEGIN DELETE FROM t2 WHERE t2.i = OLD.i; END // +insert into t1 values (1),(2); +insert into t2 values (1),(2); +delete from t1 where i=1; +show status like 'Opened_tables'; +Variable_name Value +Opened_tables 3 +select * from t1; +i +2 +select * from t2; +i +2 +drop table t1,t2; +End of 5.2 tests. diff --git a/mysql-test/t/feedback_plugin_install.opt b/mysql-test/t/feedback_plugin_install.opt new file mode 100644 index 00000000000..a711ae94e69 --- /dev/null +++ b/mysql-test/t/feedback_plugin_install.opt @@ -0,0 +1 @@ +--loose-feedback diff --git a/mysql-test/t/feedback_plugin_install.test b/mysql-test/t/feedback_plugin_install.test new file mode 100644 index 00000000000..81343c436c3 --- /dev/null +++ b/mysql-test/t/feedback_plugin_install.test @@ -0,0 +1,15 @@ +--source include/not_embedded.inc + +if (`select length('$FEEDBACK_SO') = 0`) { + skip No feedback plugin; +} + +--replace_regex /\.dll/.so/ +eval install plugin feedback soname '$FEEDBACK_SO'; +select plugin_status from information_schema.plugins where plugin_name='feedback'; +--replace_result https http +--sorted_result +select * from information_schema.feedback where variable_name like 'feed%' + and variable_name not like '%_uid'; +uninstall plugin feedback; + diff --git a/mysql-test/t/feedback_plugin_load.opt b/mysql-test/t/feedback_plugin_load.opt new file mode 100644 index 00000000000..5fbb2f83954 --- /dev/null +++ b/mysql-test/t/feedback_plugin_load.opt @@ -0,0 +1,2 @@ +--loose-feedback +--plugin-load=$FEEDBACK_SO diff --git a/mysql-test/t/feedback_plugin_load.test b/mysql-test/t/feedback_plugin_load.test new file mode 100644 index 00000000000..5ad301667b4 --- /dev/null +++ b/mysql-test/t/feedback_plugin_load.test @@ -0,0 +1,10 @@ +if (`select count(*) = 0 from information_schema.plugins where plugin_name = 'feedback' and plugin_status='active'`) +{ + --skip Feedback plugin is not active +} + +select plugin_status from information_schema.plugins where plugin_name='feedback'; +--replace_result https http +--sorted_result +select * from information_schema.feedback where variable_name like 'feed%' + and variable_name not like '%_uid'; diff --git a/mysql-test/t/feedback_plugin_send.test b/mysql-test/t/feedback_plugin_send.test new file mode 100644 index 00000000000..b49c0d0e252 --- /dev/null +++ b/mysql-test/t/feedback_plugin_send.test @@ -0,0 +1,24 @@ +source t/feedback_plugin_load.test; +source include/big_test.inc; + +if (!$MTR_FEEDBACK_PLUGIN) { + skip MTR_FEEDBACK_PLUGIN is not set; +} + +# +# Yep. The plugin waits 5 minutes before sending anything, +# and there's no way to force it to send anything sooner. +# Let's wait, and hope that mtr is started with --parallel and +# is doing some work in other workers. +# +sleep 310; +source include/restart_mysqld.inc; + +replace_result https http; +perl; + $log_error= $ENV{'MYSQLTEST_VARDIR'} . '/log/mysqld.1.err'; + open(LOG, '<', $log_error) or die "open(< $log_error): $!"; + /feedback plugin:.*/ && print "$&\n" while $_=<LOG>; + close LOG; +EOF + diff --git a/mysql-test/t/fulltext_plugin.test b/mysql-test/t/fulltext_plugin.test index 31978dadc51..0e2f53d5b15 100644 --- a/mysql-test/t/fulltext_plugin.test +++ b/mysql-test/t/fulltext_plugin.test @@ -3,7 +3,8 @@ # # BUG#39746 - Debug flag breaks struct definition (server crash) # -INSTALL PLUGIN simple_parser SONAME 'mypluglib.so'; +--replace_result .dll .so +eval INSTALL PLUGIN simple_parser SONAME '$MYPLUGLIB_SO'; CREATE TABLE t1(a TEXT, b TEXT, FULLTEXT(a) WITH PARSER simple_parser); ALTER TABLE t1 ADD FULLTEXT(b) WITH PARSER simple_parser; DROP TABLE t1; diff --git a/mysql-test/t/trigger.test b/mysql-test/t/trigger.test index a968e146d20..8d84330ec44 100644 --- a/mysql-test/t/trigger.test +++ b/mysql-test/t/trigger.test @@ -2409,3 +2409,28 @@ DROP DATABASE db1; USE test; --echo End of 5.1 tests. + +# +# Test that using a trigger will not open mysql.proc +# + +create table t1 (i int); +create table t2 (i int); +flush tables; +flush status; +delimiter //; +CREATE DEFINER=`root`@`localhost` TRIGGER trg AFTER DELETE ON t1 FOR EACH ROW BEGIN DELETE FROM t2 WHERE t2.i = OLD.i; END // +delimiter ;// +insert into t1 values (1),(2); +insert into t2 values (1),(2); +delete from t1 where i=1; +# +# If mysql.proc would be used we would have 4 here. 3 is the correct number. +# (CREATE TRIGGER will open t1 and then flush it) +# +show status like 'Opened_tables'; +select * from t1; +select * from t2; +drop table t1,t2; + +--echo End of 5.2 tests. |