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
03c52e96
Commit
03c52e96
authored
Jun 27, 2017
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: move Virtual_column_info::print out of Virtual_column_info
parent
2bf017c2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
12 deletions
+23
-12
sql/field.h
sql/field.h
+1
-1
sql/item.cc
sql/item.cc
+0
-11
sql/item.h
sql/item.h
+22
-0
No files found.
sql/field.h
View file @
03c52e96
...
@@ -681,7 +681,7 @@ class Virtual_column_info: public Sql_alloc
...
@@ -681,7 +681,7 @@ class Virtual_column_info: public Sql_alloc
in_partitioning_expr
=
TRUE
;
in_partitioning_expr
=
TRUE
;
}
}
inline
bool
is_equal
(
const
Virtual_column_info
*
vcol
)
const
;
inline
bool
is_equal
(
const
Virtual_column_info
*
vcol
)
const
;
void
print
(
String
*
);
inline
void
print
(
String
*
);
};
};
class
Field
:
public
Value_source
class
Field
:
public
Value_source
...
...
sql/item.cc
View file @
03c52e96
...
@@ -10715,14 +10715,3 @@ void Item::register_in(THD *thd)
...
@@ -10715,14 +10715,3 @@ void Item::register_in(THD *thd)
next
=
thd
->
free_list
;
next
=
thd
->
free_list
;
thd
->
free_list
=
this
;
thd
->
free_list
=
this
;
}
}
void
Virtual_column_info
::
print
(
String
*
str
)
{
expr
->
print_parenthesised
(
str
,
(
enum_query_type
)(
QT_ITEM_ORIGINAL_FUNC_NULLIF
|
QT_ITEM_IDENT_SKIP_DB_NAMES
|
QT_ITEM_IDENT_SKIP_TABLE_NAMES
|
QT_NO_DATA_EXPANSION
|
QT_TO_SYSTEM_CHARSET
),
LOWEST_PRECEDENCE
);
}
sql/item.h
View file @
03c52e96
...
@@ -1292,6 +1292,23 @@ class Item: public Value_source,
...
@@ -1292,6 +1292,23 @@ class Item: public Value_source,
virtual
enum
precedence
precedence
()
const
{
return
DEFAULT_PRECEDENCE
;
}
virtual
enum
precedence
precedence
()
const
{
return
DEFAULT_PRECEDENCE
;
}
void
print_parenthesised
(
String
*
str
,
enum_query_type
query_type
,
void
print_parenthesised
(
String
*
str
,
enum_query_type
query_type
,
enum
precedence
parent_prec
);
enum
precedence
parent_prec
);
/**
This helper is used to print expressions as a part of a table definition,
in particular for
- generated columns
- check constraints
- default value expressions
*/
void
print_for_table_def
(
String
*
str
)
{
print_parenthesised
(
str
,
(
enum_query_type
)(
QT_ITEM_ORIGINAL_FUNC_NULLIF
|
QT_ITEM_IDENT_SKIP_DB_NAMES
|
QT_ITEM_IDENT_SKIP_TABLE_NAMES
|
QT_NO_DATA_EXPANSION
|
QT_TO_SYSTEM_CHARSET
),
LOWEST_PRECEDENCE
);
}
virtual
void
print
(
String
*
str
,
enum_query_type
query_type
);
virtual
void
print
(
String
*
str
,
enum_query_type
query_type
);
void
print_item_w_name
(
String
*
str
,
enum_query_type
query_type
);
void
print_item_w_name
(
String
*
str
,
enum_query_type
query_type
);
void
print_value
(
String
*
str
);
void
print_value
(
String
*
str
);
...
@@ -5977,4 +5994,9 @@ inline bool Virtual_column_info::is_equal(const Virtual_column_info* vcol) const
...
@@ -5977,4 +5994,9 @@ inline bool Virtual_column_info::is_equal(const Virtual_column_info* vcol) const
&&
expr
->
eq
(
vcol
->
expr
,
true
);
&&
expr
->
eq
(
vcol
->
expr
,
true
);
}
}
inline
void
Virtual_column_info
::
print
(
String
*
str
)
{
expr
->
print_for_table_def
(
str
);
}
#endif
/* SQL_ITEM_INCLUDED */
#endif
/* SQL_ITEM_INCLUDED */
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