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
df93b4f2
Commit
df93b4f2
authored
Nov 01, 2023
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix MDEV-30820 problem found by Monty
parent
d5aff2d5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
8 deletions
+18
-8
mysql-test/main/log_slow_debug.result
mysql-test/main/log_slow_debug.result
+5
-2
mysql-test/main/log_slow_debug.test
mysql-test/main/log_slow_debug.test
+8
-3
sql/sql_class.cc
sql/sql_class.cc
+0
-2
sql/sql_class.h
sql/sql_class.h
+5
-1
No files found.
mysql-test/main/log_slow_debug.result
View file @
df93b4f2
...
...
@@ -231,15 +231,18 @@ SET @old_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL log_output= "TABLE";
SET GLOBAL slow_query_log= ON;
SET SESSION long_query_time= 0;
SET
GLOBAL
debug_dbug="+d,debug_huge_number_of_examined_rows";
SET debug_dbug="+d,debug_huge_number_of_examined_rows";
SELECT * FROM tab_MDEV_30820 ORDER BY 1;
ID A
1 0
2 0
SET
GLOBAL
debug_dbug=@old_dbug;
SET debug_dbug=@old_dbug;
SET @@long_query_time= @old_long_query_time;
SET @@global.log_output= @old_log_output;
SET @@global.slow_query_log= @old_slow_query_log;
SELECT rows_examined, sql_text from mysql.slow_log where sql_text like "SELECT%FROM tab_MDEV_30820%";
rows_examined sql_text
18446744073708551615 SELECT * FROM tab_MDEV_30820 ORDER BY 1
drop table tab_MDEV_30820;
#
# End of 10.4 test
...
...
mysql-test/main/log_slow_debug.test
View file @
df93b4f2
...
...
@@ -104,16 +104,21 @@ SET GLOBAL log_output= "TABLE";
SET
GLOBAL
slow_query_log
=
ON
;
SET
SESSION
long_query_time
=
0
;
SET
GLOBAL
debug_dbug
=
"+d,debug_huge_number_of_examined_rows"
;
SET
debug_dbug
=
"+d,debug_huge_number_of_examined_rows"
;
--
disable_ps_protocol
--
disable_view_protocol
SELECT
*
FROM
tab_MDEV_30820
ORDER
BY
1
;
SET
GLOBAL
debug_dbug
=@
old_dbug
;
--
enable_view_protocol
--
enable_ps_protocol
SET
debug_dbug
=@
old_dbug
;
## Reset to initial values
SET
@@
long_query_time
=
@
old_long_query_time
;
SET
@@
global
.
log_output
=
@
old_log_output
;
SET
@@
global
.
slow_query_log
=
@
old_slow_query_log
;
SELECT
rows_examined
,
sql_text
from
mysql
.
slow_log
where
sql_text
like
"SELECT%FROM tab_MDEV_30820%"
;
drop
table
tab_MDEV_30820
;
--
echo
#
...
...
sql/sql_class.cc
View file @
df93b4f2
...
...
@@ -5682,8 +5682,6 @@ void THD::set_examined_row_count(ha_rows count)
void
THD
::
inc_sent_row_count
(
ha_rows
count
)
{
m_sent_row_count
+=
count
;
DBUG_EXECUTE_IF
(
"debug_huge_number_of_examined_rows"
,
m_examined_row_count
=
(
ULONGLONG_MAX
-
1000000
););
MYSQL_SET_STATEMENT_ROWS_SENT
(
m_statement_psi
,
m_sent_row_count
);
}
...
...
sql/sql_class.h
View file @
df93b4f2
...
...
@@ -3013,7 +3013,11 @@ class THD: public THD_count, /* this must be first */
{
return
m_sent_row_count
;
}
ha_rows
get_examined_row_count
()
const
{
return
m_examined_row_count
;
}
{
DBUG_EXECUTE_IF
(
"debug_huge_number_of_examined_rows"
,
return
(
ULONGLONG_MAX
-
1000000
););
return
m_examined_row_count
;
}
ulonglong
get_affected_rows
()
const
{
return
affected_rows
;
}
...
...
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