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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
2e13a4c6
Commit
2e13a4c6
authored
Jul 24, 2013
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge
parents
a31a3716
be39bccc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
14 deletions
+12
-14
mysql-test/r/filesort_debug.result
mysql-test/r/filesort_debug.result
+1
-1
mysql-test/t/filesort_debug.test
mysql-test/t/filesort_debug.test
+1
-1
sql/sql_class.cc
sql/sql_class.cc
+10
-12
No files found.
mysql-test/r/filesort_debug.result
View file @
2e13a4c6
...
@@ -7,7 +7,7 @@ INSERT INTO t1(f1) VALUES (0),(1),(2),(3),(4),(5);
...
@@ -7,7 +7,7 @@ INSERT INTO t1(f1) VALUES (0),(1),(2),(3),(4),(5);
SET session debug_dbug= '+d,alloc_sort_buffer_fail';
SET session debug_dbug= '+d,alloc_sort_buffer_fail';
CALL mtr.add_suppression("Out of sort memory");
CALL mtr.add_suppression("Out of sort memory");
SELECT * FROM t1 ORDER BY f1 ASC, f0;
SELECT * FROM t1 ORDER BY f1 ASC, f0;
Got one of the listed errors
ERROR HY001: Out of sort memory, consider increasing server sort buffer size
SET session debug_dbug= @old_debug;
SET session debug_dbug= @old_debug;
CREATE FUNCTION f1() RETURNS INT RETURN 1;
CREATE FUNCTION f1() RETURNS INT RETURN 1;
DELETE FROM t1 ORDER BY (f1(10)) LIMIT 1;
DELETE FROM t1 ORDER BY (f1(10)) LIMIT 1;
...
...
mysql-test/t/filesort_debug.test
View file @
2e13a4c6
...
@@ -13,7 +13,7 @@ INSERT INTO t1(f1) VALUES (0),(1),(2),(3),(4),(5);
...
@@ -13,7 +13,7 @@ INSERT INTO t1(f1) VALUES (0),(1),(2),(3),(4),(5);
SET
session
debug_dbug
=
'+d,alloc_sort_buffer_fail'
;
SET
session
debug_dbug
=
'+d,alloc_sort_buffer_fail'
;
CALL
mtr
.
add_suppression
(
"Out of sort memory"
);
CALL
mtr
.
add_suppression
(
"Out of sort memory"
);
--
error
ER_OUT_OF_SORTMEMORY
,
ER_OUT_OF_RESOURCES
--
error
ER_OUT_OF_SORTMEMORY
SELECT
*
FROM
t1
ORDER
BY
f1
ASC
,
f0
;
SELECT
*
FROM
t1
ORDER
BY
f1
ASC
,
f0
;
SET
session
debug_dbug
=
@
old_debug
;
SET
session
debug_dbug
=
@
old_debug
;
...
...
sql/sql_class.cc
View file @
2e13a4c6
...
@@ -1202,18 +1202,6 @@ Sql_condition* THD::raise_condition(uint sql_errno,
...
@@ -1202,18 +1202,6 @@ Sql_condition* THD::raise_condition(uint sql_errno,
if
(
handle_condition
(
sql_errno
,
sqlstate
,
level
,
msg
,
&
cond
))
if
(
handle_condition
(
sql_errno
,
sqlstate
,
level
,
msg
,
&
cond
))
DBUG_RETURN
(
cond
);
DBUG_RETURN
(
cond
);
/*
Avoid pushing a condition for fatal out of memory errors as this will
require memory allocation and therefore might fail. Non fatal out of
memory errors can occur if raised by SIGNAL/RESIGNAL statement.
*/
if
(
!
(
is_fatal_error
&&
(
sql_errno
==
EE_OUTOFMEMORY
||
sql_errno
==
ER_OUTOFMEMORY
)))
{
cond
=
da
->
push_warning
(
this
,
sql_errno
,
sqlstate
,
level
,
msg
);
}
if
(
level
==
Sql_condition
::
WARN_LEVEL_ERROR
)
if
(
level
==
Sql_condition
::
WARN_LEVEL_ERROR
)
{
{
is_slave_error
=
1
;
// needed to catch query errors during replication
is_slave_error
=
1
;
// needed to catch query errors during replication
...
@@ -1227,6 +1215,16 @@ Sql_condition* THD::raise_condition(uint sql_errno,
...
@@ -1227,6 +1215,16 @@ Sql_condition* THD::raise_condition(uint sql_errno,
query_cache_abort
(
&
query_cache_tls
);
query_cache_abort
(
&
query_cache_tls
);
/*
Avoid pushing a condition for fatal out of memory errors as this will
require memory allocation and therefore might fail. Non fatal out of
memory errors can occur if raised by SIGNAL/RESIGNAL statement.
*/
if
(
!
(
is_fatal_error
&&
(
sql_errno
==
EE_OUTOFMEMORY
||
sql_errno
==
ER_OUTOFMEMORY
)))
{
cond
=
da
->
push_warning
(
this
,
sql_errno
,
sqlstate
,
level
,
msg
);
}
DBUG_RETURN
(
cond
);
DBUG_RETURN
(
cond
);
}
}
...
...
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