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
a346ff35
Commit
a346ff35
authored
Feb 27, 2020
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup trailing ws
parent
127fee99
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
19 deletions
+19
-19
mysql-test/main/func_misc.result
mysql-test/main/func_misc.result
+7
-7
mysql-test/main/func_misc.test
mysql-test/main/func_misc.test
+11
-11
sql/item_func.h
sql/item_func.h
+1
-1
No files found.
mysql-test/main/func_misc.result
View file @
a346ff35
...
...
@@ -1642,8 +1642,8 @@ DROP TABLE t1;
# End of 10.4 tests
#
#
# MDEV-10569 Add RELEASE_ALL_LOCKS SQL-function
#
# MDEV-10569 Add RELEASE_ALL_LOCKS SQL-function
#
# Test function without any locks
SELECT RELEASE_ALL_LOCKS();
RELEASE_ALL_LOCKS()
...
...
@@ -1655,7 +1655,7 @@ GET_LOCK('l1',10)
SELECT RELEASE_ALL_LOCKS();
RELEASE_ALL_LOCKS()
1
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA
FROM information_schema.metadata_lock_info WHERE thread_id>0 ORDER BY TABLE_SCHEMA;
LOCK_MODE LOCK_TYPE TABLE_SCHEMA
# Test function with multiple locks
...
...
@@ -1676,7 +1676,7 @@ GET_LOCK('l14',10),
GET_LOCK('l15',10);
GET_LOCK('l01',10) GET_LOCK('l02',10) GET_LOCK('l03',10) GET_LOCK('l04',10) GET_LOCK('l05',10) GET_LOCK('l06',10) GET_LOCK('l07',10) GET_LOCK('l08',10) GET_LOCK('l09',10) GET_LOCK('l10',10) GET_LOCK('l11',10) GET_LOCK('l12',10) GET_LOCK('l13',10) GET_LOCK('l14',10) GET_LOCK('l15',10)
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA
FROM information_schema.metadata_lock_info WHERE thread_id>0 ORDER BY TABLE_SCHEMA;
LOCK_MODE LOCK_TYPE TABLE_SCHEMA
MDL_SHARED_NO_WRITE User lock l01
...
...
@@ -1697,7 +1697,7 @@ MDL_SHARED_NO_WRITE User lock l15
SELECT RELEASE_ALL_LOCKS();
RELEASE_ALL_LOCKS()
15
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA
FROM information_schema.metadata_lock_info WHERE thread_id>0 ORDER BY TABLE_SCHEMA;
LOCK_MODE LOCK_TYPE TABLE_SCHEMA
# Test function with recursive locks
...
...
@@ -1718,7 +1718,7 @@ GET_LOCK('l5',10),
GET_LOCK('l5',10);
GET_LOCK('l1',10) GET_LOCK('l2',10) GET_LOCK('l2',10) GET_LOCK('l3',10) GET_LOCK('l3',10) GET_LOCK('l3',10) GET_LOCK('l4',10) GET_LOCK('l4',10) GET_LOCK('l4',10) GET_LOCK('l4',10) GET_LOCK('l5',10) GET_LOCK('l5',10) GET_LOCK('l5',10) GET_LOCK('l5',10) GET_LOCK('l5',10)
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA
FROM information_schema.metadata_lock_info WHERE thread_id>0 ORDER BY TABLE_SCHEMA;
LOCK_MODE LOCK_TYPE TABLE_SCHEMA
MDL_SHARED_NO_WRITE User lock l1
...
...
@@ -1729,6 +1729,6 @@ MDL_SHARED_NO_WRITE User lock l5
SELECT RELEASE_ALL_LOCKS();
RELEASE_ALL_LOCKS()
15
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA
FROM information_schema.metadata_lock_info WHERE thread_id>0 ORDER BY TABLE_SCHEMA;
LOCK_MODE LOCK_TYPE TABLE_SCHEMA
mysql-test/main/func_misc.test
View file @
a346ff35
...
...
@@ -1280,8 +1280,8 @@ DROP TABLE t1;
--
echo
#
--
echo
#
--
echo
# MDEV-10569 Add RELEASE_ALL_LOCKS SQL-function
--
echo
#
--
echo
# MDEV-10569 Add RELEASE_ALL_LOCKS SQL-function
--
echo
#
--
echo
# Test function without any locks
SELECT
RELEASE_ALL_LOCKS
();
...
...
@@ -1289,9 +1289,9 @@ SELECT RELEASE_ALL_LOCKS();
--
echo
# Test function with one lock only
SELECT
GET_LOCK
(
'l1'
,
10
);
SELECT
RELEASE_ALL_LOCKS
();
SELECT
LOCK_MODE
,
LOCK_TYPE
,
TABLE_SCHEMA
SELECT
LOCK_MODE
,
LOCK_TYPE
,
TABLE_SCHEMA
FROM
information_schema
.
metadata_lock_info
WHERE
thread_id
>
0
ORDER
BY
TABLE_SCHEMA
;
--
echo
# Test function with multiple locks
SELECT
GET_LOCK
(
'l01'
,
10
),
GET_LOCK
(
'l02'
,
10
),
...
...
@@ -1307,11 +1307,11 @@ SELECT GET_LOCK('l01',10),
GET_LOCK
(
'l12'
,
10
),
GET_LOCK
(
'l13'
,
10
),
GET_LOCK
(
'l14'
,
10
),
GET_LOCK
(
'l15'
,
10
);
SELECT
LOCK_MODE
,
LOCK_TYPE
,
TABLE_SCHEMA
GET_LOCK
(
'l15'
,
10
);
SELECT
LOCK_MODE
,
LOCK_TYPE
,
TABLE_SCHEMA
FROM
information_schema
.
metadata_lock_info
WHERE
thread_id
>
0
ORDER
BY
TABLE_SCHEMA
;
SELECT
RELEASE_ALL_LOCKS
();
SELECT
LOCK_MODE
,
LOCK_TYPE
,
TABLE_SCHEMA
SELECT
LOCK_MODE
,
LOCK_TYPE
,
TABLE_SCHEMA
FROM
information_schema
.
metadata_lock_info
WHERE
thread_id
>
0
ORDER
BY
TABLE_SCHEMA
;
--
echo
# Test function with recursive locks
...
...
@@ -1329,9 +1329,9 @@ SELECT GET_LOCK('l1',10),
GET_LOCK
(
'l5'
,
10
),
GET_LOCK
(
'l5'
,
10
),
GET_LOCK
(
'l5'
,
10
),
GET_LOCK
(
'l5'
,
10
);
SELECT
LOCK_MODE
,
LOCK_TYPE
,
TABLE_SCHEMA
GET_LOCK
(
'l5'
,
10
);
SELECT
LOCK_MODE
,
LOCK_TYPE
,
TABLE_SCHEMA
FROM
information_schema
.
metadata_lock_info
WHERE
thread_id
>
0
ORDER
BY
TABLE_SCHEMA
;
SELECT
RELEASE_ALL_LOCKS
();
SELECT
LOCK_MODE
,
LOCK_TYPE
,
TABLE_SCHEMA
FROM
information_schema
.
metadata_lock_info
WHERE
thread_id
>
0
ORDER
BY
TABLE_SCHEMA
;
\ No newline at end of file
SELECT
LOCK_MODE
,
LOCK_TYPE
,
TABLE_SCHEMA
FROM
information_schema
.
metadata_lock_info
WHERE
thread_id
>
0
ORDER
BY
TABLE_SCHEMA
;
sql/item_func.h
View file @
a346ff35
...
...
@@ -2692,7 +2692,7 @@ class Item_func_get_lock final :public Item_func_lock
};
class
Item_func_release_all_locks
final
:
public
Item_func_lock
class
Item_func_release_all_locks
final
:
public
Item_func_lock
{
public:
Item_func_release_all_locks
(
THD
*
thd
)
:
Item_func_lock
(
thd
)
...
...
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