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
1b498abb
Commit
1b498abb
authored
Mar 01, 2018
by
yiwenshao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
abel to get selectlext back
parent
1aeaf744
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
18 deletions
+33
-18
select.cc
test_parser/select.cc
+2
-17
Makefrag
test_parser_helper/Makefrag
+1
-1
showstring.cc
test_parser_helper/showstring.cc
+23
-0
showstring.hh
test_parser_helper/showstring.hh
+7
-0
No files found.
test_parser/select.cc
View file @
1b498abb
...
...
@@ -11,22 +11,7 @@
#include "test_parser_helper/showparser.hh"
#include "test_parser_helper/showitem.hh"
#include "test_parser_helper/showselect_lex.hh"
/*
static
void
show_select_lex(const st_select_lex &select_lex) {
show_table_list(select_lex.top_join_list);
auto item_it =
RiboldMYSQL::constList_iterator<Item>(select_lex.item_list);
for(;;) {
const Item *const item = item_it++;
if (!item)
break;
UNUSED(item);
std::cout<<SHOW::ITEM::trans[item->type()]<<std::endl;
show_item(item);
}
}*/
#include "test_parser_helper/showstring.hh"
static
std
::
string
embeddedDir
=
"/t/cryt/shadow"
;
...
...
@@ -49,7 +34,7 @@ int main() {
LEX
*
const
lex
=
p
->
lex
();
std
::
cout
<<
SHOW
::
SQLCOM
::
trans
[
lex
->
sql_command
]
<<
std
::
endl
;
show_select_lex
(
lex
->
select_lex
);
UNUSED
(
lex
)
;
std
::
cout
<<
get_lex_string
(
*
lex
)
<<
std
::
endl
;
}
return
0
;
}
test_parser_helper/Makefrag
View file @
1b498abb
OBJDIRS += test_parser_helper
TESTPARSERHELPERSRC := filter.cc showparser.cc showitem.cc showselect_lex.cc
TESTPARSERHELPERSRC := filter.cc showparser.cc showitem.cc showselect_lex.cc
showstring.cc
all: $(OBJDIR)/libedbtest_parser_helper.so
...
...
test_parser_helper/showstring.cc
0 → 100644
View file @
1b498abb
#include "test_parser_helper/showstring.hh"
static
std
::
string
get_select_lex_unit_string
(
SELECT_LEX_UNIT
&
select_lex_unit
)
{
String
s
;
select_lex_unit
.
print
(
&
s
,
QT_ORDINARY
);
return
std
::
string
(
s
.
ptr
(),
s
.
length
());
}
std
::
string
get_lex_string
(
LEX
&
lex
)
{
String
s
;
THD
*
t
=
current_thd
;
(
void
)
t
;
switch
(
lex
.
sql_command
)
{
case
SQLCOM_SELECT
:
return
get_select_lex_unit_string
(
lex
.
unit
);
break
;
default
:
return
"unimplemented"
;
}
return
"hehe"
;
}
test_parser_helper/showstring.hh
0 → 100644
View file @
1b498abb
#pragma once
#include <string>
#include <sql_parse.h>
std
::
string
get_lex_string
(
LEX
&
lex
);
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