summaryrefslogtreecommitdiff
path: root/mysql-test/r/plugin.result
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-04-09 23:27:24 +0200
committerSergei Golubchik <sergii@pisem.net>2013-04-09 23:27:24 +0200
commit5f293dd694f9b1b4a0bdf73bb6ae80cda70f21d4 (patch)
tree24dde5c436f3c2687619de02e4ab5f4f957ff789 /mysql-test/r/plugin.result
parent7d3288129f6e5b52c7377ff68295f51606c7f002 (diff)
downloadmariadb-git-5f293dd694f9b1b4a0bdf73bb6ae80cda70f21d4.tar.gz
MDEV-4022 table attributes with sysvar as a default value
Diffstat (limited to 'mysql-test/r/plugin.result')
-rw-r--r--mysql-test/r/plugin.result36
1 files changed, 29 insertions, 7 deletions
diff --git a/mysql-test/r/plugin.result b/mysql-test/r/plugin.result
index ac2ba843131..06e343a0886 100644
--- a/mysql-test/r/plugin.result
+++ b/mysql-test/r/plugin.result
@@ -49,6 +49,7 @@ show variables like 'example%';
Variable_name Value
example_enum_var e1
example_ulong_var 500
+example_varopt_default 5
UNINSTALL SONAME 'ha_example';
Warnings:
Warning 1620 Plugin is busy and will be uninstalled on shutdown
@@ -119,7 +120,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL `complex`='c,f,f,f'
-) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ULL`=10000 `STR`='dskj' `one_or_two`='one' `YESNO`=0
+) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ULL`=10000 `STR`='dskj' `one_or_two`='one' `YESNO`=0 `VAROPT`='5'
drop table t1;
SET @OLD_SQL_MODE=@@SQL_MODE;
SET SQL_MODE='IGNORE_BAD_TABLE_OPTIONS';
@@ -133,20 +134,20 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
-) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ULL`=10000000000000000000 `one_or_two`='ttt' `YESNO`=SSS
+) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ULL`=10000000000000000000 `one_or_two`='ttt' `YESNO`=SSS `VAROPT`='5'
#alter table
alter table t1 ULL=10000000;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
-) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `one_or_two`='ttt' `YESNO`=SSS `ULL`=10000000
+) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `one_or_two`='ttt' `YESNO`=SSS `VAROPT`='5' `ULL`=10000000
alter table t1 change a a int complex='c,c,c';
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL `complex`='c,c,c'
-) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `one_or_two`='ttt' `YESNO`=SSS `ULL`=10000000
+) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `one_or_two`='ttt' `YESNO`=SSS `VAROPT`='5' `ULL`=10000000
drop table t1;
#illegal value error
SET SQL_MODE='';
@@ -161,17 +162,38 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
-) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ULL`=4660
+) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ULL`=4660 `VAROPT`='5'
+SET example_varopt_default=33;
select create_options from information_schema.tables where table_schema='test' and table_name='t1';
create_options
-`ULL`=4660
+`ULL`=4660 `VAROPT`='5'
ALTER TABLE t1 ULL=DEFAULT;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
-) ENGINE=EXAMPLE DEFAULT CHARSET=latin1
+) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `VAROPT`='5'
DROP TABLE t1;
+create table t1 (a int) engine=example;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `VAROPT`='33'
+drop table t1;
+create table t1 (a int) engine=example varopt=15;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `varopt`=15
+alter table t1 varopt=default;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `VAROPT`='33'
+drop table t1;
SET @@SQL_MODE=@OLD_SQL_MODE;
select 1;
1