Merge mockturtle.local:/home/dlenev/src/mysql-5.0-bg15228-2

into  mockturtle.local:/home/dlenev/src/mysql-5.1-bg15228


sql/sql_trigger.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
This commit is contained in:
unknown 2006-10-20 15:54:58 +04:00
commit d76cf9973a
3 changed files with 32 additions and 16 deletions

View file

@ -107,4 +107,20 @@ public:
bool bad_format_errors); 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_ */ #endif /* _PARSE_FILE_H_ */

View file

@ -36,17 +36,17 @@ static File_option triggers_file_parameters[]=
{ {
{ {
{ C_STRING_WITH_LEN("triggers") }, { C_STRING_WITH_LEN("triggers") },
offsetof(class Table_triggers_list, definitions_list), my_offsetof(class Table_triggers_list, definitions_list),
FILE_OPTIONS_STRLIST FILE_OPTIONS_STRLIST
}, },
{ {
{ C_STRING_WITH_LEN("sql_modes") }, { C_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 FILE_OPTIONS_ULLLIST
}, },
{ {
{ C_STRING_WITH_LEN("definers") }, { C_STRING_WITH_LEN("definers") },
offsetof(class Table_triggers_list, definers_list), my_offsetof(class Table_triggers_list, definers_list),
FILE_OPTIONS_STRLIST FILE_OPTIONS_STRLIST
}, },
{ { 0, 0 }, 0, FILE_OPTIONS_STRING } { { 0, 0 }, 0, FILE_OPTIONS_STRING }
@ -55,7 +55,7 @@ static File_option triggers_file_parameters[]=
File_option sql_modes_parameters= File_option sql_modes_parameters=
{ {
{ C_STRING_WITH_LEN("sql_modes") }, { C_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 FILE_OPTIONS_ULLLIST
}; };

View file

@ -566,40 +566,40 @@ static const int num_view_backups= 3;
*/ */
static File_option view_parameters[]= static File_option view_parameters[]=
{{{ C_STRING_WITH_LEN("query")}, {{{ C_STRING_WITH_LEN("query")},
offsetof(TABLE_LIST, query), my_offsetof(TABLE_LIST, query),
FILE_OPTIONS_ESTRING}, FILE_OPTIONS_ESTRING},
{{ C_STRING_WITH_LEN("md5")}, {{ C_STRING_WITH_LEN("md5")},
offsetof(TABLE_LIST, md5), my_offsetof(TABLE_LIST, md5),
FILE_OPTIONS_STRING}, FILE_OPTIONS_STRING},
{{ C_STRING_WITH_LEN("updatable")}, {{ C_STRING_WITH_LEN("updatable")},
offsetof(TABLE_LIST, updatable_view), my_offsetof(TABLE_LIST, updatable_view),
FILE_OPTIONS_ULONGLONG}, FILE_OPTIONS_ULONGLONG},
{{ C_STRING_WITH_LEN("algorithm")}, {{ C_STRING_WITH_LEN("algorithm")},
offsetof(TABLE_LIST, algorithm), my_offsetof(TABLE_LIST, algorithm),
FILE_OPTIONS_ULONGLONG}, FILE_OPTIONS_ULONGLONG},
{{ C_STRING_WITH_LEN("definer_user")}, {{ C_STRING_WITH_LEN("definer_user")},
offsetof(TABLE_LIST, definer.user), my_offsetof(TABLE_LIST, definer.user),
FILE_OPTIONS_STRING}, FILE_OPTIONS_STRING},
{{ C_STRING_WITH_LEN("definer_host")}, {{ C_STRING_WITH_LEN("definer_host")},
offsetof(TABLE_LIST, definer.host), my_offsetof(TABLE_LIST, definer.host),
FILE_OPTIONS_STRING}, FILE_OPTIONS_STRING},
{{ C_STRING_WITH_LEN("suid")}, {{ C_STRING_WITH_LEN("suid")},
offsetof(TABLE_LIST, view_suid), my_offsetof(TABLE_LIST, view_suid),
FILE_OPTIONS_ULONGLONG}, FILE_OPTIONS_ULONGLONG},
{{ C_STRING_WITH_LEN("with_check_option")}, {{ C_STRING_WITH_LEN("with_check_option")},
offsetof(TABLE_LIST, with_check), my_offsetof(TABLE_LIST, with_check),
FILE_OPTIONS_ULONGLONG}, FILE_OPTIONS_ULONGLONG},
{{ C_STRING_WITH_LEN("revision")}, {{ C_STRING_WITH_LEN("revision")},
offsetof(TABLE_LIST, revision), my_offsetof(TABLE_LIST, revision),
FILE_OPTIONS_REV}, FILE_OPTIONS_REV},
{{ C_STRING_WITH_LEN("timestamp")}, {{ C_STRING_WITH_LEN("timestamp")},
offsetof(TABLE_LIST, timestamp), my_offsetof(TABLE_LIST, timestamp),
FILE_OPTIONS_TIMESTAMP}, FILE_OPTIONS_TIMESTAMP},
{{ C_STRING_WITH_LEN("create-version")}, {{ C_STRING_WITH_LEN("create-version")},
offsetof(TABLE_LIST, file_version), my_offsetof(TABLE_LIST, file_version),
FILE_OPTIONS_ULONGLONG}, FILE_OPTIONS_ULONGLONG},
{{ C_STRING_WITH_LEN("source")}, {{ C_STRING_WITH_LEN("source")},
offsetof(TABLE_LIST, source), my_offsetof(TABLE_LIST, source),
FILE_OPTIONS_ESTRING}, FILE_OPTIONS_ESTRING},
{{NullS, 0}, 0, {{NullS, 0}, 0,
FILE_OPTIONS_STRING} FILE_OPTIONS_STRING}