Below is the list of changes that have just been committed into a local
5.0 repository of dlenev. When dlenev does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-10-19 15:11:40+04:00, dlenev@stripped +2 -0
Merge mockturtle.local:/home/dlenev/src/mysql-5.0-runtime
into mockturtle.local:/home/dlenev/src/mysql-5.0-bg15228
MERGE: 1.2196.76.2
sql/sql_trigger.cc@stripped, 2006-10-19 15:11:34+04:00, dlenev@stripped +0 -0
Auto merged
MERGE: 1.53.1.1
sql/sql_view.cc@stripped, 2006-10-19 15:11:34+04:00, dlenev@stripped +0 -0
Auto merged
MERGE: 1.89.8.2
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: dlenev
# Host: mockturtle.local
# Root: /home/dlenev/src/mysql-5.0-bg15228/RESYNC
--- 1.95/sql/sql_view.cc 2006-10-19 15:11:46 +04:00
+++ 1.96/sql/sql_view.cc 2006-10-19 15:11:46 +04:00
@@ -559,6 +559,14 @@
static const int num_view_backups= 3;
/*
+ To circumvent limitation of offset() macro we have to create dummy
+ TABLE_LIST object to get offsets of its members for File_parser.
+ See comment in sql_trigger.cc for more information.
+*/
+
+static TABLE_LIST dummy;
+
+/*
table of VIEW .frm field descriptors
Note that one should NOT change the order for this, as it's used by
@@ -566,40 +574,40 @@
*/
static File_option view_parameters[]=
{{{(char*) STRING_WITH_LEN("query")},
- offsetof(TABLE_LIST, query),
+ offsetof_in_object(dummy, query),
FILE_OPTIONS_ESTRING},
{{(char*) STRING_WITH_LEN("md5")},
- offsetof(TABLE_LIST, md5),
+ offsetof_in_object(dummy, md5),
FILE_OPTIONS_STRING},
{{(char*) STRING_WITH_LEN("updatable")},
- offsetof(TABLE_LIST, updatable_view),
+ offsetof_in_object(dummy, updatable_view),
FILE_OPTIONS_ULONGLONG},
{{(char*) STRING_WITH_LEN("algorithm")},
- offsetof(TABLE_LIST, algorithm),
+ offsetof_in_object(dummy, algorithm),
FILE_OPTIONS_ULONGLONG},
{{(char*) STRING_WITH_LEN("definer_user")},
- offsetof(TABLE_LIST, definer.user),
+ offsetof_in_object(dummy, definer.user),
FILE_OPTIONS_STRING},
{{(char*) STRING_WITH_LEN("definer_host")},
- offsetof(TABLE_LIST, definer.host),
+ offsetof_in_object(dummy, definer.host),
FILE_OPTIONS_STRING},
{{(char*) STRING_WITH_LEN("suid")},
- offsetof(TABLE_LIST, view_suid),
+ offsetof_in_object(dummy, view_suid),
FILE_OPTIONS_ULONGLONG},
{{(char*) STRING_WITH_LEN("with_check_option")},
- offsetof(TABLE_LIST, with_check),
+ offsetof_in_object(dummy, with_check),
FILE_OPTIONS_ULONGLONG},
{{(char*) STRING_WITH_LEN("revision")},
- offsetof(TABLE_LIST, revision),
+ offsetof_in_object(dummy, revision),
FILE_OPTIONS_REV},
{{(char*) STRING_WITH_LEN("timestamp")},
- offsetof(TABLE_LIST, timestamp),
+ offsetof_in_object(dummy, timestamp),
FILE_OPTIONS_TIMESTAMP},
{{(char*)STRING_WITH_LEN("create-version")},
- offsetof(TABLE_LIST, file_version),
+ offsetof_in_object(dummy, file_version),
FILE_OPTIONS_ULONGLONG},
{{(char*) STRING_WITH_LEN("source")},
- offsetof(TABLE_LIST, source),
+ offsetof_in_object(dummy, source),
FILE_OPTIONS_ESTRING},
{{NullS, 0}, 0,
FILE_OPTIONS_STRING}
--- 1.56/sql/sql_trigger.cc 2006-10-19 15:11:46 +04:00
+++ 1.57/sql/sql_trigger.cc 2006-10-19 15:11:46 +04:00
@@ -27,6 +27,18 @@
const char * const triggers_file_ext= ".TRG";
/*
+ Since Table_triggers_list is non-POD type offsetof() macro can't be used
+ with it according to the current version of C++ standard (attempt to do
+ this will produce warnings). So we use auxillary object to get offsets
+ of Table_triggers_list's members (we assume that all objects of this
+ type have same offsets of its members).
+ This is temporary hack which should be removed once we will refactor
+ File_parser code.
+*/
+
+static Table_triggers_list dummy(0);
+
+/*
Table of .TRG file field descriptors.
We have here only one field now because in nearest future .TRG
files will be merged into .FRM files (so we don't need something
@@ -36,17 +48,17 @@
{
{
{(char *) STRING_WITH_LEN("triggers") },
- offsetof(class Table_triggers_list, definitions_list),
+ offsetof_in_object(dummy, definitions_list),
FILE_OPTIONS_STRLIST
},
{
{(char *) STRING_WITH_LEN("sql_modes") },
- offsetof(class Table_triggers_list, definition_modes_list),
+ offsetof_in_object(dummy, definition_modes_list),
FILE_OPTIONS_ULLLIST
},
{
{(char *) STRING_WITH_LEN("definers") },
- offsetof(class Table_triggers_list, definers_list),
+ offsetof_in_object(dummy, definers_list),
FILE_OPTIONS_STRLIST
},
{ { 0, 0 }, 0, FILE_OPTIONS_STRING }
@@ -55,7 +67,7 @@
File_option sql_modes_parameters=
{
{(char*) STRING_WITH_LEN("sql_modes") },
- offsetof(class Table_triggers_list, definition_modes_list),
+ offsetof_in_object(dummy, definition_modes_list),
FILE_OPTIONS_ULLLIST
};
| Thread |
|---|
| • bk commit into 5.0 tree (dlenev:1.2287) | dlenev | 19 Oct |