mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
cleanup
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
drop table if exists t1,t2;
|
|
||||||
select 1, 1.0, -1, "hello", NULL;
|
select 1, 1.0, -1, "hello", NULL;
|
||||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||||
def 1 3 1 1 N 32897 0 63
|
def 1 3 1 1 N 32897 0 63
|
||||||
@@ -222,6 +221,9 @@ def v3 v3 renamed renamed 8 12 0 Y 32896 0 63
|
|||||||
renamed
|
renamed
|
||||||
drop table t1;
|
drop table t1;
|
||||||
drop view v1,v2,v3;
|
drop view v1,v2,v3;
|
||||||
|
#
|
||||||
|
# End of 4.1 tests
|
||||||
|
#
|
||||||
select a.* from (select 2147483648 as v_large) a;
|
select a.* from (select 2147483648 as v_large) a;
|
||||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||||
def a v_large v_large 8 10 10 N 32769 0 63
|
def a v_large v_large 8 10 10 N 32769 0 63
|
||||||
@@ -301,7 +303,9 @@ def test va va f1 f1 3 11 0 Y 32768 0 63
|
|||||||
f1
|
f1
|
||||||
DROP VIEW v1;
|
DROP VIEW v1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
End of 5.0 tests
|
#
|
||||||
|
# End of 5.0 tests
|
||||||
|
#
|
||||||
create table t1(
|
create table t1(
|
||||||
# numeric types
|
# numeric types
|
||||||
bool_col bool,
|
bool_col bool,
|
||||||
@@ -802,3 +806,6 @@ t1 CREATE TABLE `t1` (
|
|||||||
`@b2:=111111111111` bigint(12) NOT NULL
|
`@b2:=111111111111` bigint(12) NOT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# End of 10.3 tests
|
||||||
|
#
|
||||||
|
@@ -4,9 +4,6 @@
|
|||||||
#View protocol gives slightly different metadata
|
#View protocol gives slightly different metadata
|
||||||
--source include/no_view_protocol.inc
|
--source include/no_view_protocol.inc
|
||||||
|
|
||||||
--disable_warnings
|
|
||||||
drop table if exists t1,t2;
|
|
||||||
--enable_warnings
|
|
||||||
--enable_metadata
|
--enable_metadata
|
||||||
# PS protocol gives slightly different metadata
|
# PS protocol gives slightly different metadata
|
||||||
--disable_ps_protocol
|
--disable_ps_protocol
|
||||||
@@ -127,7 +124,9 @@ drop table t1;
|
|||||||
drop view v1,v2,v3;
|
drop view v1,v2,v3;
|
||||||
--disable_metadata
|
--disable_metadata
|
||||||
|
|
||||||
# End of 4.1 tests
|
--echo #
|
||||||
|
--echo # End of 4.1 tests
|
||||||
|
--echo #
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug #28492: subselect returns LONG in >5.0.24a and LONGLONG in <=5.0.24a
|
# Bug #28492: subselect returns LONG in >5.0.24a and LONGLONG in <=5.0.24a
|
||||||
@@ -189,7 +188,9 @@ SELECT f1 FROM v1 va;
|
|||||||
DROP VIEW v1;
|
DROP VIEW v1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo End of 5.0 tests
|
--echo #
|
||||||
|
--echo # End of 5.0 tests
|
||||||
|
--echo #
|
||||||
|
|
||||||
# Verify that column metadata is correct for all possible data types.
|
# Verify that column metadata is correct for all possible data types.
|
||||||
# Originally about BUG#42980 "Client doesn't set NUM_FLAG for DECIMAL"
|
# Originally about BUG#42980 "Client doesn't set NUM_FLAG for DECIMAL"
|
||||||
@@ -485,3 +486,7 @@ SELECT @b1:=10, @b2:=@b2:=111111111111;
|
|||||||
CREATE TABLE t1 AS SELECT @b1:=10, @b2:=111111111111;
|
CREATE TABLE t1 AS SELECT @b1:=10, @b2:=111111111111;
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.3 tests
|
||||||
|
--echo #
|
||||||
|
@@ -22,7 +22,6 @@ call mtr.add_suppression(" '\..test.t1'");
|
|||||||
set @save_table_open_cache=@@table_open_cache;
|
set @save_table_open_cache=@@table_open_cache;
|
||||||
set global table_open_cache=256;
|
set global table_open_cache=256;
|
||||||
set global table_definition_cache=400;
|
set global table_definition_cache=400;
|
||||||
drop procedure if exists p_create;
|
|
||||||
create procedure p_create()
|
create procedure p_create()
|
||||||
begin
|
begin
|
||||||
declare i int default 1;
|
declare i int default 1;
|
||||||
@@ -44,13 +43,13 @@ end while;
|
|||||||
end|
|
end|
|
||||||
call p_create();
|
call p_create();
|
||||||
drop procedure p_create;
|
drop procedure p_create;
|
||||||
|
$lock;
|
||||||
connection default;
|
connection default;
|
||||||
#
|
#
|
||||||
# We have to disable the ps-protocol, to avoid
|
# We have to disable the ps-protocol, to avoid
|
||||||
# "Prepared statement needs to be re-prepared" errors
|
# "Prepared statement needs to be re-prepared" errors
|
||||||
# -- table def versions change all the time with full table cache.
|
# -- table def versions change all the time with full table cache.
|
||||||
#
|
#
|
||||||
drop table if exists t1, t1_mrg, t1_copy;
|
|
||||||
#
|
#
|
||||||
# Prepare a MERGE engine table, that refers to a corrupted
|
# Prepare a MERGE engine table, that refers to a corrupted
|
||||||
# child.
|
# child.
|
||||||
|
@@ -28,9 +28,6 @@ call mtr.add_suppression(" '\..test.t1'");
|
|||||||
set @save_table_open_cache=@@table_open_cache;
|
set @save_table_open_cache=@@table_open_cache;
|
||||||
set global table_open_cache=256;
|
set global table_open_cache=256;
|
||||||
set global table_definition_cache=400;
|
set global table_definition_cache=400;
|
||||||
--disable_warnings
|
|
||||||
drop procedure if exists p_create;
|
|
||||||
--enable_warnings
|
|
||||||
delimiter |;
|
delimiter |;
|
||||||
create procedure p_create()
|
create procedure p_create()
|
||||||
begin
|
begin
|
||||||
@@ -54,10 +51,9 @@ end|
|
|||||||
delimiter ;|
|
delimiter ;|
|
||||||
call p_create();
|
call p_create();
|
||||||
drop procedure p_create;
|
drop procedure p_create;
|
||||||
--disable_query_log
|
|
||||||
let $lock=`select @lock_table_stmt`;
|
let $lock=`select @lock_table_stmt`;
|
||||||
eval $lock;
|
evalp $lock;
|
||||||
--enable_query_log
|
|
||||||
connection default;
|
connection default;
|
||||||
--echo #
|
--echo #
|
||||||
--echo # We have to disable the ps-protocol, to avoid
|
--echo # We have to disable the ps-protocol, to avoid
|
||||||
@@ -65,9 +61,6 @@ connection default;
|
|||||||
--echo # -- table def versions change all the time with full table cache.
|
--echo # -- table def versions change all the time with full table cache.
|
||||||
--echo #
|
--echo #
|
||||||
--disable_ps_protocol
|
--disable_ps_protocol
|
||||||
--disable_warnings
|
|
||||||
drop table if exists t1, t1_mrg, t1_copy;
|
|
||||||
--enable_warnings
|
|
||||||
let $MYSQLD_DATADIR=`select @@datadir`;
|
let $MYSQLD_DATADIR=`select @@datadir`;
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Prepare a MERGE engine table, that refers to a corrupted
|
--echo # Prepare a MERGE engine table, that refers to a corrupted
|
||||||
@@ -151,20 +144,19 @@ select * from t2;
|
|||||||
select * from t1;
|
select * from t1;
|
||||||
|
|
||||||
connect(con2, localhost, root);
|
connect(con2, localhost, root);
|
||||||
--SEND ALTER TABLE t2 ADD val INT
|
--send ALTER TABLE t2 ADD val INT
|
||||||
|
|
||||||
connection default;
|
connection default;
|
||||||
--echo # With fix we should have alter table waiting for t2 lock here.
|
--echo # With fix we should have alter table waiting for t2 lock here.
|
||||||
let $wait_condition=
|
let $wait_condition=
|
||||||
SELECT count(*) = 1 FROM information_schema.processlist WHERE state
|
SELECT count(*) = 1 FROM information_schema.processlist WHERE state
|
||||||
LIKE "Waiting%" AND info = "ALTER TABLE t2 ADD val INT";
|
LIKE "Waiting%" AND info = "ALTER TABLE t2 ADD val INT";
|
||||||
|
|
||||||
--source include/wait_condition.inc
|
--source include/wait_condition.inc
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
SET autocommit = 1;
|
SET autocommit = 1;
|
||||||
|
|
||||||
connection con2;
|
connection con2;
|
||||||
--REAP
|
--reap
|
||||||
|
|
||||||
connection default;
|
connection default;
|
||||||
disconnect con2;
|
disconnect con2;
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
drop database if exists mysqltest1;
|
|
||||||
create schema foo;
|
create schema foo;
|
||||||
show create schema foo;
|
show create schema foo;
|
||||||
Database Create Database
|
Database Create Database
|
||||||
@@ -15,7 +14,6 @@ drop schema foo;
|
|||||||
#
|
#
|
||||||
# Bug #48940 MDL deadlocks against mysql_rm_db
|
# Bug #48940 MDL deadlocks against mysql_rm_db
|
||||||
#
|
#
|
||||||
DROP SCHEMA IF EXISTS schema1;
|
|
||||||
connect con2, localhost, root;
|
connect con2, localhost, root;
|
||||||
connection default;
|
connection default;
|
||||||
CREATE SCHEMA schema1;
|
CREATE SCHEMA schema1;
|
||||||
@@ -34,7 +32,6 @@ disconnect con2;
|
|||||||
#
|
#
|
||||||
# Bug #49988 MDL deadlocks with mysql_create_db, reload_acl_and_cache
|
# Bug #49988 MDL deadlocks with mysql_create_db, reload_acl_and_cache
|
||||||
#
|
#
|
||||||
DROP SCHEMA IF EXISTS schema1;
|
|
||||||
connect con2, localhost, root;
|
connect con2, localhost, root;
|
||||||
connection default;
|
connection default;
|
||||||
CREATE SCHEMA schema1;
|
CREATE SCHEMA schema1;
|
||||||
@@ -77,8 +74,6 @@ disconnect con2;
|
|||||||
# Tests for increased CREATE/ALTER/DROP DATABASE concurrency with
|
# Tests for increased CREATE/ALTER/DROP DATABASE concurrency with
|
||||||
# database name locks.
|
# database name locks.
|
||||||
#
|
#
|
||||||
DROP DATABASE IF EXISTS db1;
|
|
||||||
DROP DATABASE IF EXISTS db2;
|
|
||||||
connect con2, localhost, root;
|
connect con2, localhost, root;
|
||||||
connect con3, localhost, root;
|
connect con3, localhost, root;
|
||||||
connection default;
|
connection default;
|
||||||
|
@@ -8,10 +8,6 @@
|
|||||||
--source include/count_sessions.inc
|
--source include/count_sessions.inc
|
||||||
--source include/default_charset.inc
|
--source include/default_charset.inc
|
||||||
|
|
||||||
--disable_warnings
|
|
||||||
drop database if exists mysqltest1;
|
|
||||||
--enable_warnings
|
|
||||||
|
|
||||||
create schema foo;
|
create schema foo;
|
||||||
show create schema foo;
|
show create schema foo;
|
||||||
show schemas;
|
show schemas;
|
||||||
@@ -22,10 +18,6 @@ drop schema foo;
|
|||||||
--echo # Bug #48940 MDL deadlocks against mysql_rm_db
|
--echo # Bug #48940 MDL deadlocks against mysql_rm_db
|
||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
--disable_warnings
|
|
||||||
DROP SCHEMA IF EXISTS schema1;
|
|
||||||
--enable_warnings
|
|
||||||
|
|
||||||
connect(con2, localhost, root);
|
connect(con2, localhost, root);
|
||||||
|
|
||||||
connection default;
|
connection default;
|
||||||
@@ -61,10 +53,6 @@ disconnect con2;
|
|||||||
--echo # Bug #49988 MDL deadlocks with mysql_create_db, reload_acl_and_cache
|
--echo # Bug #49988 MDL deadlocks with mysql_create_db, reload_acl_and_cache
|
||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
--disable_warnings
|
|
||||||
DROP SCHEMA IF EXISTS schema1;
|
|
||||||
--enable_warnings
|
|
||||||
|
|
||||||
connect (con2, localhost, root);
|
connect (con2, localhost, root);
|
||||||
|
|
||||||
connection default;
|
connection default;
|
||||||
@@ -134,11 +122,6 @@ disconnect con2;
|
|||||||
--echo # database name locks.
|
--echo # database name locks.
|
||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
--disable_warnings
|
|
||||||
DROP DATABASE IF EXISTS db1;
|
|
||||||
DROP DATABASE IF EXISTS db2;
|
|
||||||
--enable_warnings
|
|
||||||
|
|
||||||
connect (con2, localhost, root);
|
connect (con2, localhost, root);
|
||||||
connect (con3, localhost, root);
|
connect (con3, localhost, root);
|
||||||
|
|
||||||
|
@@ -13,12 +13,6 @@
|
|||||||
# Start a transaction, create a savepoint,
|
# Start a transaction, create a savepoint,
|
||||||
# then call a DDL operation on a procedure, and then check
|
# then call a DDL operation on a procedure, and then check
|
||||||
# that the savepoint is no longer present.
|
# that the savepoint is no longer present.
|
||||||
drop table if exists t1;
|
|
||||||
drop procedure if exists p1;
|
|
||||||
drop procedure if exists p2;
|
|
||||||
drop procedure if exists p3;
|
|
||||||
drop procedure if exists p4;
|
|
||||||
drop function if exists f1;
|
|
||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
#
|
#
|
||||||
# Test 'CREATE PROCEDURE'.
|
# Test 'CREATE PROCEDURE'.
|
||||||
@@ -744,8 +738,6 @@ DROP PROCEDURE p1;
|
|||||||
# Bug#57663 Concurrent statement using stored function and DROP DATABASE
|
# Bug#57663 Concurrent statement using stored function and DROP DATABASE
|
||||||
# breaks SBR
|
# breaks SBR
|
||||||
#
|
#
|
||||||
DROP DATABASE IF EXISTS db1;
|
|
||||||
DROP FUNCTION IF EXISTS f1;
|
|
||||||
connect con1, localhost, root;
|
connect con1, localhost, root;
|
||||||
connect con2, localhost, root;
|
connect con2, localhost, root;
|
||||||
# Test 1: Check that DROP DATABASE block if a function is used
|
# Test 1: Check that DROP DATABASE block if a function is used
|
||||||
|
@@ -23,14 +23,6 @@
|
|||||||
# Tests will be skipped for the view protocol
|
# Tests will be skipped for the view protocol
|
||||||
-- source include/no_view_protocol.inc
|
-- source include/no_view_protocol.inc
|
||||||
|
|
||||||
--disable_warnings
|
|
||||||
drop table if exists t1;
|
|
||||||
drop procedure if exists p1;
|
|
||||||
drop procedure if exists p2;
|
|
||||||
drop procedure if exists p3;
|
|
||||||
drop procedure if exists p4;
|
|
||||||
drop function if exists f1;
|
|
||||||
--enable_warnings
|
|
||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Test 'CREATE PROCEDURE'.
|
--echo # Test 'CREATE PROCEDURE'.
|
||||||
@@ -861,11 +853,6 @@ DROP PROCEDURE p1;
|
|||||||
--echo # breaks SBR
|
--echo # breaks SBR
|
||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
--disable_warnings
|
|
||||||
DROP DATABASE IF EXISTS db1;
|
|
||||||
DROP FUNCTION IF EXISTS f1;
|
|
||||||
--enable_warnings
|
|
||||||
|
|
||||||
connect(con1, localhost, root);
|
connect(con1, localhost, root);
|
||||||
connect(con2, localhost, root);
|
connect(con2, localhost, root);
|
||||||
|
|
||||||
|
@@ -245,6 +245,12 @@ const char *dbug_print_mdl(MDL_ticket *mdl_ticket)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const char *dbug_print(MDL_ticket *mdl_ticket)
|
||||||
|
{
|
||||||
|
return dbug_print_mdl(mdl_ticket);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static int mdl_dbug_print_lock(MDL_ticket *mdl_ticket, void *arg, bool granted)
|
static int mdl_dbug_print_lock(MDL_ticket *mdl_ticket, void *arg, bool granted)
|
||||||
{
|
{
|
||||||
String *tmp= (String*) arg;
|
String *tmp= (String*) arg;
|
||||||
@@ -259,6 +265,7 @@ static int mdl_dbug_print_lock(MDL_ticket *mdl_ticket, void *arg, bool granted)
|
|||||||
const char *mdl_dbug_print_locks()
|
const char *mdl_dbug_print_locks()
|
||||||
{
|
{
|
||||||
thread_local String tmp;
|
thread_local String tmp;
|
||||||
|
tmp.length(0);
|
||||||
mdl_iterate(mdl_dbug_print_lock, (void*) &tmp);
|
mdl_iterate(mdl_dbug_print_lock, (void*) &tmp);
|
||||||
return tmp.c_ptr();
|
return tmp.c_ptr();
|
||||||
}
|
}
|
||||||
|
@@ -4695,8 +4695,7 @@ public:
|
|||||||
/* Relesae transactional locks if there are no active transactions */
|
/* Relesae transactional locks if there are no active transactions */
|
||||||
void release_transactional_locks()
|
void release_transactional_locks()
|
||||||
{
|
{
|
||||||
if (!(server_status &
|
if (!in_active_multi_stmt_transaction())
|
||||||
(SERVER_STATUS_IN_TRANS | SERVER_STATUS_IN_TRANS_READONLY)))
|
|
||||||
mdl_context.release_transactional_locks(this);
|
mdl_context.release_transactional_locks(this);
|
||||||
}
|
}
|
||||||
int decide_logging_format(TABLE_LIST *tables);
|
int decide_logging_format(TABLE_LIST *tables);
|
||||||
|
Reference in New Issue
Block a user