diff options
author | Michael Widenius <monty@askmonty.org> | 2012-09-09 01:22:06 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2012-09-09 01:22:06 +0300 |
commit | 3a793b9d4d53867263eefd60010af2a124f485d1 (patch) | |
tree | c8c1d89279a3c6c743020dbcab4adb155fc76122 /mysql-test/t/features.test | |
parent | 5161b3ddde41617cc623e54980f6f28f38e650a7 (diff) | |
download | mariadb-git-3a793b9d4d53867263eefd60010af2a124f485d1.tar.gz |
Added new status variables:
feature_dynamic_columns,feature_fulltext,feature_gis,feature_locale,feature_subquery,feature_timezone,feature_trigger,feature_xml
Opened_views, Executed_triggers, Executed_events
Added new process status 'updating status' as part of 'freeing items'
mysql-test/r/features.result:
Test of feature_xxx status variables
mysql-test/r/mysqld--help.result:
Removed duplicated 'language' variable.
mysql-test/r/view.result:
Test of opened_views
mysql-test/suite/rpl/t/rpl_start_stop_slave.test:
Write more information on failure
mysql-test/t/features.test:
Test of feature_xxx status variables
mysql-test/t/view.test:
Test of opened_views
sql/event_scheduler.cc:
Increment executed_events status variable
sql/field.cc:
Increment status variable
sql/item_func.cc:
Increment status variable
sql/item_strfunc.cc:
Increment status variable
sql/item_subselect.cc:
Increment status variable
sql/item_xmlfunc.cc:
Increment status variable
sql/mysqld.cc:
Add new status variables to 'show status'
sql/mysqld.h:
Added executed_events
sql/sql_base.cc:
Increment status variable
sql/sql_class.h:
Add new status variables
sql/sql_parse.cc:
Added new process status 'updating status' as part of 'freeing items'
sql/sql_trigger.cc:
Increment status variable
sql/sys_vars.cc:
Increment status variable
sql/tztime.cc:
Increment status variable
Diffstat (limited to 'mysql-test/t/features.test')
-rw-r--r-- | mysql-test/t/features.test | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/mysql-test/t/features.test b/mysql-test/t/features.test new file mode 100644 index 00000000000..a54b09a3fd3 --- /dev/null +++ b/mysql-test/t/features.test @@ -0,0 +1,107 @@ +# Testing of feature statistics + +-- source include/have_geometry.inc + +--disable_warnings +drop table if exists t1; +--enable_warnings + +show status like "feature%"; + +--echo # +--echo # Feature GIS +--echo # + +CREATE TABLE t1 (g POINT); +SHOW FIELDS FROM t1; +INSERT INTO t1 VALUES + (PointFromText('POINT(10 10)')), + (PointFromText('POINT(20 10)')), + (PointFromText('POINT(20 20)')), + (PointFromWKB(AsWKB(PointFromText('POINT(10 20)')))); +drop table t1; + +show status like "feature_gis"; + +--echo # +--echo # Feature dynamic columns +--echo # +set @a= COLUMN_CREATE(1, 1212 AS int); +set @b= column_add(@a, 2, 1212 as integer); +select column_get(@b, 2 as integer); + +show status like "feature_dynamic_columns"; + +--echo # +--echo # Feature fulltext +--echo # + +CREATE TABLE t1 (a VARCHAR(200), b TEXT, FULLTEXT (a,b)) engine=myisam; +INSERT INTO t1 VALUES('MySQL has now support', 'for full-text search'), + ('Full-text indexes', 'are called collections'), + ('Only MyISAM tables','support collections'), + ('Function MATCH ... AGAINST()','is used to do a search'), + ('Full-text search in MySQL', 'implements vector space model'); +select * from t1 where MATCH(a,b) AGAINST ("collections"); +select * from t1 where MATCH(a,b) AGAINST ("indexes"); +drop table t1; + +show status like "feature_fulltext"; + + +--echo # +--echo # Feature locale +--echo # + +SET lc_messages=sr_RS; +SET lc_messages=en_US; +show status like "feature_locale"; + +--echo # +--echo # Feature subquery +--echo # + +select (select 2); +SELECT (SELECT 1) UNION SELECT (SELECT 2); + +create table t1 (a int); +insert into t1 values (2); +select (select a from t1 where t1.a=t2.a), a from t1 as t2; +drop table t1; +show status like "feature_subquery"; + +--echo # +--echo # Feature timezone +--echo # + +SELECT FROM_UNIXTIME(unix_timestamp()) > "1970-01-01"; +set time_zone="+03:00"; +SELECT FROM_UNIXTIME(unix_timestamp()) > "1970-01-01"; +set time_zone= @@global.time_zone; +show status like "feature_timezone"; + +--echo # +--echo # Feature triggers +--echo # + +create table t1 (i int); +--echo # let us test some very simple trigger +create trigger trg before insert on t1 for each row set @a:=1; +set @a:=0; +select @a; +insert into t1 values (1),(2); +select @a; +SHOW TRIGGERS IN test like 't1'; +drop trigger trg; +drop table t1; + +show status like "%trigger%"; + +--echo # +--echo # Feature xml +--echo # +SET @xml='<a aa1="aa1" aa2="aa2">a1<b ba1="ba1">b1<c>c1</c>b2</b>a2</a>'; +SELECT extractValue(@xml,'/a'); +select updatexml('<div><div><span>1</span><span>2</span></div></div>', + '/','<tr><td>1</td><td>2</td></tr>') as upd1; +show status like "feature_xml"; |