merge table query failure after optimising underlying table

merge table query failure after optimising underlying table

am 08.11.2002 14:19:16 von Peter

>Description:

Optimising an underlying table seems to make most queries on a merge table
fail. The nature of the failure is different for SQL run from the linux
command-line and SQL run from a remote client (Mascon under Windows): the
command-line gives "Got error 134 from table handler"; Mascon returns a
truncated result set (only records from the un-optimised table(s)).

I've tried to reduce the how-to-repeat to the minimum neccessary. Note that
you have to perform a select on the merge table before deleting from (and
optimising) the underlying table to reproduce the problem.

Running a variant of the how-to-repeat without the index on the tables
alters the result slightly: both the linux command-line and Mascon return a
truncated result set (only records from table2).

>How-To-Repeat:

create table test1 (val1 int, index(val1));
create table test2 (val1 int, index(val1));
insert into test1 values (1);
insert into test2 values (2);
insert into test1 values (3);
create table test_merge (val1 int, index (val1))
type=merge union=(test1, test2);
select * from test_merge;
delete from test1 where val1 = 1;
optimize table test1;
select * from test_merge;

>Fix:

Problem can be cleared by dropping/recreating the merge table, or by
restarting mysqld.

>Submitter-Id:
>Originator: Peter Burns
>Organization:
Connection Software
>MySQL support: none
>Synopsis: merge table query failure after optimising underlying table
>Severity: non-critical
>Priority: low
>Category: mysql
>Class: sw-bug
>Release: mysql-3.23.41 (Source distribution)

>Environment:

System: Linux love 2.4.7-10 #1 Thu Sep 6 17:27:27 EDT 2001 i686 unknown
Architecture: i686

Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-108.7.2)
Compilation info: CC='gcc' CFLAGS='-O2 -march=i386 -mcpu=i686 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE' CXX='c++' CXXFLAGS='-O2 -march=i386 -mcpu=i686 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE' LDFLAGS=''
LIBC:
lrwxrwxrwx 1 root root 13 Mar 6 2002 /lib/libc.so.6 -> libc-2.2.4.so
-rwxr-xr-x 1 root root 1282588 Sep 4 2001 /lib/libc-2.2.4.so
-rw-r--r-- 1 root root 27304836 Sep 4 2001 /usr/lib/libc.a
-rw-r--r-- 1 root root 178 Sep 4 2001 /usr/lib/libc.so
Configure command: ./configure i386-redhat-linux --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --without-debug --without-readline --enable-shared --with-extra-charsets=complex --with-bench --localstatedir=/var/lib/mysql --with-unix-socket-path=/var/lib/mysql/mysql.sock --with-mysqld-user=mysql --with-extra-charsets=all --disable-assember --with-berkeley-db --enable-large-files=yes --enable-largefile=yes --with-thread-safe-client --enable-assembler


------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread12919@lists.mysql.com
To unsubscribe, e-mail