2727 Guilhem Bichot 2009-03-16 [merge]
merge of 5.1-maria into 6.0-maria
modified:
client/mysqltest.cc
2726 Guilhem Bichot 2009-03-13
Fix for multiple symptoms sharing the same cause:
BUG#42297 Maria: crash in multi-range-read code
BUG#42298 Maria: SELECT with join returns no rows
BUG#42299 Maria: SELECT using cp1251-table returns no rows
BUG#42681 Maria returns duplicate rows with range access on 'date type
BUG#42683 Maria returns wrong results for <= NULL and <> NULL
BUG#43527 Maria returns no rows on multi range access with limit clause
BUG#43530 Maria has Issues with range select <>, < with -ve range values on signed index
BUG#43552 Maria returned wrong rows with range access on float
BUG#43620 Maria throws 'Got error 176 from storage engine' on a range query
BUG#43623 Maria returns no rows with date index on range access >, >=, BETWEEN
@ mysql-test/suite/maria/r/maria.result
after fixing the bug, we can see one more row in the result. Ah, if we had paid attention
to maria.result when we added this straight_join test, we would have caught the bug immediately.
@ mysql-test/suite/maria/r/maria4.result
result
@ mysql-test/suite/maria/t/maria4.test
test for fixed bugs. All its pieces would fail (errno 176, missing rows, too many rows) without the entire
bugfix of ma_rkey.c
@ storage/maria/ma_rkey.c
Because of missing (), icp_res was inverted compared to the result of
ma_check_index_cond(), which wasn't desired (0==0 -> 1, 1==0 -> 0). We would go
to "err:" wrongly and thus pick up the value of my_errno which was left from previous
functions (for example, 176 left by the ha_tina CSV log write at start of statement!);
sometimes the errno would be returned to client, sometimes it would just cause
a matching row to be missed.
This fixed BUG#42297 BUG#42298. But was not enough for BUG#43552:
- icp_res==2 was not converted to "key not found", causing non-matching rows to be returned.
Now the usage of icp_res is closer to ma_rnext.c and ma_rnext_same.c.
added:
mysql-test/suite/maria/r/maria4.result
mysql-test/suite/maria/t/maria4.test
modified:
mysql-test/suite/maria/r/maria.result
storage/maria/ma_key.c
storage/maria/ma_rkey.c
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc 2009-03-11 17:17:00 +0000
+++ b/client/mysqltest.cc 2009-03-16 10:20:57 +0000
@@ -6908,14 +6908,6 @@ end:
dynstr_free(&ds_execute_warnings);
}
-
- /* Close the statement if - no reconnect, need new prepare */
- if (mysql->reconnect)
- {
- mysql_stmt_close(stmt);
- cur_con->stmt= NULL;
- }
-
/*
We save the return code (mysql_stmt_errno(stmt)) from the last call sent
to the server into the mysqltest builtin variable $mysql_errno. This
@@ -6924,6 +6916,13 @@ end:
var_set_errno(mysql_stmt_errno(stmt));
+ /* Close the statement if reconnect, need new prepare */
+ if (mysql->reconnect)
+ {
+ mysql_stmt_close(stmt);
+ cur_con->stmt= NULL;
+ }
+
DBUG_VOID_RETURN;
}
Attachment: [text/bzr-bundle] bzr/guilhem@mysql.com-20090316102057-u27yey7du3os098i.bundle
| Thread |
|---|
| • bzr push into mysql-6.0 branch (guilhem:2726 to 2727) | Guilhem Bichot | 16 Mar |