Loading Docs/manual.texi +5 −0 Original line number Diff line number Diff line Loading @@ -50797,6 +50797,11 @@ each individual 4.0.x release. @appendixsubsec Changes in release 4.0.5 @itemize @item Fixed a bug in multi-table deletes when outer join is used on an empty table, which get's first to be deleted @item Fixed a bug in multi-table updates when a single table is updated @item Updated source tree to be built using @code{automake 1.5} and @code{libtool 1.4}. @item mysql-test/r/multi_update.result +16 −0 Original line number Diff line number Diff line Loading @@ -135,3 +135,19 @@ ID ParId tst tst1 2 2 MSSQL Microsoft 3 3 ORACLE ORACLE drop table parent, child; drop table if exists t1, t2 ; create table t1 (n numeric(10)); create table t2 (n numeric(10)); insert into t2 values (1),(2),(4),(8),(16),(32); select * from t2 left outer join t1 using (n); n n 1 NULL 2 NULL 4 NULL 8 NULL 16 NULL 32 NULL delete t1,t2 from t2 left outer join t1 using (n); select * from t2 left outer join t1 using (n); n n drop table if exists t1,t2 ; mysql-test/t/multi_update.test +9 −1 Original line number Diff line number Diff line Loading @@ -140,3 +140,11 @@ select * from child; drop table parent, child; drop table if exists t1, t2 ; create table t1 (n numeric(10)); create table t2 (n numeric(10)); insert into t2 values (1),(2),(4),(8),(16),(32); select * from t2 left outer join t1 using (n); delete t1,t2 from t2 left outer join t1 using (n); select * from t2 left outer join t1 using (n); drop table if exists t1,t2 ; sql/sql_delete.cc +1 −1 Original line number Diff line number Diff line Loading @@ -329,7 +329,7 @@ bool multi_delete::send_data(List<Item> &values) table->status|= STATUS_DELETED; if (!(error=table->file->delete_row(table->record[0]))) deleted++; else else if (!table_being_deleted->next) { table->file->print_error(error,MYF(0)); DBUG_RETURN(1); Loading sql/sql_update.cc +1 −1 Original line number Diff line number Diff line Loading @@ -768,7 +768,7 @@ bool multi_update::send_eof() thd->proc_info="updating the reference tables"; /* Does updates for the last n - 1 tables, returns 0 if ok */ int error = do_updates(false); /* do_updates returns 0 if success */ int error = (num_updated > 1) ? do_updates(false) : 0; /* do_updates returns 0 if success */ /* reset used flags */ #ifndef NOT_USED Loading Loading
Docs/manual.texi +5 −0 Original line number Diff line number Diff line Loading @@ -50797,6 +50797,11 @@ each individual 4.0.x release. @appendixsubsec Changes in release 4.0.5 @itemize @item Fixed a bug in multi-table deletes when outer join is used on an empty table, which get's first to be deleted @item Fixed a bug in multi-table updates when a single table is updated @item Updated source tree to be built using @code{automake 1.5} and @code{libtool 1.4}. @item
mysql-test/r/multi_update.result +16 −0 Original line number Diff line number Diff line Loading @@ -135,3 +135,19 @@ ID ParId tst tst1 2 2 MSSQL Microsoft 3 3 ORACLE ORACLE drop table parent, child; drop table if exists t1, t2 ; create table t1 (n numeric(10)); create table t2 (n numeric(10)); insert into t2 values (1),(2),(4),(8),(16),(32); select * from t2 left outer join t1 using (n); n n 1 NULL 2 NULL 4 NULL 8 NULL 16 NULL 32 NULL delete t1,t2 from t2 left outer join t1 using (n); select * from t2 left outer join t1 using (n); n n drop table if exists t1,t2 ;
mysql-test/t/multi_update.test +9 −1 Original line number Diff line number Diff line Loading @@ -140,3 +140,11 @@ select * from child; drop table parent, child; drop table if exists t1, t2 ; create table t1 (n numeric(10)); create table t2 (n numeric(10)); insert into t2 values (1),(2),(4),(8),(16),(32); select * from t2 left outer join t1 using (n); delete t1,t2 from t2 left outer join t1 using (n); select * from t2 left outer join t1 using (n); drop table if exists t1,t2 ;
sql/sql_delete.cc +1 −1 Original line number Diff line number Diff line Loading @@ -329,7 +329,7 @@ bool multi_delete::send_data(List<Item> &values) table->status|= STATUS_DELETED; if (!(error=table->file->delete_row(table->record[0]))) deleted++; else else if (!table_being_deleted->next) { table->file->print_error(error,MYF(0)); DBUG_RETURN(1); Loading
sql/sql_update.cc +1 −1 Original line number Diff line number Diff line Loading @@ -768,7 +768,7 @@ bool multi_update::send_eof() thd->proc_info="updating the reference tables"; /* Does updates for the last n - 1 tables, returns 0 if ok */ int error = do_updates(false); /* do_updates returns 0 if success */ int error = (num_updated > 1) ? do_updates(false) : 0; /* do_updates returns 0 if success */ /* reset used flags */ #ifndef NOT_USED Loading