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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
384f0fee
Commit
384f0fee
authored
Oct 20, 2006
by
dlenev@mockturtle.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into mockturtle.local:/home/dlenev/src/mysql-5.0-bg15228-2
parents
ea0998ca
3fce634f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
16 deletions
+32
-16
sql/parse_file.h
sql/parse_file.h
+16
-0
sql/sql_trigger.cc
sql/sql_trigger.cc
+4
-4
sql/sql_view.cc
sql/sql_view.cc
+12
-12
No files found.
sql/parse_file.h
View file @
384f0fee
...
...
@@ -107,4 +107,20 @@ public:
bool
bad_format_errors
);
};
/*
Custom version of standard offsetof() macro which can be used to get
offsets of members in class for non-POD types (according to the current
version of C++ standard offsetof() macro can't be used in such cases and
attempt to do so causes warnings to be emitted, OTOH in many cases it is
still OK to assume that all instances of the class has the same offsets
for the same members).
This is temporary solution which should be removed once File_parser class
and related routines are refactored.
*/
#define my_offsetof(TYPE, MEMBER) \
((size_t)((char *)&(((TYPE *)0x10)->MEMBER) - (char*)0x10))
#endif
/* _PARSE_FILE_H_ */
sql/sql_trigger.cc
View file @
384f0fee
...
...
@@ -36,17 +36,17 @@ static File_option triggers_file_parameters[]=
{
{
{(
char
*
)
STRING_WITH_LEN
(
"triggers"
)
},
offsetof
(
class
Table_triggers_list
,
definitions_list
),
my_
offsetof
(
class
Table_triggers_list
,
definitions_list
),
FILE_OPTIONS_STRLIST
},
{
{(
char
*
)
STRING_WITH_LEN
(
"sql_modes"
)
},
offsetof
(
class
Table_triggers_list
,
definition_modes_list
),
my_
offsetof
(
class
Table_triggers_list
,
definition_modes_list
),
FILE_OPTIONS_ULLLIST
},
{
{(
char
*
)
STRING_WITH_LEN
(
"definers"
)
},
offsetof
(
class
Table_triggers_list
,
definers_list
),
my_
offsetof
(
class
Table_triggers_list
,
definers_list
),
FILE_OPTIONS_STRLIST
},
{
{
0
,
0
},
0
,
FILE_OPTIONS_STRING
}
...
...
@@ -55,7 +55,7 @@ static File_option triggers_file_parameters[]=
File_option
sql_modes_parameters
=
{
{(
char
*
)
STRING_WITH_LEN
(
"sql_modes"
)
},
offsetof
(
class
Table_triggers_list
,
definition_modes_list
),
my_
offsetof
(
class
Table_triggers_list
,
definition_modes_list
),
FILE_OPTIONS_ULLLIST
};
...
...
sql/sql_view.cc
View file @
384f0fee
...
...
@@ -566,40 +566,40 @@ static const int num_view_backups= 3;
*/
static
File_option
view_parameters
[]
=
{{{(
char
*
)
STRING_WITH_LEN
(
"query"
)},
offsetof
(
TABLE_LIST
,
query
),
my_
offsetof
(
TABLE_LIST
,
query
),
FILE_OPTIONS_ESTRING
},
{{(
char
*
)
STRING_WITH_LEN
(
"md5"
)},
offsetof
(
TABLE_LIST
,
md5
),
my_
offsetof
(
TABLE_LIST
,
md5
),
FILE_OPTIONS_STRING
},
{{(
char
*
)
STRING_WITH_LEN
(
"updatable"
)},
offsetof
(
TABLE_LIST
,
updatable_view
),
my_
offsetof
(
TABLE_LIST
,
updatable_view
),
FILE_OPTIONS_ULONGLONG
},
{{(
char
*
)
STRING_WITH_LEN
(
"algorithm"
)},
offsetof
(
TABLE_LIST
,
algorithm
),
my_
offsetof
(
TABLE_LIST
,
algorithm
),
FILE_OPTIONS_ULONGLONG
},
{{(
char
*
)
STRING_WITH_LEN
(
"definer_user"
)},
offsetof
(
TABLE_LIST
,
definer
.
user
),
my_
offsetof
(
TABLE_LIST
,
definer
.
user
),
FILE_OPTIONS_STRING
},
{{(
char
*
)
STRING_WITH_LEN
(
"definer_host"
)},
offsetof
(
TABLE_LIST
,
definer
.
host
),
my_
offsetof
(
TABLE_LIST
,
definer
.
host
),
FILE_OPTIONS_STRING
},
{{(
char
*
)
STRING_WITH_LEN
(
"suid"
)},
offsetof
(
TABLE_LIST
,
view_suid
),
my_
offsetof
(
TABLE_LIST
,
view_suid
),
FILE_OPTIONS_ULONGLONG
},
{{(
char
*
)
STRING_WITH_LEN
(
"with_check_option"
)},
offsetof
(
TABLE_LIST
,
with_check
),
my_
offsetof
(
TABLE_LIST
,
with_check
),
FILE_OPTIONS_ULONGLONG
},
{{(
char
*
)
STRING_WITH_LEN
(
"revision"
)},
offsetof
(
TABLE_LIST
,
revision
),
my_
offsetof
(
TABLE_LIST
,
revision
),
FILE_OPTIONS_REV
},
{{(
char
*
)
STRING_WITH_LEN
(
"timestamp"
)},
offsetof
(
TABLE_LIST
,
timestamp
),
my_
offsetof
(
TABLE_LIST
,
timestamp
),
FILE_OPTIONS_TIMESTAMP
},
{{(
char
*
)
STRING_WITH_LEN
(
"create-version"
)},
offsetof
(
TABLE_LIST
,
file_version
),
my_
offsetof
(
TABLE_LIST
,
file_version
),
FILE_OPTIONS_ULONGLONG
},
{{(
char
*
)
STRING_WITH_LEN
(
"source"
)},
offsetof
(
TABLE_LIST
,
source
),
my_
offsetof
(
TABLE_LIST
,
source
),
FILE_OPTIONS_ESTRING
},
{{
NullS
,
0
},
0
,
FILE_OPTIONS_STRING
}
...
...
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