Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
c44c9231
Commit
c44c9231
authored
Apr 19, 2013
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-4345: Fixed system variables tests.
parent
9441e536
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
339 additions
and
1 deletion
+339
-1
mysql-test/suite/sys_vars/r/all_vars.result
mysql-test/suite/sys_vars/r/all_vars.result
+0
-1
mysql-test/suite/sys_vars/r/optimizer_selectivity_sampling_limit_basic.result
..._vars/r/optimizer_selectivity_sampling_limit_basic.result
+141
-0
mysql-test/suite/sys_vars/r/optimizer_use_condition_selectivity_basic.result
...s_vars/r/optimizer_use_condition_selectivity_basic.result
+32
-0
mysql-test/suite/sys_vars/t/optimizer_selectivity_sampling_limit_basic.test
...ys_vars/t/optimizer_selectivity_sampling_limit_basic.test
+154
-0
mysql-test/suite/sys_vars/t/optimizer_use_condition_selectivity_basic.test
...sys_vars/t/optimizer_use_condition_selectivity_basic.test
+12
-0
No files found.
mysql-test/suite/sys_vars/r/all_vars.result
View file @
c44c9231
...
...
@@ -10,6 +10,5 @@ there should be *no* long test name listed below:
select distinct variable_name as `there should be *no* variables listed below:` from t2
left join t1 on variable_name=test_name where test_name is null;
there should be *no* variables listed below:
optimizer_selectivity_sampling_limit
drop table t1;
drop table t2;
mysql-test/suite/sys_vars/r/optimizer_selectivity_sampling_limit_basic.result
0 → 100644
View file @
c44c9231
SET @start_global_value = @@global.optimizer_selectivity_sampling_limit;
SELECT @start_global_value;
@start_global_value
5000
SET @start_session_value = @@session.optimizer_selectivity_sampling_limit;
SELECT @start_session_value;
@start_session_value
5000
'#--------------------FN_DYNVARS_115_01-------------------------#'
SET @@global.optimizer_selectivity_sampling_limit = DEFAULT;
SELECT @@global.optimizer_selectivity_sampling_limit;
@@global.optimizer_selectivity_sampling_limit
5000
SET @@session.optimizer_selectivity_sampling_limit = DEFAULT;
SELECT @@session.optimizer_selectivity_sampling_limit;
@@session.optimizer_selectivity_sampling_limit
5000
'#--------------------FN_DYNVARS_115_02-------------------------#'
SET @@global.optimizer_selectivity_sampling_limit = DEFAULT;
SELECT @@global.optimizer_selectivity_sampling_limit = 5000;
@@global.optimizer_selectivity_sampling_limit = 5000
1
SET @@session.optimizer_selectivity_sampling_limit = DEFAULT;
SELECT @@session.optimizer_selectivity_sampling_limit = 5000;
@@session.optimizer_selectivity_sampling_limit = 5000
1
'#--------------------FN_DYNVARS_115_03-------------------------#'
SELECT @@global.optimizer_selectivity_sampling_limit;
@@global.optimizer_selectivity_sampling_limit
5000
SET @@global.optimizer_selectivity_sampling_limit = 9;
Warnings:
Warning 1292 Truncated incorrect optimizer_selectivity_sampling_l value: '9'
SELECT @@global.optimizer_selectivity_sampling_limit;
@@global.optimizer_selectivity_sampling_limit
10
SET @@global.optimizer_selectivity_sampling_limit = 10;
SELECT @@global.optimizer_selectivity_sampling_limit;
@@global.optimizer_selectivity_sampling_limit
10
SET @@global.optimizer_selectivity_sampling_limit = 11;
SELECT @@global.optimizer_selectivity_sampling_limit;
@@global.optimizer_selectivity_sampling_limit
11
SET @@global.optimizer_selectivity_sampling_limit = 7777;
SELECT @@global.optimizer_selectivity_sampling_limit;
@@global.optimizer_selectivity_sampling_limit
7777
SET @@global.optimizer_selectivity_sampling_limit = 4294967294;
SELECT @@global.optimizer_selectivity_sampling_limit;
@@global.optimizer_selectivity_sampling_limit
4294967294
SET @@global.optimizer_selectivity_sampling_limit = 4294967295;
SELECT @@global.optimizer_selectivity_sampling_limit;
@@global.optimizer_selectivity_sampling_limit
4294967295
SET @@global.optimizer_selectivity_sampling_limit = 4294967296;
Warnings:
Warning 1292 Truncated incorrect optimizer_selectivity_sampling_l value: '4294967296'
SELECT @@global.optimizer_selectivity_sampling_limit;
@@global.optimizer_selectivity_sampling_limit
4294967295
'#--------------------FN_DYNVARS_115_04-------------------------#'
SELECT @@session.optimizer_selectivity_sampling_limit;
@@session.optimizer_selectivity_sampling_limit
5000
SET @@session.optimizer_selectivity_sampling_limit = 9;
Warnings:
Warning 1292 Truncated incorrect optimizer_selectivity_sampling_l value: '9'
SELECT @@session.optimizer_selectivity_sampling_limit;
@@session.optimizer_selectivity_sampling_limit
10
SET @@session.optimizer_selectivity_sampling_limit = 10;
SELECT @@session.optimizer_selectivity_sampling_limit;
@@session.optimizer_selectivity_sampling_limit
10
SET @@session.optimizer_selectivity_sampling_limit = 11;
SELECT @@session.optimizer_selectivity_sampling_limit;
@@session.optimizer_selectivity_sampling_limit
11
SET @@session.optimizer_selectivity_sampling_limit = 7777;
SELECT @@session.optimizer_selectivity_sampling_limit;
@@session.optimizer_selectivity_sampling_limit
7777
SET @@session.optimizer_selectivity_sampling_limit = 4294967294;
SELECT @@session.optimizer_selectivity_sampling_limit;
@@session.optimizer_selectivity_sampling_limit
4294967294
SET @@session.optimizer_selectivity_sampling_limit = 4294967295;
SELECT @@session.optimizer_selectivity_sampling_limit;
@@session.optimizer_selectivity_sampling_limit
4294967295
SET @@session.optimizer_selectivity_sampling_limit = 4294967296;
Warnings:
Warning 1292 Truncated incorrect optimizer_selectivity_sampling_l value: '4294967296'
SELECT @@session.optimizer_selectivity_sampling_limit;
@@session.optimizer_selectivity_sampling_limit
4294967295
'#------------------FN_DYNVARS_115_05-----------------------#'
SET @@global.optimizer_selectivity_sampling_limit = ON;
ERROR 42000: Incorrect argument type to variable 'optimizer_selectivity_sampling_limit'
SET @@global.optimizer_selectivity_sampling_limit = OFF;
ERROR 42000: Incorrect argument type to variable 'optimizer_selectivity_sampling_limit'
SET @@session.optimizer_selectivity_sampling_limit = 65530.34;
ERROR 42000: Incorrect argument type to variable 'optimizer_selectivity_sampling_limit'
SET @@session.optimizer_selectivity_sampling_limit = test;
ERROR 42000: Incorrect argument type to variable 'optimizer_selectivity_sampling_limit'
'#------------------FN_DYNVARS_115_06-----------------------#'
SELECT @@global.optimizer_selectivity_sampling_limit = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='optimizer_selectivity_sampling_limit';
@@global.optimizer_selectivity_sampling_limit = VARIABLE_VALUE
1
'#------------------FN_DYNVARS_115_07-----------------------#'
SELECT @@session.optimizer_selectivity_sampling_limit = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='optimizer_selectivity_sampling_limit';
@@session.optimizer_selectivity_sampling_limit = VARIABLE_VALUE
1
'#---------------------FN_DYNVARS_115_08----------------------#'
SET @@optimizer_selectivity_sampling_limit = 10;
SET @@global.optimizer_selectivity_sampling_limit = 30;
SELECT @@optimizer_selectivity_sampling_limit = @@global.optimizer_selectivity_sampling_limit;
@@optimizer_selectivity_sampling_limit = @@global.optimizer_selectivity_sampling_limit
0
'#---------------------FN_DYNVARS_115_09----------------------#'
SET @@optimizer_selectivity_sampling_limit = 20;
SELECT @@optimizer_selectivity_sampling_limit = @@local.optimizer_selectivity_sampling_limit;
@@optimizer_selectivity_sampling_limit = @@local.optimizer_selectivity_sampling_limit
1
SELECT @@local.optimizer_selectivity_sampling_limit = @@session.optimizer_selectivity_sampling_limit;
@@local.optimizer_selectivity_sampling_limit = @@session.optimizer_selectivity_sampling_limit
1
SET @@global.optimizer_selectivity_sampling_limit = @start_global_value;
SELECT @@global.optimizer_selectivity_sampling_limit;
@@global.optimizer_selectivity_sampling_limit
5000
SET @@session.optimizer_selectivity_sampling_limit = @start_session_value;
SELECT @@session.optimizer_selectivity_sampling_limit;
@@session.optimizer_selectivity_sampling_limit
5000
mysql-test/suite/sys_vars/r/optimizer_use_condition_selectivity_basic.result
View file @
c44c9231
...
...
@@ -28,6 +28,12 @@ SELECT @@session.optimizer_use_condition_selectivity = 1;
SELECT @@global.optimizer_use_condition_selectivity;
@@global.optimizer_use_condition_selectivity
1
SET @@global.optimizer_use_condition_selectivity = 0;
Warnings:
Warning 1292 Truncated incorrect optimizer_use_condition_selectiv value: '0'
SELECT @@global.optimizer_use_condition_selectivity;
@@global.optimizer_use_condition_selectivity
1
SET @@global.optimizer_use_condition_selectivity = 1;
SELECT @@global.optimizer_use_condition_selectivity;
@@global.optimizer_use_condition_selectivity
...
...
@@ -44,10 +50,26 @@ SET @@global.optimizer_use_condition_selectivity = 4;
SELECT @@global.optimizer_use_condition_selectivity;
@@global.optimizer_use_condition_selectivity
4
SET @@global.optimizer_use_condition_selectivity = 5;
SELECT @@global.optimizer_use_condition_selectivity;
@@global.optimizer_use_condition_selectivity
5
SET @@global.optimizer_use_condition_selectivity = 6;
Warnings:
Warning 1292 Truncated incorrect optimizer_use_condition_selectiv value: '6'
SELECT @@global.optimizer_use_condition_selectivity;
@@global.optimizer_use_condition_selectivity
5
'#--------------------FN_DYNVARS_115_04-------------------------#'
SELECT @@session.optimizer_use_condition_selectivity;
@@session.optimizer_use_condition_selectivity
1
SET @@session.optimizer_use_condition_selectivity = 0;
Warnings:
Warning 1292 Truncated incorrect optimizer_use_condition_selectiv value: '0'
SELECT @@session.optimizer_use_condition_selectivity;
@@session.optimizer_use_condition_selectivity
1
SET @@session.optimizer_use_condition_selectivity = 1;
SELECT @@session.optimizer_use_condition_selectivity;
@@session.optimizer_use_condition_selectivity
...
...
@@ -64,6 +86,16 @@ SET @@session.optimizer_use_condition_selectivity = 4;
SELECT @@session.optimizer_use_condition_selectivity;
@@session.optimizer_use_condition_selectivity
4
SET @@session.optimizer_use_condition_selectivity = 5;
SELECT @@session.optimizer_use_condition_selectivity;
@@session.optimizer_use_condition_selectivity
5
SET @@session.optimizer_use_condition_selectivity = 6;
Warnings:
Warning 1292 Truncated incorrect optimizer_use_condition_selectiv value: '6'
SELECT @@session.optimizer_use_condition_selectivity;
@@session.optimizer_use_condition_selectivity
5
'#------------------FN_DYNVARS_115_05-----------------------#'
SET @@global.optimizer_use_condition_selectivity = ON;
ERROR 42000: Incorrect argument type to variable 'optimizer_use_condition_selectivity'
...
...
mysql-test/suite/sys_vars/t/optimizer_selectivity_sampling_limit_basic.test
0 → 100644
View file @
c44c9231
--
source
include
/
load_sysvars
.
inc
#################################################################
# START OF optimizer_selectivity_sampling_limit TESTS #
#################################################################
#############################################################
# Save initial value #
#############################################################
SET
@
start_global_value
=
@@
global
.
optimizer_selectivity_sampling_limit
;
SELECT
@
start_global_value
;
SET
@
start_session_value
=
@@
session
.
optimizer_selectivity_sampling_limit
;
SELECT
@
start_session_value
;
--
echo
'#--------------------FN_DYNVARS_115_01-------------------------#'
#########################################################################
# Display the DEFAULT value of optimizer_selectivity_sampling_limit #
#########################################################################
SET
@@
global
.
optimizer_selectivity_sampling_limit
=
DEFAULT
;
SELECT
@@
global
.
optimizer_selectivity_sampling_limit
;
SET
@@
session
.
optimizer_selectivity_sampling_limit
=
DEFAULT
;
SELECT
@@
session
.
optimizer_selectivity_sampling_limit
;
--
echo
'#--------------------FN_DYNVARS_115_02-------------------------#'
#########################################################################
# Check the DEFAULT value of optimizer_selectivity_sampling_limit #
#########################################################################
SET
@@
global
.
optimizer_selectivity_sampling_limit
=
DEFAULT
;
SELECT
@@
global
.
optimizer_selectivity_sampling_limit
=
5000
;
SET
@@
session
.
optimizer_selectivity_sampling_limit
=
DEFAULT
;
SELECT
@@
session
.
optimizer_selectivity_sampling_limit
=
5000
;
--
echo
'#--------------------FN_DYNVARS_115_03-------------------------#'
#############################################################################################
# Change the value of optimizer_selectivity_sampling_limit to a valid value for GLOBAL Scope #
#############################################################################################
SELECT
@@
global
.
optimizer_selectivity_sampling_limit
;
SET
@@
global
.
optimizer_selectivity_sampling_limit
=
9
;
SELECT
@@
global
.
optimizer_selectivity_sampling_limit
;
SET
@@
global
.
optimizer_selectivity_sampling_limit
=
10
;
SELECT
@@
global
.
optimizer_selectivity_sampling_limit
;
SET
@@
global
.
optimizer_selectivity_sampling_limit
=
11
;
SELECT
@@
global
.
optimizer_selectivity_sampling_limit
;
SET
@@
global
.
optimizer_selectivity_sampling_limit
=
7777
;
SELECT
@@
global
.
optimizer_selectivity_sampling_limit
;
SET
@@
global
.
optimizer_selectivity_sampling_limit
=
4294967294
;
SELECT
@@
global
.
optimizer_selectivity_sampling_limit
;
SET
@@
global
.
optimizer_selectivity_sampling_limit
=
4294967295
;
SELECT
@@
global
.
optimizer_selectivity_sampling_limit
;
SET
@@
global
.
optimizer_selectivity_sampling_limit
=
4294967296
;
SELECT
@@
global
.
optimizer_selectivity_sampling_limit
;
--
echo
'#--------------------FN_DYNVARS_115_04-------------------------#'
#############################################################################################
# Change the value of optimizer_selectivity_sampling_limit to a valid value for SESSION Scope#
#############################################################################################
SELECT
@@
session
.
optimizer_selectivity_sampling_limit
;
SET
@@
session
.
optimizer_selectivity_sampling_limit
=
9
;
SELECT
@@
session
.
optimizer_selectivity_sampling_limit
;
SET
@@
session
.
optimizer_selectivity_sampling_limit
=
10
;
SELECT
@@
session
.
optimizer_selectivity_sampling_limit
;
SET
@@
session
.
optimizer_selectivity_sampling_limit
=
11
;
SELECT
@@
session
.
optimizer_selectivity_sampling_limit
;
SET
@@
session
.
optimizer_selectivity_sampling_limit
=
7777
;
SELECT
@@
session
.
optimizer_selectivity_sampling_limit
;
SET
@@
session
.
optimizer_selectivity_sampling_limit
=
4294967294
;
SELECT
@@
session
.
optimizer_selectivity_sampling_limit
;
SET
@@
session
.
optimizer_selectivity_sampling_limit
=
4294967295
;
SELECT
@@
session
.
optimizer_selectivity_sampling_limit
;
SET
@@
session
.
optimizer_selectivity_sampling_limit
=
4294967296
;
SELECT
@@
session
.
optimizer_selectivity_sampling_limit
;
--
echo
'#------------------FN_DYNVARS_115_05-----------------------#'
###############################################################################
# Change the value of optimizer_selectivity_sampling_limit to an invalid value #
##############################################################################
--
Error
ER_WRONG_TYPE_FOR_VAR
SET
@@
global
.
optimizer_selectivity_sampling_limit
=
ON
;
--
Error
ER_WRONG_TYPE_FOR_VAR
SET
@@
global
.
optimizer_selectivity_sampling_limit
=
OFF
;
--
Error
ER_WRONG_TYPE_FOR_VAR
SET
@@
session
.
optimizer_selectivity_sampling_limit
=
65530.34
;
--
Error
ER_WRONG_TYPE_FOR_VAR
SET
@@
session
.
optimizer_selectivity_sampling_limit
=
test
;
--
echo
'#------------------FN_DYNVARS_115_06-----------------------#'
####################################################################
# Check if the value in GLOBAL Table matches value in variable #
####################################################################
SELECT
@@
global
.
optimizer_selectivity_sampling_limit
=
VARIABLE_VALUE
FROM
INFORMATION_SCHEMA
.
GLOBAL_VARIABLES
WHERE
VARIABLE_NAME
=
'optimizer_selectivity_sampling_limit'
;
--
echo
'#------------------FN_DYNVARS_115_07-----------------------#'
####################################################################
# Check if the value in SESSION Table matches value in variable #
####################################################################
SELECT
@@
session
.
optimizer_selectivity_sampling_limit
=
VARIABLE_VALUE
FROM
INFORMATION_SCHEMA
.
SESSION_VARIABLES
WHERE
VARIABLE_NAME
=
'optimizer_selectivity_sampling_limit'
;
--
echo
'#---------------------FN_DYNVARS_115_08----------------------#'
###############################################################################
# Check if global and session variable are independent of each other #
###############################################################################
SET
@@
optimizer_selectivity_sampling_limit
=
10
;
SET
@@
global
.
optimizer_selectivity_sampling_limit
=
30
;
SELECT
@@
optimizer_selectivity_sampling_limit
=
@@
global
.
optimizer_selectivity_sampling_limit
;
--
echo
'#---------------------FN_DYNVARS_115_09----------------------#'
###############################################################################
# Check if accessing variable with SESSION,LOCAL and without SCOPE points #
# to same session variable #
###############################################################################
SET
@@
optimizer_selectivity_sampling_limit
=
20
;
SELECT
@@
optimizer_selectivity_sampling_limit
=
@@
local
.
optimizer_selectivity_sampling_limit
;
SELECT
@@
local
.
optimizer_selectivity_sampling_limit
=
@@
session
.
optimizer_selectivity_sampling_limit
;
####################################
# Restore initial value #
####################################
SET
@@
global
.
optimizer_selectivity_sampling_limit
=
@
start_global_value
;
SELECT
@@
global
.
optimizer_selectivity_sampling_limit
;
SET
@@
session
.
optimizer_selectivity_sampling_limit
=
@
start_session_value
;
SELECT
@@
session
.
optimizer_selectivity_sampling_limit
;
########################################################################
# END OF optimizer_selectivity_sampling_limit TESTS #
########################################################################
mysql-test/suite/sys_vars/t/optimizer_use_condition_selectivity_basic.test
View file @
c44c9231
...
...
@@ -45,6 +45,8 @@ SELECT @@session.optimizer_use_condition_selectivity = 1;
# Change the value of optimizer_use_condition_selectivity to a valid value for GLOBAL Scope #
#############################################################################################
SELECT
@@
global
.
optimizer_use_condition_selectivity
;
SET
@@
global
.
optimizer_use_condition_selectivity
=
0
;
SELECT
@@
global
.
optimizer_use_condition_selectivity
;
SET
@@
global
.
optimizer_use_condition_selectivity
=
1
;
SELECT
@@
global
.
optimizer_use_condition_selectivity
;
...
...
@@ -54,6 +56,10 @@ SET @@global.optimizer_use_condition_selectivity = 3;
SELECT
@@
global
.
optimizer_use_condition_selectivity
;
SET
@@
global
.
optimizer_use_condition_selectivity
=
4
;
SELECT
@@
global
.
optimizer_use_condition_selectivity
;
SET
@@
global
.
optimizer_use_condition_selectivity
=
5
;
SELECT
@@
global
.
optimizer_use_condition_selectivity
;
SET
@@
global
.
optimizer_use_condition_selectivity
=
6
;
SELECT
@@
global
.
optimizer_use_condition_selectivity
;
--
echo
'#--------------------FN_DYNVARS_115_04-------------------------#'
...
...
@@ -61,6 +67,8 @@ SELECT @@global.optimizer_use_condition_selectivity;
# Change the value of optimizer_use_condition_selectivity to a valid value for SESSION Scope#
#############################################################################################
SELECT
@@
session
.
optimizer_use_condition_selectivity
;
SET
@@
session
.
optimizer_use_condition_selectivity
=
0
;
SELECT
@@
session
.
optimizer_use_condition_selectivity
;
SET
@@
session
.
optimizer_use_condition_selectivity
=
1
;
SELECT
@@
session
.
optimizer_use_condition_selectivity
;
...
...
@@ -70,6 +78,10 @@ SET @@session.optimizer_use_condition_selectivity = 3;
SELECT
@@
session
.
optimizer_use_condition_selectivity
;
SET
@@
session
.
optimizer_use_condition_selectivity
=
4
;
SELECT
@@
session
.
optimizer_use_condition_selectivity
;
SET
@@
session
.
optimizer_use_condition_selectivity
=
5
;
SELECT
@@
session
.
optimizer_use_condition_selectivity
;
SET
@@
session
.
optimizer_use_condition_selectivity
=
6
;
SELECT
@@
session
.
optimizer_use_condition_selectivity
;
--
echo
'#------------------FN_DYNVARS_115_05-----------------------#'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment