Commit d3a09b8c authored by unknown's avatar unknown

spelling fixed/comments added (postreview fixes)


sql/mysqld.cc:
  spelling fixed
sql/sql_base.cc:
  spelling fixed
sql/sql_delete.cc:
  spelling fixed
sql/sql_parse.cc:
  comments added
sql/sql_prepare.cc:
  comments added
sql/sql_update.cc:
  spelling fixed
sql/sql_view.cc:
  spelling fixed
sql/table.cc:
  spelling fixed
parent d827a8c4
...@@ -5287,7 +5287,7 @@ The minimum value for this variable is 4096.", ...@@ -5287,7 +5287,7 @@ The minimum value for this variable is 4096.",
(gptr*) &max_system_variables.trans_prealloc_size, 0, GET_ULONG, (gptr*) &max_system_variables.trans_prealloc_size, 0, GET_ULONG,
REQUIRED_ARG, TRANS_ALLOC_PREALLOC_SIZE, 1024, ~0L, 0, 1024, 0}, REQUIRED_ARG, TRANS_ALLOC_PREALLOC_SIZE, 1024, ~0L, 0, 1024, 0},
{"updatable_views_with_limit", OPT_UPDATABLE_VIEWS_WITH_LIMIT, {"updatable_views_with_limit", OPT_UPDATABLE_VIEWS_WITH_LIMIT,
"1 = YES = Don't issue an error message (warning only) if a VIEW without presence of a key of the underlaying table is used in queries with a LIMIT clause for updating. 0 = NO = Prohibit update of a VIEW, which does not contain a key of the underlying table and the query uses a LIMIT clause (usually get from GUI tools).", "1 = YES = Don't issue an error message (warning only) if a VIEW without presence of a key of the underlying table is used in queries with a LIMIT clause for updating. 0 = NO = Prohibit update of a VIEW, which does not contain a key of the underlying table and the query uses a LIMIT clause (usually get from GUI tools).",
(gptr*) &global_system_variables.updatable_views_with_limit, (gptr*) &global_system_variables.updatable_views_with_limit,
(gptr*) &max_system_variables.updatable_views_with_limit, (gptr*) &max_system_variables.updatable_views_with_limit,
0, GET_ULONG, REQUIRED_ARG, 1, 0, 1, 0, 1, 0}, 0, GET_ULONG, REQUIRED_ARG, 1, 0, 1, 0, 1, 0},
......
...@@ -2815,7 +2815,7 @@ bool setup_tables(THD *thd, TABLE_LIST *tables, Item **conds, ...@@ -2815,7 +2815,7 @@ bool setup_tables(THD *thd, TABLE_LIST *tables, Item **conds,
DBUG_ENTER("setup_tables"); DBUG_ENTER("setup_tables");
/* /*
this is used for INSERT ... SELECT. this is used for INSERT ... SELECT.
For select we setup tables except first (and its underlaying tables) For select we setup tables except first (and its underlying tables)
*/ */
TABLE_LIST *first_select_table= (select_insert ? TABLE_LIST *first_select_table= (select_insert ?
tables->next_local: tables->next_local:
...@@ -3148,7 +3148,7 @@ insert_fields(THD *thd, TABLE_LIST *tables, const char *db_name, ...@@ -3148,7 +3148,7 @@ insert_fields(THD *thd, TABLE_LIST *tables, const char *db_name,
} }
/* /*
All fields are used in case if usual tables (in case of view used All fields are used in case if usual tables (in case of view used
fields merked in setu_tables during fix_fields of view columns fields marked in setup_tables during fix_fields of view columns
*/ */
if (table) if (table)
table->used_fields=table->fields; table->used_fields=table->fields;
......
...@@ -374,7 +374,7 @@ bool mysql_multi_delete_prepare(THD *thd) ...@@ -374,7 +374,7 @@ bool mysql_multi_delete_prepare(THD *thd)
Check are deleted table used somewhere inside subqueries. Check are deleted table used somewhere inside subqueries.
Multi-delete can't be constructed over-union => we always have Multi-delete can't be constructed over-union => we always have
single SELECT on top and have to check underlaying SELECTs of it single SELECT on top and have to check underlying SELECTs of it
*/ */
for (SELECT_LEX_UNIT *un= lex->select_lex.first_inner_unit(); for (SELECT_LEX_UNIT *un= lex->select_lex.first_inner_unit();
un; un;
......
...@@ -2883,11 +2883,13 @@ mysql_execute_command(THD *thd) ...@@ -2883,11 +2883,13 @@ mysql_execute_command(THD *thd)
(ORDER *) select_lex->order_list.first, (ORDER *) select_lex->order_list.first,
select_lex->select_limit, select_lex->select_limit,
lex->duplicates)); lex->duplicates));
/* mysql_update return 2 if we need to switch to multi-update */
if (result != 2) if (result != 2)
break; break;
case SQLCOM_UPDATE_MULTI: case SQLCOM_UPDATE_MULTI:
{ {
DBUG_ASSERT(first_table == all_tables && first_table != 0); DBUG_ASSERT(first_table == all_tables && first_table != 0);
/* if we switched from normal update, rights are checked */
if (result != 2) if (result != 2)
{ {
if ((res= multi_update_precheck(thd, all_tables))) if ((res= multi_update_precheck(thd, all_tables)))
......
...@@ -1309,6 +1309,7 @@ static bool mysql_test_multiupdate(Prepared_statement *stmt, ...@@ -1309,6 +1309,7 @@ static bool mysql_test_multiupdate(Prepared_statement *stmt,
TABLE_LIST *tables, TABLE_LIST *tables,
bool converted) bool converted)
{ {
/* if we switched from normal update, rights are checked */
if (!converted && multi_update_precheck(stmt->thd, tables)) if (!converted && multi_update_precheck(stmt->thd, tables))
return TRUE; return TRUE;
/* /*
...@@ -1457,6 +1458,7 @@ static int check_prepared_statement(Prepared_statement *stmt, ...@@ -1457,6 +1458,7 @@ static int check_prepared_statement(Prepared_statement *stmt,
case SQLCOM_UPDATE: case SQLCOM_UPDATE:
res= mysql_test_update(stmt, tables); res= mysql_test_update(stmt, tables);
/* mysql_test_update return 2 if we need to switch to multi-update */
if (res != 2) if (res != 2)
break; break;
......
...@@ -720,7 +720,7 @@ bool mysql_multi_update_prepare(THD *thd) ...@@ -720,7 +720,7 @@ bool mysql_multi_update_prepare(THD *thd)
/* /*
Multi-update can't be constructed over-union => we always have Multi-update can't be constructed over-union => we always have
single SELECT on top and have to check underlaying SELECTs of it single SELECT on top and have to check underlying SELECTs of it
*/ */
if (lex->select_lex.check_updateable_in_subqueries(tl->db, if (lex->select_lex.check_updateable_in_subqueries(tl->db,
tl->real_name)) tl->real_name))
......
...@@ -1046,7 +1046,7 @@ bool check_key_in_view(THD *thd, TABLE_LIST *view) ...@@ -1046,7 +1046,7 @@ bool check_key_in_view(THD *thd, TABLE_LIST *view)
if (i == elements_in_view) // If field didn't exists if (i == elements_in_view) // If field didn't exists
{ {
/* /*
Keys or all fields of underlaying tables are not foud => we have Keys or all fields of underlying tables are not foud => we have
to check variable updatable_views_with_limit to decide should we to check variable updatable_views_with_limit to decide should we
issue an error or just a warning issue an error or just a warning
*/ */
......
...@@ -1886,7 +1886,7 @@ int st_table_list::view_check_option(THD *thd, bool ignore_failure) ...@@ -1886,7 +1886,7 @@ int st_table_list::view_check_option(THD *thd, bool ignore_failure)
/* /*
Find table in underlaying tables by mask and check that only this Find table in underlying tables by mask and check that only this
table belong to given mask table belong to given mask
SYNOPSIS SYNOPSIS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment