Below is the list of changes that have just been committed into a local
5.1 repository of svoj. When svoj 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, 2006-09-29 00:23:43+05:00, svoj@april.(none) +5 -0
Merge mysql.com:/home/svoj/devel/mysql/BUG21617/mysql-5.0-engines
into mysql.com:/home/svoj/devel/mysql/BUG21617/mysql-5.1-engines
MERGE: 1.1810.1697.160
mysql-test/r/merge.result@stripped, 2006-09-29 00:23:38+05:00, svoj@april.(none) +0 -0
Auto merged
MERGE: 1.43.1.10
mysql-test/t/merge.test@stripped, 2006-09-29 00:23:38+05:00, svoj@april.(none) +0 -0
Auto merged
MERGE: 1.37.1.8
mysys/queues.c@stripped, 2006-09-29 00:23:38+05:00, svoj@april.(none) +0 -0
Auto merged
MERGE: 1.15.1.1
storage/myisammrg/myrg_open.c@stripped, 2006-09-29 00:23:38+05:00, svoj@april.(none) +0 -0
Auto merged
MERGE: 1.27.9.2
storage/myisammrg/myrg_open.c@stripped, 2006-09-29 00:23:38+05:00, svoj@april.(none) +0
-0
Merge rename: myisammrg/myrg_open.c -> storage/myisammrg/myrg_open.c
storage/myisammrg/myrg_queue.c@stripped, 2006-09-29 00:23:38+05:00, svoj@april.(none) +0 -0
Auto merged
MERGE: 1.10.4.2
storage/myisammrg/myrg_queue.c@stripped, 2006-09-29 00:23:38+05:00, svoj@april.(none) +0
-0
Merge rename: myisammrg/myrg_queue.c -> storage/myisammrg/myrg_queue.c
# 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: svoj
# Host: april.(none)
# Root: /home/svoj/devel/mysql/BUG21617/mysql-5.1-engines/RESYNC
--- 1.27.9.1/myisammrg/myrg_open.c 2006-09-29 00:23:50 +05:00
+++ 1.34/storage/myisammrg/myrg_open.c 2006-09-29 00:23:50 +05:00
@@ -46,7 +46,8 @@ MYRG_INFO *myrg_open(const char *name, i
LINT_INIT(key_parts);
bzero((char*) &file,sizeof(file));
- if ((fd=my_open(fn_format(name_buff,name,"",MYRG_NAME_EXT,4),
+ if ((fd=my_open(fn_format(name_buff,name,"",MYRG_NAME_EXT,
+ MY_UNPACK_FILENAME|MY_APPEND_EXT),
O_RDONLY | O_SHARE,MYF(0))) < 0)
goto err;
errpos=1;
--- 1.17/mysys/queues.c 2006-09-29 00:23:50 +05:00
+++ 1.18/mysys/queues.c 2006-09-29 00:23:50 +05:00
@@ -208,28 +208,22 @@ void delete_queue(QUEUE *queue)
void queue_insert(register QUEUE *queue, byte *element)
{
- reg2 uint idx,next;
+ reg2 uint idx, next;
int cmp;
-
-#ifndef DBUG_OFF
- if (queue->elements < queue->max_elements)
-#endif
+ DBUG_ASSERT(queue->elements < queue->max_elements);
+ queue->root[0]= element;
+ idx= ++queue->elements;
+ /* max_at_top swaps the comparison if we want to order by desc */
+ while ((cmp= queue->compare(queue->first_cmp_arg,
+ element + queue->offset_to_key,
+ queue->root[(next= idx >> 1)] +
+ queue->offset_to_key)) &&
+ (cmp ^ queue->max_at_top) < 0)
{
- queue->root[0]=element;
- idx= ++queue->elements;
-
- /* max_at_top swaps the comparison if we want to order by desc */
- while ((cmp=queue->compare(queue->first_cmp_arg,
- element+queue->offset_to_key,
- queue->root[(next=idx >> 1)] +
- queue->offset_to_key)) &&
- (cmp ^ queue->max_at_top) < 0)
- {
- queue->root[idx]=queue->root[next];
- idx=next;
- }
- queue->root[idx]=element;
+ queue->root[idx]= queue->root[next];
+ idx= next;
}
+ queue->root[idx]= element;
}
/*
@@ -262,16 +256,12 @@ int queue_insert_safe(register QUEUE *qu
byte *queue_remove(register QUEUE *queue, uint idx)
{
-#ifndef DBUG_OFF
- if (idx >= queue->max_elements)
- return 0;
-#endif
- {
- byte *element=queue->root[++idx]; /* Intern index starts from 1 */
- queue->root[idx]=queue->root[queue->elements--];
- _downheap(queue,idx);
- return element;
- }
+ byte *element;
+ DBUG_ASSERT(idx < queue->max_elements);
+ element= queue->root[++idx]; /* Intern index starts from 1 */
+ queue->root[idx]= queue->root[queue->elements--];
+ _downheap(queue, idx);
+ return element;
}
/* Fix when element on top has been replaced */
--- 1.55/mysql-test/r/merge.result 2006-09-29 00:23:50 +05:00
+++ 1.56/mysql-test/r/merge.result 2006-09-29 00:23:50 +05:00
@@ -771,6 +771,12 @@ Table Op Msg_type Msg_text
test.t1 check status OK
test.t2 check status OK
drop table t1, t2, t3;
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES(2),(1);
+CREATE TABLE t2(a INT, KEY(a)) ENGINE=MERGE UNION=(t1);
+SELECT * FROM t2 WHERE a=2;
+ERROR HY000: Got error 124 from storage engine
+DROP TABLE t1, t2;
CREATE TABLE t1(a INT) ENGINE=MEMORY;
CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t1);
SELECT * FROM t2;
--- 1.45/mysql-test/t/merge.test 2006-09-29 00:23:50 +05:00
+++ 1.46/mysql-test/t/merge.test 2006-09-29 00:23:50 +05:00
@@ -382,6 +382,17 @@ check table t1, t2;
drop table t1, t2, t3;
#
+# BUG#21617 - crash when selecting from merge table with inconsistent
+# indexes
+#
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES(2),(1);
+CREATE TABLE t2(a INT, KEY(a)) ENGINE=MERGE UNION=(t1);
+--error 1030
+SELECT * FROM t2 WHERE a=2;
+DROP TABLE t1, t2;
+
+#
# BUG#10974 - No error message if merge table based on union of innodb,
# memory
#
| Thread |
|---|
| • bk commit into 5.1 tree (svoj:1.2345) | Sergey Vojtovich | 28 Sep |