diff options
author | unknown <monty@mysql.com> | 2004-12-31 12:04:35 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-12-31 12:04:35 +0200 |
commit | 2419fa2684413f103a5bee470a330f00310c3f6e (patch) | |
tree | 15ba897ee442fcca24c0923eecba6bd94786608f /sql/sql_parse.cc | |
parent | 7a3ad6eb8422b28e8f15aa873393001fac193963 (diff) | |
download | mariadb-git-2419fa2684413f103a5bee470a330f00310c3f6e.tar.gz |
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
This allows use to use INSERT IGNORE ... ON DUPLICATE ...
mysql-test/r/drop.result:
safety fix
mysql-test/t/drop.test:
safety fix
mysql-test/t/multi_update.test:
ensure we cover all possible errors
sql/log_event.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/log_event.h:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/mysql_priv.h:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_class.h:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_delete.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_insert.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_lex.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_lex.h:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_load.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_parse.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_repl.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_repl.h:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_select.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_table.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_union.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_update.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_yacc.yy:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 55d26a68116..6353622098c 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2393,7 +2393,8 @@ mysql_execute_command(THD *thd) &lex->create_info, lex->create_list, lex->key_list, - select_lex->item_list,lex->duplicates))) + select_lex->item_list, lex->duplicates, + lex->ignore))) { /* CREATE from SELECT give its SELECT_LEX for SELECT, @@ -2533,7 +2534,7 @@ unsent_create_error: lex->key_list, select_lex->order_list.elements, (ORDER *) select_lex->order_list.first, - lex->duplicates, &lex->alter_info); + lex->duplicates, lex->ignore, &lex->alter_info); } break; } @@ -2695,7 +2696,7 @@ unsent_create_error: select_lex->order_list.elements, (ORDER *) select_lex->order_list.first, select_lex->select_limit, - lex->duplicates); + lex->duplicates, lex->ignore); if (thd->net.report_error) res= -1; break; @@ -2708,7 +2709,7 @@ unsent_create_error: &lex->value_list, select_lex->where, select_lex->options, - lex->duplicates, unit, select_lex); + lex->duplicates, lex->ignore, unit, select_lex); break; } case SQLCOM_REPLACE: @@ -2716,9 +2717,9 @@ unsent_create_error: { if ((res= insert_precheck(thd, tables))) break; - res = mysql_insert(thd,tables,lex->field_list,lex->many_values, - lex->update_list, lex->value_list, - lex->duplicates); + res= mysql_insert(thd,tables,lex->field_list,lex->many_values, + lex->update_list, lex->value_list, + lex->duplicates, lex->ignore); if (thd->net.report_error) res= -1; break; @@ -2756,7 +2757,7 @@ unsent_create_error: lex->duplicates)) && (result= new select_insert(tables->table, &lex->field_list, &lex->update_list, &lex->value_list, - lex->duplicates))) + lex->duplicates, lex->ignore))) { TABLE *table= tables->table; /* Skip first table, which is the table we are inserting in */ @@ -3066,7 +3067,7 @@ unsent_create_error: goto error; } res=mysql_load(thd, lex->exchange, tables, lex->field_list, - lex->duplicates, (bool) lex->local_file, lex->lock_option); + lex->duplicates, lex->ignore, (bool) lex->local_file, lex->lock_option); break; } @@ -5119,7 +5120,7 @@ int mysql_create_index(THD *thd, TABLE_LIST *table_list, List<Key> &keys) DBUG_RETURN(mysql_alter_table(thd,table_list->db,table_list->real_name, &create_info, table_list, fields, keys, 0, (ORDER*)0, - DUP_ERROR, &alter_info)); + DUP_ERROR, 0, &alter_info)); } @@ -5138,7 +5139,7 @@ int mysql_drop_index(THD *thd, TABLE_LIST *table_list, ALTER_INFO *alter_info) DBUG_RETURN(mysql_alter_table(thd,table_list->db,table_list->real_name, &create_info, table_list, fields, keys, 0, (ORDER*)0, - DUP_ERROR, alter_info)); + DUP_ERROR, 0, alter_info)); } |