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
7b957316
Commit
7b957316
authored
Apr 07, 2022
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.3 into 10.4
parents
cbdf62ae
3c99a48d
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
508 additions
and
1 deletion
+508
-1
mysql-test/main/keywords.result
mysql-test/main/keywords.result
+421
-0
mysql-test/main/keywords.test
mysql-test/main/keywords.test
+77
-0
storage/innobase/ibuf/ibuf0ibuf.cc
storage/innobase/ibuf/ibuf0ibuf.cc
+10
-1
No files found.
mysql-test/main/keywords.result
View file @
7b957316
This diff is collapsed.
Click to expand it.
mysql-test/main/keywords.test
View file @
7b957316
...
...
@@ -295,3 +295,80 @@ BEGIN NOT ATOMIC
END
$$
DELIMITER
;
$$
--
echo
#
--
echo
# Testing various keywords in various contexts
--
echo
#
DELIMITER
$$
;
CREATE
PROCEDURE
p1
(
query
TEXT
,
var
TEXT
)
BEGIN
DECLARE
errmsg
TEXT
DEFAULT
''
;
DECLARE
CONTINUE
HANDLER
FOR
SQLEXCEPTION
BEGIN
GET
DIAGNOSTICS
CONDITION
1
errmsg
=
MESSAGE_TEXT
;
SET
errmsg
=
REPLACE
(
errmsg
,
'You have an error in your SQL '
,
'..'
);
SET
errmsg
=
REPLACE
(
errmsg
,
'; check the manual that corresponds to your MariaDB server version for the right syntax to use'
,
'..'
);
END
;
SET
query
=
REPLACE
(
query
,
'$(VAR)'
,
var
);
EXECUTE
IMMEDIATE
query
;
SELECT
CONCAT
(
query
,
'; -- '
,
LEFT
(
COALESCE
(
errmsg
,
''
),
40
))
AS
`--------`
;
END
;
$$
CREATE
PROCEDURE
p2
(
query
TEXT
)
BEGIN
FOR
row
IN
(
SELECT
word
FROM
t1
ORDER
BY
category
,
word
)
DO
CALL
p1
(
query
,
row
.
word
);
END
FOR
;
END
;
$$
DELIMITER
;
$$
CREATE
TABLE
t1
(
word
TEXT
,
category
TEXT
);
INSERT
INTO
t1
VALUES
(
'non_keyword'
,
'00 Simple identifier'
);
INSERT
INTO
t1
VALUES
(
'lpad'
,
'01 Built-in native function'
);
INSERT
INTO
t1
VALUES
(
'rpad'
,
'01 Built-in native function'
);
INSERT
INTO
t1
VALUES
(
'adddate'
,
'02 function_call_nonkeyword'
);
INSERT
INTO
t1
VALUES
(
'substr'
,
'02 function_call_nonkeyword'
);
INSERT
INTO
t1
VALUES
(
'substring'
,
'02 function_call_nonkeyword'
);
INSERT
INTO
t1
VALUES
(
'trim_oracle'
,
'02 function_call_nonkeyword'
);
INSERT
INTO
t1
VALUES
(
'ascii'
,
'03 function_call_conflict'
);
INSERT
INTO
t1
VALUES
(
'replace'
,
'03 function_call_conflict'
);
INSERT
INTO
t1
VALUES
(
'weight_string'
,
'03 function_call_conflict'
);
INSERT
INTO
t1
VALUES
(
'char'
,
'04 function_call_keyword'
);
INSERT
INTO
t1
VALUES
(
'trim'
,
'04 function_call_keyword'
);
INSERT
INTO
t1
VALUES
(
'year'
,
'04 function_call_keyword'
);
INSERT
INTO
t1
VALUES
(
'create'
,
'05 Reserved keyword'
);
CALL
p2
(
'SELECT @@$(VAR)'
);
CALL
p2
(
'SELECT @@global.$(VAR)'
);
CALL
p2
(
'SELECT @@global.$(VAR)()'
);
CALL
p2
(
'SELECT $(VAR)()'
);
CALL
p2
(
'SELECT test.$(VAR)()'
);
CALL
p2
(
'SELECT $(VAR) FROM t1'
);
CALL
p2
(
'SELECT t1.$(VAR) FROM t1'
);
CALL
p2
(
'DROP TABLE $(VAR)'
);
CALL
p2
(
'DROP TABLE test.$(VAR)'
);
CALL
p2
(
'CREATE FUNCTION $(VAR)() RETURNS OOPS'
);
CALL
p2
(
'CREATE FUNCTION test.$(VAR)() RETURNS OOPS'
);
CALL
p2
(
'DROP FUNCTION $(VAR)'
);
CALL
p2
(
'DROP FUNCTION test.$(VAR)'
);
DROP
TABLE
t1
;
DROP
PROCEDURE
p1
;
DROP
PROCEDURE
p2
;
storage/innobase/ibuf/ibuf0ibuf.cc
View file @
7b957316
/*****************************************************************************
Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2016, 202
1
, MariaDB Corporation.
Copyright (c) 2016, 202
2
, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -27,6 +27,11 @@ Created 7/19/1997 Heikki Tuuri
#include "ibuf0ibuf.h"
#include "sync0sync.h"
#include "btr0sea.h"
#ifdef WITH_WSREP
extern
Atomic_relaxed
<
bool
>
wsrep_sst_disable_writes
;
#else
constexpr
bool
wsrep_sst_disable_writes
=
false
;
#endif
using
st_
::
span
;
...
...
@@ -2605,6 +2610,10 @@ ibuf_merge_in_background(
}
#endif
/* UNIV_DEBUG || UNIV_IBUF_DEBUG */
if
(
wsrep_sst_disable_writes
)
{
return
(
0
);
}
if
(
full
)
{
/* Caller has requested a full batch */
n_pages
=
PCT_IO
(
100
);
...
...
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