Below is the list of changes that have just been committed into a local
6.0-falcon repository of hakan. When hakan does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-05-02 09:22:04+02:00, hakank@stripped +5 -0
Fix for Bug#28158.
Problem was that even if the table->read_set bitmap is not set
the field has to be read to get right error messages in case
of duplicate key errors.
This patch ignores the table->read_set bitmap and reads all fields
which could be negative for performance.
A better solution could be to not read a field if table->read_set bitmap
is not set and the field in question is not an unique key. Pseudo code
would be:
if (data_type == edsTypeNull ||
(!bitmap_is_set(table->read_set, field_index) &&
!is_unique_key(field->field_index))
mysql-test/r/falcon_bug_28158.result@stripped, 2007-05-02 09:22:01+02:00,
hakank@stripped +32 -2
Enhanced test case for Bug#28158.
mysql-test/t/disabled.def@stripped, 2007-05-02 09:22:01+02:00, hakank@stripped
+0 -2
Removed test cases of fixed bugs.
mysql-test/t/falcon_bug_28158.test@stripped, 2007-05-02 09:22:01+02:00,
hakank@stripped +28 -3
Enhanced test case for Bug#28158.
storage/falcon/QueryString.cpp@stripped, 2007-05-02 09:22:01+02:00,
hakank@stripped +1 -1
Fixed gcc compiler warning.
storage/falcon/ha_falcon.cpp@stripped, 2007-05-02 09:22:01+02:00,
hakank@stripped +2 -2
Fix for Bug#28158.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: hakank
# Host: lu0011.wdf.sap.corp
# Root: /home/hakan/work/mysql/mysql-5.1-falcon
--- 1.2/mysql-test/r/falcon_bug_28158.result 2007-05-01 18:12:03 +02:00
+++ 1.3/mysql-test/r/falcon_bug_28158.result 2007-05-02 09:22:01 +02:00
@@ -1,18 +1,48 @@
*** Bug #28158 ***
SET @@storage_engine = 'Falcon';
DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (a int, b int, UNIQUE KEY (a, b));
+DROP TABLE IF EXISTS t2;
+DROP TABLE IF EXISTS t3;
+CREATE TABLE t1 (a int, b int, KEY (a, b));
+CREATE TABLE t2 (a int, b int, UNIQUE KEY (a, b));
+CREATE TABLE t3 (a int, b int, PRIMARY KEY (a, b));
INSERT INTO t1 VALUES (1, 2);
INSERT INTO t1 VALUES (2, 2);
+INSERT INTO t2 VALUES (1, 2);
+INSERT INTO t2 VALUES (2, 2);
+INSERT INTO t3 VALUES (1, 2);
+INSERT INTO t3 VALUES (2, 2);
UPDATE t1 SET a = 1;
-ERROR 23000: Duplicate entry '1-2' for key 'a'
UPDATE t1 SET a = 1 ORDER BY a;
+UPDATE t2 SET a = 1;
+ERROR 23000: Duplicate entry '1-2' for key 'a'
+UPDATE t2 SET a = 1 ORDER BY a;
ERROR 23000: Duplicate entry '1-2' for key 'a'
+UPDATE t3 SET a = 1;
+ERROR 23000: Duplicate entry '1-2' for key 'PRIMARY'
+UPDATE t3 SET a = 1 ORDER BY a;
+ERROR 23000: Duplicate entry '1-2' for key 'PRIMARY'
SELECT count(*) FROM t1;
count(*)
2
+SELECT count(*) FROM t2;
+count(*)
+2
+SELECT count(*) FROM t3;
+count(*)
+2
SELECT * FROM t1 ORDER by a;
a b
1 2
+1 2
+SELECT * FROM t2 ORDER by a;
+a b
+1 2
+2 2
+SELECT * FROM t3 ORDER by a;
+a b
+1 2
2 2
DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
--- 1.2/mysql-test/t/falcon_bug_28158.test 2007-05-01 18:12:03 +02:00
+++ 1.3/mysql-test/t/falcon_bug_28158.test 2007-05-02 09:22:01 +02:00
@@ -11,27 +11,52 @@
--disable_warnings
DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP TABLE IF EXISTS t3;
--enable_warnings
-CREATE TABLE t1 (a int, b int, UNIQUE KEY (a, b));
+CREATE TABLE t1 (a int, b int, KEY (a, b));
+CREATE TABLE t2 (a int, b int, UNIQUE KEY (a, b));
+CREATE TABLE t3 (a int, b int, PRIMARY KEY (a, b));
+
INSERT INTO t1 VALUES (1, 2);
INSERT INTO t1 VALUES (2, 2);
+INSERT INTO t2 VALUES (1, 2);
+INSERT INTO t2 VALUES (2, 2);
+
+INSERT INTO t3 VALUES (1, 2);
+INSERT INTO t3 VALUES (2, 2);
+
# ----------------------------------------------------- #
# --- Test --- #
# ----------------------------------------------------- #
---error 1582
UPDATE t1 SET a = 1;
---error 1582
UPDATE t1 SET a = 1 ORDER BY a;
+--error 1582
+UPDATE t2 SET a = 1;
+--error 1582
+UPDATE t2 SET a = 1 ORDER BY a;
+
+--error 1582
+UPDATE t3 SET a = 1;
+--error 1582
+UPDATE t3 SET a = 1 ORDER BY a;
+
# ----------------------------------------------------- #
# --- Check --- #
# ----------------------------------------------------- #
SELECT count(*) FROM t1;
+SELECT count(*) FROM t2;
+SELECT count(*) FROM t3;
SELECT * FROM t1 ORDER by a;
+SELECT * FROM t2 ORDER by a;
+SELECT * FROM t3 ORDER by a;
# ----------------------------------------------------- #
# --- Final cleanup --- #
# ----------------------------------------------------- #
DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
--- 1.4/storage/falcon/QueryString.cpp 2007-04-23 15:50:36 +02:00
+++ 1.5/storage/falcon/QueryString.cpp 2007-05-02 09:22:01 +02:00
@@ -149,7 +149,7 @@
queryString = "";
memset (variables, 0, sizeof (variables));
- int length = strlen (queryString);
+ uint32 length = strlen (queryString);
char buffer [256];
char *temp = (length + 2 < sizeof (buffer)) ? buffer : new char [length + 2];
--- 1.153/storage/falcon/ha_falcon.cpp 2007-04-23 21:56:42 +02:00
+++ 1.154/storage/falcon/ha_falcon.cpp 2007-05-02 09:22:01 +02:00
@@ -2099,9 +2099,9 @@
if (ptrDiff)
field->move_field_offset(ptrDiff);
- if (dataStream->type == edsTypeNull ||
- !bitmap_is_set(table->read_set, field->field_index))
+ if (dataStream->type == edsTypeNull)
field->set_null();
+
else
{
field->set_notnull();
--- 1.316/mysql-test/t/disabled.def 2007-04-30 22:17:25 +02:00
+++ 1.317/mysql-test/t/disabled.def 2007-05-02 09:22:01 +02:00
@@ -69,8 +69,6 @@
falcon_bug_27697 : Bug#27697 2007-04-07 hakank Currently failing
falcon_bug_27997 : Bug#27997 2007-04-21 hakank Currently failing
falcon_bug_28026 : Bug#28026 2007-04-25 hakank Currently failing
-falcon_bug_28158 : Bug#28158 2007-04-30 hakank Currently failing
-falcon_bug_28165 : Bug#28165 2007-04-30 hakank Currently hangs
falcon_page_size_1 : Bug#23220 2007-02-19 hakank Currently failing
falcon_page_size_2 : Bug#23220 2007-02-19 hakank Currently failing
read_many_rows_falcon : Bug#23783 2006-10-30 ML Get pushbuild green
| Thread |
|---|
| • bk commit into 6.0-falcon tree (hakank:1.2578) BUG#28158 | Hakan Kuecuekyilmaz | 2 May |