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
f293b2b2
Commit
f293b2b2
authored
Oct 16, 2023
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
parent
e46ae592
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
32 additions
and
66 deletions
+32
-66
mysql-test/main/metadata.result
mysql-test/main/metadata.result
+9
-2
mysql-test/main/metadata.test
mysql-test/main/metadata.test
+10
-5
mysql-test/main/myisam_recover.result
mysql-test/main/myisam_recover.result
+1
-2
mysql-test/main/myisam_recover.test
mysql-test/main/myisam_recover.test
+4
-12
mysql-test/main/schema.result
mysql-test/main/schema.result
+0
-5
mysql-test/main/schema.test
mysql-test/main/schema.test
+0
-17
mysql-test/main/sp-lock.result
mysql-test/main/sp-lock.result
+0
-8
mysql-test/main/sp-lock.test
mysql-test/main/sp-lock.test
+0
-13
sql/mdl.cc
sql/mdl.cc
+7
-0
sql/sql_class.h
sql/sql_class.h
+1
-2
No files found.
mysql-test/main/metadata.result
View file @
f293b2b2
drop table if exists t1,t2;
select 1, 1.0, -1, "hello", NULL;
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
...
...
@@ -222,6 +221,9 @@ def v3 v3 renamed renamed 8 12 0 Y 32896 0 63
renamed
drop table t1;
drop view v1,v2,v3;
#
# End of 4.1 tests
#
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
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
DROP VIEW v1;
DROP TABLE t1;
End of 5.0 tests
#
# End of 5.0 tests
#
create table t1(
# numeric types
bool_col bool,
...
...
@@ -802,3 +806,6 @@ t1 CREATE TABLE `t1` (
`@b2:=111111111111` bigint(12) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
#
# End of 10.3 tests
#
mysql-test/main/metadata.test
View file @
f293b2b2
...
...
@@ -4,9 +4,6 @@
#View protocol gives slightly different metadata
--
source
include
/
no_view_protocol
.
inc
--
disable_warnings
drop
table
if
exists
t1
,
t2
;
--
enable_warnings
--
enable_metadata
# PS protocol gives slightly different metadata
--
disable_ps_protocol
...
...
@@ -127,7 +124,9 @@ drop table t1;
drop
view
v1
,
v2
,
v3
;
--
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
...
...
@@ -189,7 +188,9 @@ SELECT f1 FROM v1 va;
DROP
VIEW
v1
;
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.
# 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
;
SHOW
CREATE
TABLE
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# End of 10.3 tests
--
echo
#
mysql-test/main/myisam_recover.result
View file @
f293b2b2
...
...
@@ -22,7 +22,6 @@ call mtr.add_suppression(" '\..test.t1'");
set @save_table_open_cache=@@table_open_cache;
set global table_open_cache=256;
set global table_definition_cache=400;
drop procedure if exists p_create;
create procedure p_create()
begin
declare i int default 1;
...
...
@@ -44,13 +43,13 @@ end while;
end|
call p_create();
drop procedure p_create;
$lock;
connection default;
#
# We have to disable the ps-protocol, to avoid
# "Prepared statement needs to be re-prepared" errors
# -- 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
# child.
...
...
mysql-test/main/myisam_recover.test
View file @
f293b2b2
...
...
@@ -28,9 +28,6 @@ call mtr.add_suppression(" '\..test.t1'");
set
@
save_table_open_cache
=@@
table_open_cache
;
set
global
table_open_cache
=
256
;
set
global
table_definition_cache
=
400
;
--
disable_warnings
drop
procedure
if
exists
p_create
;
--
enable_warnings
delimiter
|
;
create
procedure
p_create
()
begin
...
...
@@ -54,10 +51,9 @@ end|
delimiter
;
|
call
p_create
();
drop
procedure
p_create
;
--
disable_query_log
let
$lock
=
`select @lock_table_stmt`
;
eval
$lock
;
--
enable_query_log
eval
p
$lock
;
connection
default
;
--
echo
#
--
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
#
--
disable_ps_protocol
--
disable_warnings
drop
table
if
exists
t1
,
t1_mrg
,
t1_copy
;
--
enable_warnings
let
$MYSQLD_DATADIR
=
`select @@datadir`
;
--
echo
#
--
echo
# Prepare a MERGE engine table, that refers to a corrupted
...
...
@@ -151,20 +144,19 @@ select * from t2;
select
*
from
t1
;
connect
(
con2
,
localhost
,
root
);
--
SEND
ALTER
TABLE
t2
ADD
val
INT
--
send
ALTER
TABLE
t2
ADD
val
INT
connection
default
;
--
echo
# With fix we should have alter table waiting for t2 lock here.
let
$wait_condition
=
SELECT
count
(
*
)
=
1
FROM
information_schema
.
processlist
WHERE
state
LIKE
"Waiting%"
AND
info
=
"ALTER TABLE t2 ADD val INT"
;
--
source
include
/
wait_condition
.
inc
ROLLBACK
;
SET
autocommit
=
1
;
connection
con2
;
--
REAP
--
reap
connection
default
;
disconnect
con2
;
...
...
mysql-test/main/schema.result
View file @
f293b2b2
drop database if exists mysqltest1;
create schema foo;
show create schema foo;
Database Create Database
...
...
@@ -15,7 +14,6 @@ drop schema foo;
#
# Bug #48940 MDL deadlocks against mysql_rm_db
#
DROP SCHEMA IF EXISTS schema1;
connect con2, localhost, root;
connection default;
CREATE SCHEMA schema1;
...
...
@@ -34,7 +32,6 @@ disconnect con2;
#
# Bug #49988 MDL deadlocks with mysql_create_db, reload_acl_and_cache
#
DROP SCHEMA IF EXISTS schema1;
connect con2, localhost, root;
connection default;
CREATE SCHEMA schema1;
...
...
@@ -77,8 +74,6 @@ disconnect con2;
# Tests for increased CREATE/ALTER/DROP DATABASE concurrency with
# database name locks.
#
DROP DATABASE IF EXISTS db1;
DROP DATABASE IF EXISTS db2;
connect con2, localhost, root;
connect con3, localhost, root;
connection default;
...
...
mysql-test/main/schema.test
View file @
f293b2b2
...
...
@@ -8,10 +8,6 @@
--
source
include
/
count_sessions
.
inc
--
source
include
/
default_charset
.
inc
--
disable_warnings
drop
database
if
exists
mysqltest1
;
--
enable_warnings
create
schema
foo
;
show
create
schema
foo
;
show
schemas
;
...
...
@@ -22,10 +18,6 @@ drop schema foo;
--
echo
# Bug #48940 MDL deadlocks against mysql_rm_db
--
echo
#
--
disable_warnings
DROP
SCHEMA
IF
EXISTS
schema1
;
--
enable_warnings
connect
(
con2
,
localhost
,
root
);
connection
default
;
...
...
@@ -61,10 +53,6 @@ disconnect con2;
--
echo
# Bug #49988 MDL deadlocks with mysql_create_db, reload_acl_and_cache
--
echo
#
--
disable_warnings
DROP
SCHEMA
IF
EXISTS
schema1
;
--
enable_warnings
connect
(
con2
,
localhost
,
root
);
connection
default
;
...
...
@@ -134,11 +122,6 @@ disconnect con2;
--
echo
# database name locks.
--
echo
#
--
disable_warnings
DROP
DATABASE
IF
EXISTS
db1
;
DROP
DATABASE
IF
EXISTS
db2
;
--
enable_warnings
connect
(
con2
,
localhost
,
root
);
connect
(
con3
,
localhost
,
root
);
...
...
mysql-test/main/sp-lock.result
View file @
f293b2b2
...
...
@@ -13,12 +13,6 @@
# Start a transaction, create a savepoint,
# then call a DDL operation on a procedure, and then check
# 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);
#
# Test 'CREATE PROCEDURE'.
...
...
@@ -744,8 +738,6 @@ DROP PROCEDURE p1;
# Bug#57663 Concurrent statement using stored function and DROP DATABASE
# breaks SBR
#
DROP DATABASE IF EXISTS db1;
DROP FUNCTION IF EXISTS f1;
connect con1, localhost, root;
connect con2, localhost, root;
# Test 1: Check that DROP DATABASE block if a function is used
...
...
mysql-test/main/sp-lock.test
View file @
f293b2b2
...
...
@@ -23,14 +23,6 @@
# Tests will be skipped for the view protocol
--
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
);
--
echo
#
--
echo
# Test 'CREATE PROCEDURE'.
...
...
@@ -861,11 +853,6 @@ DROP PROCEDURE p1;
--
echo
# breaks SBR
--
echo
#
--
disable_warnings
DROP
DATABASE
IF
EXISTS
db1
;
DROP
FUNCTION
IF
EXISTS
f1
;
--
enable_warnings
connect
(
con1
,
localhost
,
root
);
connect
(
con2
,
localhost
,
root
);
...
...
sql/mdl.cc
View file @
f293b2b2
...
...
@@ -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
)
{
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
()
{
thread_local
String
tmp
;
tmp
.
length
(
0
);
mdl_iterate
(
mdl_dbug_print_lock
,
(
void
*
)
&
tmp
);
return
tmp
.
c_ptr
();
}
...
...
sql/sql_class.h
View file @
f293b2b2
...
...
@@ -4695,8 +4695,7 @@ class THD: public THD_count, /* this must be first */
/* Relesae transactional locks if there are no active transactions */
void
release_transactional_locks
()
{
if
(
!
(
server_status
&
(
SERVER_STATUS_IN_TRANS
|
SERVER_STATUS_IN_TRANS_READONLY
)))
if
(
!
in_active_multi_stmt_transaction
())
mdl_context
.
release_transactional_locks
(
this
);
}
int
decide_logging_format
(
TABLE_LIST
*
tables
);
...
...
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