Commit 0d380151 authored by Matthias Leich's avatar Matthias Leich

Merge of fixes for Bug#36874,#38427,#37744,#38762

with actual tree
......@@ -9,7 +9,9 @@ DROP DATABASE IF EXISTS federated;
CREATE DATABASE federated;
DROP DATABASE IF EXISTS federated;
CREATE DATABASE federated;
SET @OLD_CONCURRENT_INSERT= @@GLOBAL.CONCURRENT_INSERT;
SET @OLD_MASTER_CONCURRENT_INSERT= @@GLOBAL.CONCURRENT_INSERT;
SET @@GLOBAL.CONCURRENT_INSERT= 0;
SET @OLD_SLAVE_CONCURRENT_INSERT= @@GLOBAL.CONCURRENT_INSERT;
SET @@GLOBAL.CONCURRENT_INSERT= 0;
DROP TABLE IF EXISTS federated.bug_13118_table;
CREATE TABLE federated.t1 (
......@@ -51,9 +53,10 @@ id value
7 54
8 55
DROP TABLE federated.t1;
SET @@GLOBAL.CONCURRENT_INSERT= @OLD_MASTER_CONCURRENT_INSERT;
DROP TABLE federated.t1;
SET @@GLOBAL.CONCURRENT_INSERT= @OLD_SLAVE_CONCURRENT_INSERT;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
SET @@GLOBAL.CONCURRENT_INSERT= @OLD_CONCURRENT_INSERT;
SET @global_slow_launch_time = @@GLOBAL.slow_launch_time;
'#--------------------FN_DYNVARS_124_01-------------------------#'
** Connection default **
'#--------------------FN_DYNVARS_124_01-------------------------#'
SET @@GLOBAL.slow_launch_time=0;
SELECT @@GLOBAL.slow_launch_time;
@@GLOBAL.slow_launch_time
0
** Connecting conn5 using username 'root' **
** Connecting conn6 using username 'root' **
** Connecting conn7 using username 'root' **
** Connecting conn8 using username 'root' **
** Connecting conn9 using username 'root' **
** Connecting conn10 using username 'root' **
** Connecting conn11 using username 'root' **
** Connecting conn12 using username 'root' **
** Connecting conn13 using username 'root' **
** Connecting conn14 using username 'root' **
** Connecting conn15 using username 'root' **
** Connecting conn16 using username 'root' **
show status like 'slow_launch_threads';
Variable_name Value
Slow_launch_threads 12
12 Expected
** Connection default **
** Disconnecting conn5 **
** Disconnecting conn6 **
** Disconnecting conn7 **
** Disconnecting conn8 **
** Disconnecting conn9 **
** Disconnecting conn10 **
** Disconnecting conn11 **
** Disconnecting conn12 **
** Disconnecting conn13 **
** Disconnecting conn14 **
** Disconnecting conn15 **
** Disconnecting conn16 **
** Connecting conn1 using username 'root' **
** Switch to connection default and disconnect conn1 **
'#--------------------FN_DYNVARS_124_02-------------------------#'
SET @@GLOBAL.slow_launch_time= 1000;
SELECT @@GLOBAL.slow_launch_time;
@@GLOBAL.slow_launch_time
1000
** Connecting conn2 using username 'root' **
** Switch to connection default and disconnect conn2 **
SET @@GLOBAL.slow_launch_time = @global_slow_launch_time;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# suite/funcs_1/storedproc/param_check.inc
#
# Auxiliary routine to be sourced by
# suite/funcs_1/t/storedproc.test
#
# Purpose:
# The assignment of float values to objects of type DECIMAL causes
# conversions and in some cases an adjustment of the value to
# a border of the value range.
# Try to reveal that function and procedure parameters get a similar
# mangling of the value like columns.
#
# Variables to be set before sourcing this routine
# $test_value - value to be checked
#
# Created:
# 2008-08-27 mleich
#
eval UPDATE t1_aux SET f1 = NULL;
# Enforce that all user variables have the same data type and initial value.
SELECT f1,f1,f1,f1 INTO @v1_tab,@v1_proc,@v2_proc,@v1_func FROM t1_aux;
eval UPDATE t1_aux SET f1 = $test_value;
SELECT f1 INTO @v1_tab FROM t1_aux;
eval CALL sproc_1($test_value, @v1_proc);
eval SET @v1_func = func_1($test_value);
if (`SELECT @v1_tab <> @v1_proc OR @v1_tab <> @v2_proc OR @v1_tab <> @v1_func`)
{
--echo Error: @v1_tab, @v1_proc, @v2_proc, @v1_func are not all equal
SELECT @v1_tab, @v1_proc, @v2_proc, @v1_func;
}
#### suite/funcs_1/t/innodb_storedproc.test
#
# This test cannot be used for the embedded server because we check here
# privileges.
--source include/not_embedded.inc
--source include/have_innodb.inc
let $engine_type= innodb;
--source suite/funcs_1/storedproc/load_sp_tb.inc
--source suite/funcs_1/storedproc/storedproc_master.inc
#### suite/funcs_1/t/memory_storedproc.test
#
# This test cannot be used for the embedded server because we check here
# privileges.
--source include/not_embedded.inc
SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
let $engine_type= memory;
--source suite/funcs_1/storedproc/load_sp_tb.inc
--source suite/funcs_1/storedproc/storedproc_master.inc
#### suite/funcs_1/t/myisam_storedproc.test
#
# This test cannot be used for the embedded server because we check here
# privileges.
--source include/not_embedded.inc
SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
let $engine_type= myisam;
--source suite/funcs_1/storedproc/load_sp_tb.inc
--source suite/funcs_1/storedproc/storedproc_master.inc
#### suite/funcs_1/t/ndb_storedproc.test
#
# This test cannot be used for the embedded server because we check here
# privileges.
--source include/not_embedded.inc
--source include/have_ndb.inc
let $engine_type= ndb;
--source suite/funcs_1/storedproc/load_sp_tb.inc
--source suite/funcs_1/storedproc/storedproc_master.inc
......@@ -158,10 +158,16 @@ DROP VIEW IF EXISTS v1;
--disable_query_log
# Storage for the SELECTs to be used for the VIEW definition
# Attention: my_select must be no too small because a statement like
# SELECT LOAD_FILE(< file in MYSQLTEST_VARDIR >)
# AS my_col,
# id FROM t1_values';
# might be a very long
# Bug#38427 "Data too long" ... tests "<ENGINE>_func_view" fail
CREATE TABLE t1_selects
(
id BIGINT AUTO_INCREMENT,
my_select VARCHAR(200) NOT NULL,
my_select VARCHAR(1000) NOT NULL,
disable_result ENUM('Yes','No') NOT NULL default 'No',
PRIMARY KEY(id),
UNIQUE (my_select)
......
--source include/have_bug25714.inc
source include/federated.inc;
connection default;
connection master;
# Disable concurrent inserts to avoid test failures when reading
# data from concurrent connections (insert might return before
# the data is actually in the table).
SET @OLD_CONCURRENT_INSERT= @@GLOBAL.CONCURRENT_INSERT;
SET @OLD_MASTER_CONCURRENT_INSERT= @@GLOBAL.CONCURRENT_INSERT;
SET @@GLOBAL.CONCURRENT_INSERT= 0;
connection slave;
SET @OLD_SLAVE_CONCURRENT_INSERT= @@GLOBAL.CONCURRENT_INSERT;
SET @@GLOBAL.CONCURRENT_INSERT= 0;
--disable_warnings
DROP TABLE IF EXISTS federated.bug_13118_table;
--enable_warnings
......@@ -46,11 +47,12 @@ SELECT LAST_INSERT_ID();
SELECT * from federated.t1;
DROP TABLE federated.t1;
SET @@GLOBAL.CONCURRENT_INSERT= @OLD_MASTER_CONCURRENT_INSERT;
connection slave;
DROP TABLE federated.t1;
SET @@GLOBAL.CONCURRENT_INSERT= @OLD_SLAVE_CONCURRENT_INSERT;
source include/federated_cleanup.inc;
connection default;
SET @@GLOBAL.CONCURRENT_INSERT= @OLD_CONCURRENT_INSERT;
############# mysql-test\t\SLOW_LAUNCH_time_func.test ##########################
############# mysql-test\t\slow_launch_time_func.test ##########################
# #
# Variable Name: slow_launch_time #
# Variable Name: slow_launch_time #
# Scope: SESSION #
# Access Type: Dynamic #
# Data Type: NUMERIC #
......@@ -9,14 +9,20 @@
# #
# #
# Creation Date: 2008-03-02 #
# Author: Sharique Abdullah #
# Author: Sharique Abdullah #
# #
# Last change: 2008-09-09 mleich Reimplementation of this test #
# - Fix Bug#36874 : main.slow_launch_time_func test fails #
# randomly #
# - Fix other failures and streamline the test #
# #
# Description: Test Cases of Dynamic System Variable "slow_launch_time " #
# that checks behavior of this variable in the following ways #
# * Functionality based on different values #
# #
#Reference: http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#
# option_mysqld_slow_launch_time #
# Reference: #
# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html #
# option_mysqld_slow_launch_time #
# #
################################################################################
......@@ -28,82 +34,71 @@
SET @global_slow_launch_time = @@GLOBAL.slow_launch_time;
--echo ** Connection default **
connection default;
--echo '#--------------------FN_DYNVARS_124_01-------------------------#'
#####################################
# Increase number of connection #
#####################################
--echo ** Connection default **
connection default;
########################################################################
# Reveal that a new connect gets counted as "slow launched thread" if #
# @@GLOBAL.slow_launch_time = 0. #
# The value of slow_launch_threads must be increased by 1. #
########################################################################
SET @@GLOBAL.slow_launch_time=0;
SELECT @@GLOBAL.slow_launch_time;
--echo ** Connecting conn5 using username 'root' **
CONNECT (conn5,localhost,root,,);
--echo ** Connecting conn6 using username 'root' **
CONNECT (conn6,localhost,root,,);
--echo ** Connecting conn7 using username 'root' **
CONNECT (conn7,localhost,root,,);
--echo ** Connecting conn8 using username 'root' **
CONNECT (conn8,localhost,root,,);
--echo ** Connecting conn9 using username 'root' **
CONNECT (conn9,localhost,root,,);
--echo ** Connecting conn10 using username 'root' **
CONNECT (conn10,localhost,root,,);
--echo ** Connecting conn11 using username 'root' **
CONNECT (conn11,localhost,root,,);
--echo ** Connecting conn12 using username 'root' **
CONNECT (conn12,localhost,root,,);
--echo ** Connecting conn13 using username 'root' **
CONNECT (conn13,localhost,root,,);
--echo ** Connecting conn14 using username 'root' **
CONNECT (conn14,localhost,root,,);
--echo ** Connecting conn15 using username 'root' **
CONNECT (conn15,localhost,root,,);
--echo ** Connecting conn16 using username 'root' **
CONNECT (conn16,localhost,root,,);
let $value_before=
query_get_value(show status like 'slow_launch_threads', Value, 1);
--echo ** Connecting conn1 using username 'root' **
CONNECT (conn1,localhost,root,,);
let $value_after=
query_get_value(show status like 'slow_launch_threads', Value, 1);
if (!`SELECT $value_after = $value_before + 1`)
{
--echo ERROR: Subtest FN_DYNVARS_124_01 failed
--echo A new connect should be counted as 'slow_launch_thread' if
--echo @@GLOBAL.slow_launch_time=0
SELECT @@GLOBAL.slow_launch_time;
echo Number of slow_launch_threads before new connect: $value_before;
echo Number of slow_launch_threads after new connect: $value_after;
}
--echo ** Switch to connection default and disconnect conn1 **
connection default;
disconnect conn1;
--echo '#--------------------FN_DYNVARS_124_02-------------------------#'
########################################################################
# Reveal that a new connect gets not counted as "slow launched thread" #
# if @@GLOBAL.slow_launch_time is sufficient big. #
# The value of slow_launch_threads must not change. #
########################################################################
#
# Checking status of slow_launch_threads
#
SET @@GLOBAL.slow_launch_time= 1000;
SELECT @@GLOBAL.slow_launch_time;
show status like 'slow_launch_threads';
--echo 12 Expected
let $value_before=
query_get_value(show status like 'slow_launch_threads', Value, 1);
--echo ** Connecting conn2 using username 'root' **
CONNECT (conn2,localhost,root,,);
let $value_after=
query_get_value(show status like 'slow_launch_threads', Value, 1);
if (!`SELECT $value_after = $value_before`)
{
--echo ERROR: Subtest FN_DYNVARS_124_02 failed
--echo A new connect must not be counted as 'slow_launch_thread' if
--echo @@GLOBAL.slow_launch_time is sufficient big.
SELECT @@GLOBAL.slow_launch_time;
echo Number of slow_launch_threads before new connect: $value_before;
echo Number of slow_launch_threads after new connect: $value_after;
}
#
# Cleanup
#
--echo ** Connection default **
--echo ** Switch to connection default and disconnect conn2 **
connection default;
--echo ** Disconnecting conn5 **
disconnect conn5;
--echo ** Disconnecting conn6 **
disconnect conn6;
--echo ** Disconnecting conn7 **
disconnect conn7;
--echo ** Disconnecting conn8 **
disconnect conn8;
--echo ** Disconnecting conn9 **
disconnect conn9;
--echo ** Disconnecting conn10 **
disconnect conn10;
--echo ** Disconnecting conn11 **
disconnect conn11;
--echo ** Disconnecting conn12 **
disconnect conn12;
--echo ** Disconnecting conn13 **
disconnect conn13;
--echo ** Disconnecting conn14 **
disconnect conn14;
--echo ** Disconnecting conn15 **
disconnect conn15;
--echo ** Disconnecting conn16 **
disconnect conn16;
disconnect conn2;
SET @@GLOBAL.slow_launch_time = @global_slow_launch_time;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment