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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
cfbce98a
Commit
cfbce98a
authored
Apr 29, 2010
by
Inaam Rana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add basic tests for new innodb features
parent
248dd65f
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
706 additions
and
0 deletions
+706
-0
mysql-test/suite/sys_vars/r/innodb_buffer_pool_instances_basic.result
...uite/sys_vars/r/innodb_buffer_pool_instances_basic.result
+53
-0
mysql-test/suite/sys_vars/r/innodb_purge_batch_size_basic.result
...est/suite/sys_vars/r/innodb_purge_batch_size_basic.result
+98
-0
mysql-test/suite/sys_vars/r/innodb_purge_threads_basic.result
...l-test/suite/sys_vars/r/innodb_purge_threads_basic.result
+53
-0
mysql-test/suite/sys_vars/r/innodb_use_native_aio_basic.result
...-test/suite/sys_vars/r/innodb_use_native_aio_basic.result
+53
-0
mysql-test/suite/sys_vars/t/innodb_buffer_pool_instances_basic.test
.../suite/sys_vars/t/innodb_buffer_pool_instances_basic.test
+103
-0
mysql-test/suite/sys_vars/t/innodb_purge_batch_size_basic.test
...-test/suite/sys_vars/t/innodb_purge_batch_size_basic.test
+142
-0
mysql-test/suite/sys_vars/t/innodb_purge_threads_basic.test
mysql-test/suite/sys_vars/t/innodb_purge_threads_basic.test
+102
-0
mysql-test/suite/sys_vars/t/innodb_use_native_aio_basic.test
mysql-test/suite/sys_vars/t/innodb_use_native_aio_basic.test
+102
-0
No files found.
mysql-test/suite/sys_vars/r/innodb_buffer_pool_instances_basic.result
0 → 100644
View file @
cfbce98a
'#---------------------BS_STVARS_035_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_buffer_pool_instances);
COUNT(@@GLOBAL.innodb_buffer_pool_instances)
1
1 Expected
'#---------------------BS_STVARS_035_02----------------------#'
SET @@GLOBAL.innodb_buffer_pool_instances=1;
ERROR HY000: Variable 'innodb_buffer_pool_instances' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_buffer_pool_instances);
COUNT(@@GLOBAL.innodb_buffer_pool_instances)
1
1 Expected
'#---------------------BS_STVARS_035_03----------------------#'
SELECT @@GLOBAL.innodb_buffer_pool_instances = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_buffer_pool_instances';
@@GLOBAL.innodb_buffer_pool_instances = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.innodb_buffer_pool_instances);
COUNT(@@GLOBAL.innodb_buffer_pool_instances)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_buffer_pool_instances';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_035_04----------------------#'
SELECT @@innodb_buffer_pool_instances = @@GLOBAL.innodb_buffer_pool_instances;
@@innodb_buffer_pool_instances = @@GLOBAL.innodb_buffer_pool_instances
1
1 Expected
'#---------------------BS_STVARS_035_05----------------------#'
SELECT COUNT(@@innodb_buffer_pool_instances);
COUNT(@@innodb_buffer_pool_instances)
1
1 Expected
SELECT COUNT(@@local.innodb_buffer_pool_instances);
ERROR HY000: Variable 'innodb_buffer_pool_instances' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.innodb_buffer_pool_instances);
ERROR HY000: Variable 'innodb_buffer_pool_instances' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_buffer_pool_instances);
COUNT(@@GLOBAL.innodb_buffer_pool_instances)
1
1 Expected
SELECT innodb_buffer_pool_instances = @@SESSION.innodb_buffer_pool_instances;
ERROR 42S22: Unknown column 'innodb_buffer_pool_instances' in 'field list'
Expected error 'Readonly variable'
mysql-test/suite/sys_vars/r/innodb_purge_batch_size_basic.result
0 → 100644
View file @
cfbce98a
SET @global_start_value = @@global.innodb_purge_batch_size;
SELECT @global_start_value;
@global_start_value
20
'#--------------------FN_DYNVARS_046_01------------------------#'
SET @@global.innodb_purge_batch_size = 1;
SET @@global.innodb_purge_batch_size = DEFAULT;
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
20
'#---------------------FN_DYNVARS_046_02-------------------------#'
SET innodb_purge_batch_size = 1;
ERROR HY000: Variable 'innodb_purge_batch_size' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@innodb_purge_batch_size;
@@innodb_purge_batch_size
20
SELECT local.innodb_purge_batch_size;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_purge_batch_size = 1;
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
1
'#--------------------FN_DYNVARS_046_03------------------------#'
SET @@global.innodb_purge_batch_size = 1;
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
1
SET @@global.innodb_purge_batch_size = 5000;
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
5000
SET @@global.innodb_purge_batch_size = 1000;
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
1000
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_purge_batch_size = 0;
Warnings:
Warning 1292 Truncated incorrect innodb_purge_batch_size value: '0'
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
1
SET @@global.innodb_purge_batch_size = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_purge_batch_size'
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
1
SET @@global.innodb_purge_batch_size = "Y";
ERROR 42000: Incorrect argument type to variable 'innodb_purge_batch_size'
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
1
SET @@global.innodb_purge_batch_size = 5001;
Warnings:
Warning 1292 Truncated incorrect innodb_purge_batch_size value: '5001'
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
5000
'#----------------------FN_DYNVARS_046_05------------------------#'
SELECT @@global.innodb_purge_batch_size =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_purge_batch_size';
@@global.innodb_purge_batch_size =
VARIABLE_VALUE
1
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
5000
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_purge_batch_size';
VARIABLE_VALUE
5000
'#---------------------FN_DYNVARS_046_06-------------------------#'
SET @@global.innodb_purge_batch_size = OFF;
ERROR 42000: Incorrect argument type to variable 'innodb_purge_batch_size'
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
5000
SET @@global.innodb_purge_batch_size = ON;
ERROR 42000: Incorrect argument type to variable 'innodb_purge_batch_size'
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
5000
'#---------------------FN_DYNVARS_046_07----------------------#'
SET @@global.innodb_purge_batch_size = TRUE;
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
1
SET @@global.innodb_purge_batch_size = FALSE;
Warnings:
Warning 1292 Truncated incorrect innodb_purge_batch_size value: '0'
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
1
SET @@global.innodb_purge_batch_size = @global_start_value;
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
20
mysql-test/suite/sys_vars/r/innodb_purge_threads_basic.result
0 → 100644
View file @
cfbce98a
'#---------------------BS_STVARS_035_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_purge_threads);
COUNT(@@GLOBAL.innodb_purge_threads)
1
1 Expected
'#---------------------BS_STVARS_035_02----------------------#'
SET @@GLOBAL.innodb_purge_threads=1;
ERROR HY000: Variable 'innodb_purge_threads' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_purge_threads);
COUNT(@@GLOBAL.innodb_purge_threads)
1
1 Expected
'#---------------------BS_STVARS_035_03----------------------#'
SELECT @@GLOBAL.innodb_purge_threads = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_purge_threads';
@@GLOBAL.innodb_purge_threads = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.innodb_purge_threads);
COUNT(@@GLOBAL.innodb_purge_threads)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_purge_threads';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_035_04----------------------#'
SELECT @@innodb_purge_threads = @@GLOBAL.innodb_purge_threads;
@@innodb_purge_threads = @@GLOBAL.innodb_purge_threads
1
1 Expected
'#---------------------BS_STVARS_035_05----------------------#'
SELECT COUNT(@@innodb_purge_threads);
COUNT(@@innodb_purge_threads)
1
1 Expected
SELECT COUNT(@@local.innodb_purge_threads);
ERROR HY000: Variable 'innodb_purge_threads' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.innodb_purge_threads);
ERROR HY000: Variable 'innodb_purge_threads' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_purge_threads);
COUNT(@@GLOBAL.innodb_purge_threads)
1
1 Expected
SELECT innodb_purge_threads = @@SESSION.innodb_purge_threads;
ERROR 42S22: Unknown column 'innodb_purge_threads' in 'field list'
Expected error 'Readonly variable'
mysql-test/suite/sys_vars/r/innodb_use_native_aio_basic.result
0 → 100644
View file @
cfbce98a
'#---------------------BS_STVARS_035_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_use_native_aio);
COUNT(@@GLOBAL.innodb_use_native_aio)
1
1 Expected
'#---------------------BS_STVARS_035_02----------------------#'
SET @@GLOBAL.innodb_use_native_aio=1;
ERROR HY000: Variable 'innodb_use_native_aio' is a read only variable
Expected error 'Read only variable'
SELECT COUNT(@@GLOBAL.innodb_use_native_aio);
COUNT(@@GLOBAL.innodb_use_native_aio)
1
1 Expected
'#---------------------BS_STVARS_035_03----------------------#'
SELECT IF(@@GLOBAL.innodb_use_native_aio, 'ON', 'OFF') = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_use_native_aio';
IF(@@GLOBAL.innodb_use_native_aio, 'ON', 'OFF') = VARIABLE_VALUE
1
1 Expected
SELECT COUNT(@@GLOBAL.innodb_use_native_aio);
COUNT(@@GLOBAL.innodb_use_native_aio)
1
1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_use_native_aio';
COUNT(VARIABLE_VALUE)
1
1 Expected
'#---------------------BS_STVARS_035_04----------------------#'
SELECT @@innodb_use_native_aio = @@GLOBAL.innodb_use_native_aio;
@@innodb_use_native_aio = @@GLOBAL.innodb_use_native_aio
1
1 Expected
'#---------------------BS_STVARS_035_05----------------------#'
SELECT COUNT(@@innodb_use_native_aio);
COUNT(@@innodb_use_native_aio)
1
1 Expected
SELECT COUNT(@@local.innodb_use_native_aio);
ERROR HY000: Variable 'innodb_use_native_aio' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.innodb_use_native_aio);
ERROR HY000: Variable 'innodb_use_native_aio' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@GLOBAL.innodb_use_native_aio);
COUNT(@@GLOBAL.innodb_use_native_aio)
1
1 Expected
SELECT innodb_use_native_aio = @@SESSION.innodb_use_native_aio;
ERROR 42S22: Unknown column 'innodb_use_native_aio' in 'field list'
Expected error 'Readonly variable'
mysql-test/suite/sys_vars/t/innodb_buffer_pool_instances_basic.test
0 → 100644
View file @
cfbce98a
################## mysql-test\t\innodb_buffer_pool_instances_basic.test #######
# #
# Variable Name: innodb_buffer_pool_instances #
# Scope: Global #
# Access Type: Static #
# Data Type: numeric #
# #
# #
# Creation Date: 2008-02-07 #
# Author : Sharique Abdullah #
# #
# #
# Description:Test Cases of Dynamic System Variable #
# innodb_buffer_pool_instances #
# that checks the behavior of this variable in the following ways #
# * Value Check #
# * Scope Check #
# #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
# server-system-variables.html #
# #
###############################################################################
--
source
include
/
have_innodb
.
inc
--
echo
'#---------------------BS_STVARS_035_01----------------------#'
####################################################################
# Displaying default value #
####################################################################
SELECT
COUNT
(
@@
GLOBAL
.
innodb_buffer_pool_instances
);
--
echo
1
Expected
--
echo
'#---------------------BS_STVARS_035_02----------------------#'
####################################################################
# Check if Value can set #
####################################################################
--
error
ER_INCORRECT_GLOBAL_LOCAL_VAR
SET
@@
GLOBAL
.
innodb_buffer_pool_instances
=
1
;
--
echo
Expected
error
'Read only variable'
SELECT
COUNT
(
@@
GLOBAL
.
innodb_buffer_pool_instances
);
--
echo
1
Expected
--
echo
'#---------------------BS_STVARS_035_03----------------------#'
#################################################################
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
SELECT
@@
GLOBAL
.
innodb_buffer_pool_instances
=
VARIABLE_VALUE
FROM
INFORMATION_SCHEMA
.
GLOBAL_VARIABLES
WHERE
VARIABLE_NAME
=
'innodb_buffer_pool_instances'
;
--
echo
1
Expected
SELECT
COUNT
(
@@
GLOBAL
.
innodb_buffer_pool_instances
);
--
echo
1
Expected
SELECT
COUNT
(
VARIABLE_VALUE
)
FROM
INFORMATION_SCHEMA
.
GLOBAL_VARIABLES
WHERE
VARIABLE_NAME
=
'innodb_buffer_pool_instances'
;
--
echo
1
Expected
--
echo
'#---------------------BS_STVARS_035_04----------------------#'
################################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
################################################################################
SELECT
@@
innodb_buffer_pool_instances
=
@@
GLOBAL
.
innodb_buffer_pool_instances
;
--
echo
1
Expected
--
echo
'#---------------------BS_STVARS_035_05----------------------#'
################################################################################
# Check if innodb_buffer_pool_instances can be accessed with and without @@ sign #
################################################################################
SELECT
COUNT
(
@@
innodb_buffer_pool_instances
);
--
echo
1
Expected
--
Error
ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT
COUNT
(
@@
local
.
innodb_buffer_pool_instances
);
--
echo
Expected
error
'Variable is a GLOBAL variable'
--
Error
ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT
COUNT
(
@@
SESSION
.
innodb_buffer_pool_instances
);
--
echo
Expected
error
'Variable is a GLOBAL variable'
SELECT
COUNT
(
@@
GLOBAL
.
innodb_buffer_pool_instances
);
--
echo
1
Expected
--
Error
ER_BAD_FIELD_ERROR
SELECT
innodb_buffer_pool_instances
=
@@
SESSION
.
innodb_buffer_pool_instances
;
--
echo
Expected
error
'Readonly variable'
mysql-test/suite/sys_vars/t/innodb_purge_batch_size_basic.test
0 → 100644
View file @
cfbce98a
################# mysql-test\t\innodb_purge_batch_size_basic.test #############
# #
# Variable Name: innodb_purge_batch_size #
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: Numeric #
# Default Value: 20 #
# Range: 0-4294967295 #
# #
# #
# Creation Date: 2008-02-07 #
# Author: Rizwan #
# #
#Description:Test Cases of Dynamic System Variable innodb_purge_batch_size #
# that checks the behavior of this variable in the following ways #
# * Default Value #
# * Valid & Invalid values #
# * Scope & Access method #
# * Data Integrity #
# #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
# server-system-variables.html #
# #
###############################################################################
--
source
include
/
have_innodb
.
inc
--
source
include
/
load_sysvars
.
inc
########################################################################
# START OF innodb_purge_batch_size TESTS #
########################################################################
############################################################################
# Saving initial value of innodb_purge_batch_size in a temporary variable #
############################################################################
SET
@
global_start_value
=
@@
global
.
innodb_purge_batch_size
;
SELECT
@
global_start_value
;
--
echo
'#--------------------FN_DYNVARS_046_01------------------------#'
########################################################################
# Display the DEFAULT value of innodb_purge_batch_size #
########################################################################
SET
@@
global
.
innodb_purge_batch_size
=
1
;
SET
@@
global
.
innodb_purge_batch_size
=
DEFAULT
;
SELECT
@@
global
.
innodb_purge_batch_size
;
--
echo
'#---------------------FN_DYNVARS_046_02-------------------------#'
##############################################################################
# Check if innodb_purge_batch_size can be accessed with and without @@ sign #
##############################################################################
--
Error
ER_GLOBAL_VARIABLE
SET
innodb_purge_batch_size
=
1
;
SELECT
@@
innodb_purge_batch_size
;
--
Error
ER_UNKNOWN_TABLE
SELECT
local
.
innodb_purge_batch_size
;
SET
global
innodb_purge_batch_size
=
1
;
SELECT
@@
global
.
innodb_purge_batch_size
;
--
echo
'#--------------------FN_DYNVARS_046_03------------------------#'
##########################################################################
# change the value of innodb_purge_batch_size to a valid value #
##########################################################################
SET
@@
global
.
innodb_purge_batch_size
=
1
;
SELECT
@@
global
.
innodb_purge_batch_size
;
SET
@@
global
.
innodb_purge_batch_size
=
5000
;
SELECT
@@
global
.
innodb_purge_batch_size
;
SET
@@
global
.
innodb_purge_batch_size
=
1000
;
SELECT
@@
global
.
innodb_purge_batch_size
;
--
echo
'#--------------------FN_DYNVARS_046_04-------------------------#'
###########################################################################
# Change the value of innodb_purge_batch_size to invalid value #
###########################################################################
SET
@@
global
.
innodb_purge_batch_size
=
0
;
SELECT
@@
global
.
innodb_purge_batch_size
;
--
Error
ER_WRONG_TYPE_FOR_VAR
SET
@@
global
.
innodb_purge_batch_size
=
"T"
;
SELECT
@@
global
.
innodb_purge_batch_size
;
--
Error
ER_WRONG_TYPE_FOR_VAR
SET
@@
global
.
innodb_purge_batch_size
=
"Y"
;
SELECT
@@
global
.
innodb_purge_batch_size
;
SET
@@
global
.
innodb_purge_batch_size
=
5001
;
SELECT
@@
global
.
innodb_purge_batch_size
;
--
echo
'#----------------------FN_DYNVARS_046_05------------------------#'
#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
SELECT
@@
global
.
innodb_purge_batch_size
=
VARIABLE_VALUE
FROM
INFORMATION_SCHEMA
.
GLOBAL_VARIABLES
WHERE
VARIABLE_NAME
=
'innodb_purge_batch_size'
;
SELECT
@@
global
.
innodb_purge_batch_size
;
SELECT
VARIABLE_VALUE
FROM
INFORMATION_SCHEMA
.
GLOBAL_VARIABLES
WHERE
VARIABLE_NAME
=
'innodb_purge_batch_size'
;
--
echo
'#---------------------FN_DYNVARS_046_06-------------------------#'
###################################################################
# Check if ON and OFF values can be used on variable #
###################################################################
--
ERROR
ER_WRONG_TYPE_FOR_VAR
SET
@@
global
.
innodb_purge_batch_size
=
OFF
;
SELECT
@@
global
.
innodb_purge_batch_size
;
--
ERROR
ER_WRONG_TYPE_FOR_VAR
SET
@@
global
.
innodb_purge_batch_size
=
ON
;
SELECT
@@
global
.
innodb_purge_batch_size
;
--
echo
'#---------------------FN_DYNVARS_046_07----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
SET
@@
global
.
innodb_purge_batch_size
=
TRUE
;
SELECT
@@
global
.
innodb_purge_batch_size
;
SET
@@
global
.
innodb_purge_batch_size
=
FALSE
;
SELECT
@@
global
.
innodb_purge_batch_size
;
##############################
# Restore initial value #
##############################
SET
@@
global
.
innodb_purge_batch_size
=
@
global_start_value
;
SELECT
@@
global
.
innodb_purge_batch_size
;
###############################################################
# END OF innodb_purge_batch_size TESTS #
###############################################################
mysql-test/suite/sys_vars/t/innodb_purge_threads_basic.test
0 → 100644
View file @
cfbce98a
################## mysql-test\t\innodb_log_purge_threads_basic.test ###########
# #
# Variable Name: innodb_purge_threads #
# Scope: Global #
# Access Type: Static #
# Data Type: numeric #
# #
# #
# Creation Date: 2008-02-07 #
# Author : Sharique Abdullah #
# #
# #
# Description:Test Cases of Dynamic System Variable innodb_purge_threads #
# that checks the behavior of this variable in the following ways #
# * Value Check #
# * Scope Check #
# #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
# server-system-variables.html #
# #
###############################################################################
--
source
include
/
have_innodb
.
inc
--
echo
'#---------------------BS_STVARS_035_01----------------------#'
####################################################################
# Displaying default value #
####################################################################
SELECT
COUNT
(
@@
GLOBAL
.
innodb_purge_threads
);
--
echo
1
Expected
--
echo
'#---------------------BS_STVARS_035_02----------------------#'
####################################################################
# Check if Value can set #
####################################################################
--
error
ER_INCORRECT_GLOBAL_LOCAL_VAR
SET
@@
GLOBAL
.
innodb_purge_threads
=
1
;
--
echo
Expected
error
'Read only variable'
SELECT
COUNT
(
@@
GLOBAL
.
innodb_purge_threads
);
--
echo
1
Expected
--
echo
'#---------------------BS_STVARS_035_03----------------------#'
#################################################################
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
SELECT
@@
GLOBAL
.
innodb_purge_threads
=
VARIABLE_VALUE
FROM
INFORMATION_SCHEMA
.
GLOBAL_VARIABLES
WHERE
VARIABLE_NAME
=
'innodb_purge_threads'
;
--
echo
1
Expected
SELECT
COUNT
(
@@
GLOBAL
.
innodb_purge_threads
);
--
echo
1
Expected
SELECT
COUNT
(
VARIABLE_VALUE
)
FROM
INFORMATION_SCHEMA
.
GLOBAL_VARIABLES
WHERE
VARIABLE_NAME
=
'innodb_purge_threads'
;
--
echo
1
Expected
--
echo
'#---------------------BS_STVARS_035_04----------------------#'
################################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
################################################################################
SELECT
@@
innodb_purge_threads
=
@@
GLOBAL
.
innodb_purge_threads
;
--
echo
1
Expected
--
echo
'#---------------------BS_STVARS_035_05----------------------#'
################################################################################
# Check if innodb_purge_threads can be accessed with and without @@ sign #
################################################################################
SELECT
COUNT
(
@@
innodb_purge_threads
);
--
echo
1
Expected
--
Error
ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT
COUNT
(
@@
local
.
innodb_purge_threads
);
--
echo
Expected
error
'Variable is a GLOBAL variable'
--
Error
ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT
COUNT
(
@@
SESSION
.
innodb_purge_threads
);
--
echo
Expected
error
'Variable is a GLOBAL variable'
SELECT
COUNT
(
@@
GLOBAL
.
innodb_purge_threads
);
--
echo
1
Expected
--
Error
ER_BAD_FIELD_ERROR
SELECT
innodb_purge_threads
=
@@
SESSION
.
innodb_purge_threads
;
--
echo
Expected
error
'Readonly variable'
mysql-test/suite/sys_vars/t/innodb_use_native_aio_basic.test
0 → 100644
View file @
cfbce98a
################## mysql-test\t\innodb_use_native_aio_basic.test ##############
# #
# Variable Name: innodb_use_native_aio #
# Scope: Global #
# Access Type: Static #
# Data Type: numeric #
# #
# #
# Creation Date: 2008-02-07 #
# Author : Sharique Abdullah #
# #
# #
# Description:Test Cases of Dynamic System Variable innodb_use_native_aio #
# that checks the behavior of this variable in the following ways #
# * Value Check #
# * Scope Check #
# #
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
# server-system-variables.html #
# #
###############################################################################
--
source
include
/
have_innodb
.
inc
--
echo
'#---------------------BS_STVARS_035_01----------------------#'
####################################################################
# Displaying default value #
####################################################################
SELECT
COUNT
(
@@
GLOBAL
.
innodb_use_native_aio
);
--
echo
1
Expected
--
echo
'#---------------------BS_STVARS_035_02----------------------#'
####################################################################
# Check if Value can set #
####################################################################
--
error
ER_INCORRECT_GLOBAL_LOCAL_VAR
SET
@@
GLOBAL
.
innodb_use_native_aio
=
1
;
--
echo
Expected
error
'Read only variable'
SELECT
COUNT
(
@@
GLOBAL
.
innodb_use_native_aio
);
--
echo
1
Expected
--
echo
'#---------------------BS_STVARS_035_03----------------------#'
#################################################################
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
SELECT
IF
(
@@
GLOBAL
.
innodb_use_native_aio
,
'ON'
,
'OFF'
)
=
VARIABLE_VALUE
FROM
INFORMATION_SCHEMA
.
GLOBAL_VARIABLES
WHERE
VARIABLE_NAME
=
'innodb_use_native_aio'
;
--
echo
1
Expected
SELECT
COUNT
(
@@
GLOBAL
.
innodb_use_native_aio
);
--
echo
1
Expected
SELECT
COUNT
(
VARIABLE_VALUE
)
FROM
INFORMATION_SCHEMA
.
GLOBAL_VARIABLES
WHERE
VARIABLE_NAME
=
'innodb_use_native_aio'
;
--
echo
1
Expected
--
echo
'#---------------------BS_STVARS_035_04----------------------#'
################################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
################################################################################
SELECT
@@
innodb_use_native_aio
=
@@
GLOBAL
.
innodb_use_native_aio
;
--
echo
1
Expected
--
echo
'#---------------------BS_STVARS_035_05----------------------#'
################################################################################
# Check if innodb_log_file_size can be accessed with and without @@ sign #
################################################################################
SELECT
COUNT
(
@@
innodb_use_native_aio
);
--
echo
1
Expected
--
Error
ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT
COUNT
(
@@
local
.
innodb_use_native_aio
);
--
echo
Expected
error
'Variable is a GLOBAL variable'
--
Error
ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT
COUNT
(
@@
SESSION
.
innodb_use_native_aio
);
--
echo
Expected
error
'Variable is a GLOBAL variable'
SELECT
COUNT
(
@@
GLOBAL
.
innodb_use_native_aio
);
--
echo
1
Expected
--
Error
ER_BAD_FIELD_ERROR
SELECT
innodb_use_native_aio
=
@@
SESSION
.
innodb_use_native_aio
;
--
echo
Expected
error
'Readonly variable'
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