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
9810d5ea
Commit
9810d5ea
authored
Sep 11, 2016
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Helper function for debugging.
parent
1168e2fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
1 deletion
+45
-1
sql/item.cc
sql/item.cc
+45
-1
No files found.
sql/item.cc
View file @
9810d5ea
...
...
@@ -10126,7 +10126,7 @@ table_map Item_ref_null_helper::used_tables() const
#ifndef DBUG_OFF
/* Debugger help function */
static
char
dbug_item_print_buf
[
2
56
];
static
char
dbug_item_print_buf
[
2
048
];
const
char
*
dbug_print_item
(
Item
*
item
)
{
...
...
@@ -10150,6 +10150,50 @@ const char *dbug_print_item(Item *item)
return
"Couldn't fit into buffer"
;
}
const
char
*
dbug_print_select
(
SELECT_LEX
*
sl
)
{
char
*
buf
=
dbug_item_print_buf
;
String
str
(
buf
,
sizeof
(
dbug_item_print_buf
),
&
my_charset_bin
);
str
.
length
(
0
);
if
(
!
sl
)
return
"(SELECT_LEX*)NULL"
;
THD
*
thd
=
current_thd
;
ulonglong
save_option_bits
=
thd
->
variables
.
option_bits
;
thd
->
variables
.
option_bits
&=
~
OPTION_QUOTE_SHOW_CREATE
;
sl
->
print
(
thd
,
&
str
,
QT_EXPLAIN
);
thd
->
variables
.
option_bits
=
save_option_bits
;
if
(
str
.
c_ptr
()
==
buf
)
return
buf
;
else
return
"Couldn't fit into buffer"
;
}
const
char
*
dbug_print_unit
(
SELECT_LEX_UNIT
*
un
)
{
char
*
buf
=
dbug_item_print_buf
;
String
str
(
buf
,
sizeof
(
dbug_item_print_buf
),
&
my_charset_bin
);
str
.
length
(
0
);
if
(
!
un
)
return
"(SELECT_LEX_UNIT*)NULL"
;
THD
*
thd
=
current_thd
;
ulonglong
save_option_bits
=
thd
->
variables
.
option_bits
;
thd
->
variables
.
option_bits
&=
~
OPTION_QUOTE_SHOW_CREATE
;
un
->
print
(
&
str
,
QT_EXPLAIN
);
thd
->
variables
.
option_bits
=
save_option_bits
;
if
(
str
.
c_ptr
()
==
buf
)
return
buf
;
else
return
"Couldn't fit into buffer"
;
}
#endif
/*DBUG_OFF*/
...
...
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