Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
Practical-Cryptdb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhaozhen
Practical-Cryptdb
Commits
793fa1ca
Commit
793fa1ca
authored
Mar 01, 2018
by
yiwenshao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add more to test_parser_helper
parent
3fe08428
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
+44
-0
showselect_lex.cc
test_parser_helper/showselect_lex.cc
+43
-0
reuse.hh
wrapper/reuse.hh
+1
-0
No files found.
test_parser_helper/showselect_lex.cc
View file @
793fa1ca
...
@@ -2,15 +2,58 @@
...
@@ -2,15 +2,58 @@
#include "test_parser_helper/showselect_lex.hh"
#include "test_parser_helper/showselect_lex.hh"
#include "test_parser_helper/showparser.hh"
#include "test_parser_helper/showparser.hh"
#include "test_parser_helper/showitem.hh"
#include "test_parser_helper/showitem.hh"
static
void
show_table_joins_and_derived
(
const
List
<
TABLE_LIST
>
&
tll
)
{
List_iterator
<
TABLE_LIST
>
join_it
=
List_iterator
<
TABLE_LIST
>
(
const_cast
<
List
<
TABLE_LIST
>
&>
(
tll
));
while
(
1
)
{
const
TABLE_LIST
*
const
t
=
join_it
++
;
if
(
!
t
)
break
;
if
(
t
->
nested_join
)
{
show_table_joins_and_derived
(
t
->
nested_join
->
join_list
);
}
if
(
t
->
on_expr
)
{
}
if
(
t
->
derived
)
{
}
}
}
static
void
show_table_aliases
(
const
List
<
TABLE_LIST
>
&
tll
)
{
List_iterator
<
TABLE_LIST
>
join_it
=
List_iterator
<
TABLE_LIST
>
(
const_cast
<
List
<
TABLE_LIST
>
&>
(
tll
));
while
(
1
)
{
const
TABLE_LIST
*
const
t
=
join_it
++
;
if
(
!
t
)
break
;
if
(
t
->
is_alias
)
{
std
::
cout
<<
t
->
db
<<
","
<<
t
->
table_name
<<
","
<<
t
->
alias
<<
std
::
endl
;
}
if
(
t
->
nested_join
)
{
show_table_aliases
(
t
->
nested_join
->
join_list
);
return
;
}
}
}
//select_lex.top_join_list
void
void
show_table_list
(
const
List
<
TABLE_LIST
>
&
tll
)
{
show_table_list
(
const
List
<
TABLE_LIST
>
&
tll
)
{
//alias or nested join
//alias or nested join
show_table_aliases
(
tll
);
show_table_joins_and_derived
(
tll
);
}
}
void
void
show_select_lex
(
const
st_select_lex
&
select_lex
)
{
show_select_lex
(
const
st_select_lex
&
select_lex
)
{
//table list
show_table_list
(
select_lex
.
top_join_list
);
show_table_list
(
select_lex
.
top_join_list
);
//item list
auto
item_it
=
auto
item_it
=
List_iterator
<
Item
>
(
const_cast
<
List
<
Item
>
&>
(
select_lex
.
item_list
));
List_iterator
<
Item
>
(
const_cast
<
List
<
Item
>
&>
(
select_lex
.
item_list
));
for
(;;)
{
for
(;;)
{
...
...
wrapper/reuse.hh
View file @
793fa1ca
...
@@ -249,3 +249,4 @@ void
...
@@ -249,3 +249,4 @@ void
loadFileNoEscapeLimitCount
(
std
::
string
filename
,
loadFileNoEscapeLimitCount
(
std
::
string
filename
,
std
::
vector
<
std
::
string
>
&
res
,
int
limit
);
std
::
vector
<
std
::
string
>
&
res
,
int
limit
);
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