mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
67 lines
3 KiB
Text
67 lines
3 KiB
Text
|
############## mysql-test\t\default_week_format_func.test #####################
|
||
|
# #
|
||
|
# Variable Name: default_week_format #
|
||
|
# Scope: GLOBAL & SESSION #
|
||
|
# Access Type: Dynamic #
|
||
|
# Data Type: Numeric #
|
||
|
# Default Value: 0 #
|
||
|
# Range: 0 - 7 #
|
||
|
# #
|
||
|
# #
|
||
|
# Creation Date: 2008-03-07 #
|
||
|
# Author: Salman Rawala #
|
||
|
# #
|
||
|
# Description: Test Cases of Dynamic System Variable "default_week_format" #
|
||
|
# that checks functionality of this variable #
|
||
|
# #
|
||
|
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
|
||
|
# server-system-variables.html#option_mysqld_default_week_format #
|
||
|
# #
|
||
|
################################################################################
|
||
|
|
||
|
--echo '#--------------------FN_DYNVARS_022_01-------------------------#'
|
||
|
####################################################################
|
||
|
# Verifying different values of default_week_format
|
||
|
####################################################################
|
||
|
|
||
|
--echo ## Setting variable's value to 0 ##
|
||
|
SET @@session.default_week_format = 0;
|
||
|
SELECT @@session.default_week_format;
|
||
|
SELECT WEEK('2008-01-20');
|
||
|
|
||
|
--echo ## Setting variable's value to 1 ##
|
||
|
SET @@session.default_week_format = 1;
|
||
|
SELECT @@session.default_week_format;
|
||
|
SELECT WEEK('2008-01-20');
|
||
|
|
||
|
--echo ## Setting variable's value to 2 ##
|
||
|
SET @@session.default_week_format = 2;
|
||
|
SELECT @@session.default_week_format;
|
||
|
SELECT WEEK('2008-01-20');
|
||
|
|
||
|
--echo ## Setting variable's value to 3 ##
|
||
|
SET @@session.default_week_format = 3;
|
||
|
SELECT @@session.default_week_format;
|
||
|
SELECT WEEK('2008-01-20');
|
||
|
|
||
|
--echo ## Setting variable's value to 4 ##
|
||
|
SET @@session.default_week_format = 4;
|
||
|
SELECT @@session.default_week_format;
|
||
|
SELECT WEEK('2008-01-20');
|
||
|
|
||
|
--echo ## Setting variable's value to 5 ##
|
||
|
SET @@session.default_week_format = 5;
|
||
|
SELECT @@session.default_week_format;
|
||
|
SELECT WEEK('2008-01-20');
|
||
|
|
||
|
--echo ## Setting variable's value to 6 ##
|
||
|
SET @@session.default_week_format = 6;
|
||
|
SELECT @@session.default_week_format;
|
||
|
SELECT WEEK('2008-01-20');
|
||
|
|
||
|
--echo ## Setting variable's value to 7 ##
|
||
|
SET @@session.default_week_format = 7;
|
||
|
SELECT @@session.default_week_format;
|
||
|
SELECT WEEK('2008-01-20');
|
||
|
|