summaryrefslogtreecommitdiffstats
path: root/plugin/user_variables/mysql-test/user_variables/basic.test
blob: 7e67e4fa5af14840ec08ca6b8a423f90307ec2a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
query_vertical SELECT PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_STATUS, PLUGIN_TYPE, PLUGIN_AUTHOR, PLUGIN_DESCRIPTION, PLUGIN_LICENSE, LOAD_OPTION, PLUGIN_MATURITY FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME='user_variables';
SHOW CREATE TABLE INFORMATION_SCHEMA.USER_VARIABLES;

FLUSH USER_VARIABLES;
SELECT COUNT(*) FROM INFORMATION_SCHEMA.USER_VARIABLES;

SET @int_var=1;
SET @uint_var=CAST(2 AS UNSIGNED INTEGER);
SET @str_var='Value of string variable';
SET @utf8str_var=_utf8 'UTF8 string value';
SET @double_var=CAST(1 AS DOUBLE);
SET @dec_var=CAST(1 AS DECIMAL(20, 10));
SET @time_var=CAST('2016-02-25' AS DATE);
SET @' @#^%'='Value of variable with odd name';
SET @''='Value of variable with empty name';
SET @null_var=NULL;

SELECT COUNT(*) FROM INFORMATION_SCHEMA.USER_VARIABLES;
SELECT * FROM INFORMATION_SCHEMA.USER_VARIABLES ORDER BY VARIABLE_NAME;
--sorted_result
SHOW USER_VARIABLES;

FLUSH USER_VARIABLES;
SELECT COUNT(*) FROM INFORMATION_SCHEMA.USER_VARIABLES;