| Bug #2996 | update on left join can change non matching record in second table. | ||
|---|---|---|---|
| Submitted: | 27 Feb 2004 12:57 | Modified: | 11 Mar 2004 13:23 |
| Reporter: | Joseph Martin | ||
| Status: | Closed | ||
| Category: | Server | Severity: | S2 (Serious) |
| Version: | 4.0.18 | OS: | Linux (Linux 2.4.25 (Slackware 9.1+)) |
| Assigned to: | Sinisa Milivojevic | Target Version: | |
[27 Feb 2004 12:57]
Joseph Martin
[1 Mar 2004 10:06]
Dean Ellis
Verified against 4.0.19. Thank you for the test case.
[3 Mar 2004 9:20]
Sinisa Milivojevic
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.
If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information
about accessing the source trees is available at
http://www.mysql.com/doc/en/Installing_source_tree.html
Additional info:
Fix will come in 4.0.19
[11 Mar 2004 13:23]
Sinisa Milivojevic
Fixed in 4.0.19 with the following patch:
===== /mnt/work/mysql-4.0/sql/sql_select.cc 1.276 vs edited =====
*** /tmp/sql_select.cc-1.276-28277 Wed Mar 10 11:50:15 2004
--- edited//mnt/work/mysql-4.0/sql/sql_select.cc Thu Mar 11 16:39:27 2004
***************
*** 4897,4904 ****
if (tab->on_expr && !table->null_row)
{
if ((table->null_row= test(tab->on_expr->val_int() == 0)))
! empty_record(table);
! }
if (!table->null_row)
table->maybe_null=0;
DBUG_RETURN(0);
--- 4897,4904 ----
if (tab->on_expr && !table->null_row)
{
if ((table->null_row= test(tab->on_expr->val_int() == 0)))
! mark_as_null_row(table);
! }
if (!table->null_row)
table->maybe_null=0;
DBUG_RETURN(0);
ChangeSet info:
1.1745: +3 -0 = 10639
