Below is the list of changes that have just been committed into a local
5.1 repository of root. When root 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-09-01 19:43:19+08:00, gni@dev3-127.(none) +10 -0
Merge gni@stripped:/home/bk/mysql-5.1-new-ndb
into dev3-127.(none):/mnt/mysql/home/ngb/mysql-5.1-for-result
MERGE: 1.2273.1.29
mysql-test/r/csv.result@stripped, 2006-09-01 19:41:51+08:00, gni@dev3-127.(none) +0 -0
Auto merged
MERGE: 1.10.1.1
mysql-test/t/csv.test@stripped, 2006-09-01 19:41:51+08:00, gni@dev3-127.(none) +0 -0
Auto merged
MERGE: 1.12.1.1
sql/ha_innodb.cc@stripped, 2006-09-01 19:41:51+08:00, gni@dev3-127.(none) +0 -0
Auto merged
MERGE: 1.284.1.1
sql/ha_ndbcluster.cc@stripped, 2006-09-01 19:41:51+08:00, gni@dev3-127.(none) +0 -0
Auto merged
MERGE: 1.348.4.8
sql/sql_acl.cc@stripped, 2006-09-01 19:41:52+08:00, gni@dev3-127.(none) +0 -0
Auto merged
MERGE: 1.206.1.1
sql/sql_base.cc@stripped, 2006-09-01 19:41:52+08:00, gni@dev3-127.(none) +0 -0
Auto merged
MERGE: 1.345.1.2
sql/sql_lex.h@stripped, 2006-09-01 19:41:52+08:00, gni@dev3-127.(none) +0 -0
Auto merged
MERGE: 1.243.1.1
sql/sql_view.cc@stripped, 2006-09-01 19:41:52+08:00, gni@dev3-127.(none) +0 -0
Auto merged
MERGE: 1.101.4.3
sql/table.cc@stripped, 2006-09-01 19:41:52+08:00, gni@dev3-127.(none) +0 -0
Auto merged
MERGE: 1.239.1.2
storage/csv/ha_tina.cc@stripped, 2006-09-01 19:43:09+08:00, gni@dev3-127.(none) +0 -19
MERGE: 1.55.2.1
# 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: gni
# Host: dev3-127.(none)
# Root: /mnt/mysql/home/ngb/mysql-5.1-for-result/RESYNC
--- 1.208/sql/sql_acl.cc 2006-09-01 19:44:24 +08:00
+++ 1.209/sql/sql_acl.cc 2006-09-01 19:44:24 +08:00
@@ -1006,6 +1006,7 @@
sql_print_information("X509 issuer mismatch: should be '%s' "
"but is '%s'", acl_user->x509_issuer, ptr);
free(ptr);
+ user_access=NO_ACCESS;
break;
}
user_access= acl_user->access;
@@ -1021,11 +1022,13 @@
if (strcmp(acl_user->x509_subject,ptr))
{
if (global_system_variables.log_warnings)
- sql_print_information("X509 subject mismatch: '%s' vs '%s'",
+ sql_print_information("X509 subject mismatch: should be '%s' but is '%s'",
acl_user->x509_subject, ptr);
+ free(ptr);
+ user_access=NO_ACCESS;
+ break;
}
- else
- user_access= acl_user->access;
+ user_access= acl_user->access;
free(ptr);
}
break;
--- 1.244/sql/sql_lex.h 2006-09-01 19:44:24 +08:00
+++ 1.245/sql/sql_lex.h 2006-09-01 19:44:24 +08:00
@@ -149,11 +149,11 @@
const LEX_STRING sp_data_access_name[]=
{
- { (char*) STRING_WITH_LEN("") },
- { (char*) STRING_WITH_LEN("CONTAINS SQL") },
- { (char*) STRING_WITH_LEN("NO SQL") },
- { (char*) STRING_WITH_LEN("READS SQL DATA") },
- { (char*) STRING_WITH_LEN("MODIFIES SQL DATA") }
+ { C_STRING_WITH_LEN("") },
+ { C_STRING_WITH_LEN("CONTAINS SQL") },
+ { C_STRING_WITH_LEN("NO SQL") },
+ { C_STRING_WITH_LEN("READS SQL DATA") },
+ { C_STRING_WITH_LEN("MODIFIES SQL DATA") }
};
#define DERIVED_SUBQUERY 1
--- 1.241/sql/table.cc 2006-09-01 19:44:24 +08:00
+++ 1.242/sql/table.cc 2006-09-01 19:44:24 +08:00
@@ -93,6 +93,7 @@
{
MEM_ROOT mem_root;
TABLE_SHARE *share;
+ char *key_buff, *path_buff;
char path[FN_REFLEN];
uint path_length;
DBUG_ENTER("alloc_table_share");
@@ -103,22 +104,17 @@
table_list->db,
table_list->table_name, "", 0);
init_sql_alloc(&mem_root, TABLE_ALLOC_BLOCK_SIZE, 0);
- if ((share= (TABLE_SHARE*) alloc_root(&mem_root,
- sizeof(*share) + key_length +
- path_length +1)))
+ if (multi_alloc_root(&mem_root,
+ &share, sizeof(*share),
+ &key_buff, key_length,
+ &path_buff, path_length + 1,
+ NULL))
{
bzero((char*) share, sizeof(*share));
- share->table_cache_key.str= (char*) (share+1);
- share->table_cache_key.length= key_length;
- memcpy(share->table_cache_key.str, key, key_length);
- /* Use the fact the key is db/0/table_name/0 */
- share->db.str= share->table_cache_key.str;
- share->db.length= strlen(share->db.str);
- share->table_name.str= share->db.str + share->db.length + 1;
- share->table_name.length= strlen(share->table_name.str);
+ share->set_table_cache_key(key_buff, key, key_length);
- share->path.str= share->table_cache_key.str+ key_length;
+ share->path.str= path_buff;
share->path.length= path_length;
strmov(share->path.str, path);
share->normalized_path.str= share->path.str;
--- 1.107/sql/sql_view.cc 2006-09-01 19:44:24 +08:00
+++ 1.108/sql/sql_view.cc 2006-09-01 19:44:24 +08:00
@@ -25,7 +25,7 @@
#define MD5_BUFF_LENGTH 33
-const LEX_STRING view_type= { (char*) STRING_WITH_LEN("VIEW") };
+const LEX_STRING view_type= { C_STRING_WITH_LEN("VIEW") };
static int mysql_register_view(THD *thd, TABLE_LIST *view,
enum_view_create_mode mode);
@@ -581,40 +581,40 @@
parse()
*/
static File_option view_parameters[]=
-{{{(char*) STRING_WITH_LEN("query")},
+{{{ C_STRING_WITH_LEN("query")},
offsetof(TABLE_LIST, query),
FILE_OPTIONS_ESTRING},
- {{(char*) STRING_WITH_LEN("md5")},
+ {{ C_STRING_WITH_LEN("md5")},
offsetof(TABLE_LIST, md5),
FILE_OPTIONS_STRING},
- {{(char*) STRING_WITH_LEN("updatable")},
+ {{ C_STRING_WITH_LEN("updatable")},
offsetof(TABLE_LIST, updatable_view),
FILE_OPTIONS_ULONGLONG},
- {{(char*) STRING_WITH_LEN("algorithm")},
+ {{ C_STRING_WITH_LEN("algorithm")},
offsetof(TABLE_LIST, algorithm),
FILE_OPTIONS_ULONGLONG},
- {{(char*) STRING_WITH_LEN("definer_user")},
+ {{ C_STRING_WITH_LEN("definer_user")},
offsetof(TABLE_LIST, definer.user),
FILE_OPTIONS_STRING},
- {{(char*) STRING_WITH_LEN("definer_host")},
+ {{ C_STRING_WITH_LEN("definer_host")},
offsetof(TABLE_LIST, definer.host),
FILE_OPTIONS_STRING},
- {{(char*) STRING_WITH_LEN("suid")},
+ {{ C_STRING_WITH_LEN("suid")},
offsetof(TABLE_LIST, view_suid),
FILE_OPTIONS_ULONGLONG},
- {{(char*) STRING_WITH_LEN("with_check_option")},
+ {{ C_STRING_WITH_LEN("with_check_option")},
offsetof(TABLE_LIST, with_check),
FILE_OPTIONS_ULONGLONG},
- {{(char*) STRING_WITH_LEN("revision")},
+ {{ C_STRING_WITH_LEN("revision")},
offsetof(TABLE_LIST, revision),
FILE_OPTIONS_REV},
- {{(char*) STRING_WITH_LEN("timestamp")},
+ {{ C_STRING_WITH_LEN("timestamp")},
offsetof(TABLE_LIST, timestamp),
FILE_OPTIONS_TIMESTAMP},
- {{(char*)STRING_WITH_LEN("create-version")},
+ {{ C_STRING_WITH_LEN("create-version")},
offsetof(TABLE_LIST, file_version),
FILE_OPTIONS_ULONGLONG},
- {{(char*) STRING_WITH_LEN("source")},
+ {{ C_STRING_WITH_LEN("source")},
offsetof(TABLE_LIST, source),
FILE_OPTIONS_ESTRING},
{{NullS, 0}, 0,
@@ -1070,6 +1070,30 @@
if (lex->binlog_row_based_if_mixed)
old_lex->binlog_row_based_if_mixed= TRUE;
#endif
+ bool view_is_mergeable= (table->algorithm != VIEW_ALGORITHM_TMPTABLE &&
+ lex->can_be_merged());
+ TABLE_LIST *view_main_select_tables;
+ if (view_is_mergeable)
+ {
+ /*
+ Currently 'view_main_select_tables' differs from 'view_tables'
+ only then view has CONVERT_TZ() function in its select list.
+ This may change in future, for example if we enable merging of
+ views with subqueries in select list.
+ */
+ view_main_select_tables=
+ (TABLE_LIST*)lex->select_lex.table_list.first;
+
+ /*
+ Let us set proper lock type for tables of the view's main
+ select since we may want to perform update or insert on
+ view. This won't work for view containing union. But this is
+ ok since we don't allow insert and update on such views
+ anyway.
+ */
+ for (tbl= view_main_select_tables; tbl; tbl= tbl->next_local)
+ tbl->lock_type= table->lock_type;
+ }
/*
If we are opening this view as part of implicit LOCK TABLES, then
@@ -1125,43 +1149,26 @@
- VIEW SELECT allow merging
- VIEW used in subquery or command support MERGE algorithm
*/
- if (table->algorithm != VIEW_ALGORITHM_TMPTABLE &&
- lex->can_be_merged() &&
+ if (view_is_mergeable &&
(table->select_lex->master_unit() != &old_lex->unit ||
old_lex->can_use_merged()) &&
!old_lex->can_not_use_merged())
{
- List_iterator_fast<TABLE_LIST> ti(view_select->top_join_list);
- /*
- Currently 'view_main_select_tables' differs from 'view_tables'
- only then view has CONVERT_TZ() function in its select list.
- This may change in future, for example if we enable merging
- of views with subqueries in select list.
- */
- TABLE_LIST *view_main_select_tables=
- (TABLE_LIST*)lex->select_lex.table_list.first;
/* lex should contain at least one table */
DBUG_ASSERT(view_main_select_tables != 0);
+ List_iterator_fast<TABLE_LIST> ti(view_select->top_join_list);
+
table->effective_algorithm= VIEW_ALGORITHM_MERGE;
DBUG_PRINT("info", ("algorithm: MERGE"));
table->updatable= (table->updatable_view != 0);
table->effective_with_check=
old_lex->get_effective_with_check(table);
table->merge_underlying_list= view_main_select_tables;
- /*
- Let us set proper lock type for tables of the view's main select
- since we may want to perform update or insert on view. This won't
- work for view containing union. But this is ok since we don't
- allow insert and update on such views anyway.
- Also we fill correct wanted privileges.
- */
- for (tbl= table->merge_underlying_list; tbl; tbl= tbl->next_local)
- {
- tbl->lock_type= table->lock_type;
+ /* Fill correct wanted privileges. */
+ for (tbl= view_main_select_tables; tbl; tbl= tbl->next_local)
tbl->grant.want_privilege= top_view->grant.orig_want_privilege;
- }
/* prepare view context */
lex->select_lex.context.resolve_in_table_list_only(view_main_select_tables);
--- 1.354/sql/ha_ndbcluster.cc 2006-09-01 19:44:24 +08:00
+++ 1.355/sql/ha_ndbcluster.cc 2006-09-01 19:44:24 +08:00
@@ -6388,6 +6388,7 @@
ndbcluster_binlog_init_handlerton();
#endif
h.flags= HTON_CAN_RECREATE | HTON_TEMPORARY_NOT_SUPPORTED;
+ h.discover= ndbcluster_discover;
}
if (have_ndbcluster != SHOW_OPTION_YES)
@@ -10579,6 +10580,11 @@
DBUG_RETURN(0);
}
+SHOW_VAR ndb_status_variables_export[]= {
+ {"Ndb", (char*) &ndb_status_variables, SHOW_ARRAY},
+ {NullS, NullS, SHOW_LONG}
+};
+
struct st_mysql_storage_engine ndbcluster_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, &ndbcluster_hton };
@@ -10592,7 +10598,7 @@
ndbcluster_init, /* Plugin Init */
NULL, /* Plugin Deinit */
0x0100 /* 1.0 */,
- 0
+ ndb_status_variables_export
}
mysql_declare_plugin_end;
--- 1.286/sql/ha_innodb.cc 2006-09-01 19:44:24 +08:00
+++ 1.287/sql/ha_innodb.cc 2006-09-01 19:44:24 +08:00
@@ -2363,8 +2363,7 @@
"have forgotten\nto delete the corresponding "
".frm files of InnoDB tables, or you\n"
"have moved .frm files to another database?\n"
- "Look from section 15.1 of "
- "http://www.innodb.com/ibman.html\n"
+ "See http://dev.mysql.com/doc/refman/5.0/en/innodb-troubleshooting.html\n"
"how you can resolve the problem.\n",
norm_name);
free_share(share);
@@ -2381,8 +2380,7 @@
"Have you deleted the .ibd file from the "
"database directory under\nthe MySQL datadir, "
"or have you used DISCARD TABLESPACE?\n"
- "Look from section 15.1 of "
- "http://www.innodb.com/ibman.html\n"
+ "See http://dev.mysql.com/doc/refman/5.0/en/innodb-troubleshooting.html\n"
"how you can resolve the problem.\n",
norm_name);
free_share(share);
@@ -5602,13 +5600,14 @@
for (i = 0; i < table->s->keys; i++) {
if (index == NULL) {
ut_print_timestamp(stderr);
- sql_print_error("Table %s contains less "
+ sql_print_error("Table %s contains fewer "
"indexes inside InnoDB than "
"are defined in the MySQL "
".frm file. Have you mixed up "
".frm files from different "
- "installations? See section "
- "15.1 at http://www.innodb.com/ibman.html",
+ "installations? See "
+"http://dev.mysql.com/doc/refman/5.0/en/innodb-troubleshooting.html\n",
+
ib_table->name);
break;
}
@@ -5617,17 +5616,11 @@
if (j + 1 > index->n_uniq) {
ut_print_timestamp(stderr);
- sql_print_error("Index %s of %s has "
- "%lu columns unique "
- "inside InnoDB, but "
- "MySQL is asking "
- "statistics for %lu "
- "columns. Have you "
- "mixed up .frm files "
- "from different "
- "installations? See "
- "section 15.1 at "
- "http://www.innodb.com/ibman.html",
+ sql_print_error(
+"Index %s of %s has %lu columns unique inside InnoDB, but MySQL is asking "
+"statistics for %lu columns. Have you mixed up .frm files from different "
+"installations? "
+"See http://dev.mysql.com/doc/refman/5.0/en/innodb-troubleshooting.html\n",
index->name,
ib_table->name,
(unsigned long)
@@ -6436,7 +6429,7 @@
"table %s does not exist.\n"
"Have you deleted the .ibd file from the database directory under\n"
"the MySQL datadir?"
-"Look from section 15.1 of http://www.innodb.com/ibman.html\n"
+"See http://dev.mysql.com/doc/refman/5.0/en/innodb-troubleshooting.html\n"
"how you can resolve the problem.\n",
prebuilt->table->name);
DBUG_RETURN(HA_ERR_CRASHED);
| Thread |
|---|
| • bk commit into 5.1 tree (gni:1.2285) | gni | 1 Sep |