>Description:
        "DELETE FROM mergetable" clears merge definition
>How-To-Repeat:

mysql> use test;
Database changed
mysql> CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, message CHAR(20));
Query OK, 0 rows affected (0.04 sec)

mysql> CREATE TABLE t2 (a INT AUTO_INCREMENT PRIMARY KEY, message CHAR(20));
Query OK, 0 rows affected (0.00 sec)

mysql> INSERT INTO t1 (message) VALUES ("Testing"),("table"),("t1");
Query OK, 3 rows affected (0.11 sec)
Records: 3  Duplicates: 0  Warnings: 0

mysql> INSERT INTO t2 (message) VALUES ("Testing"),("table"),("t2");
Query OK, 3 rows affected (0.01 sec)
Records: 3  Duplicates: 0  Warnings: 0

mysql> CREATE TABLE total (a INT NOT NULL, message CHAR(20), KEY(a)) TYPE=MERGE 
UNION=(t1,t2);
Query OK, 0 rows affected (0.00 sec)

mysql> 
mysql> select * from total;
+---+---------+
| a | message |
+---+---------+
| 1 | Testing |
| 2 | table   |
| 3 | t1      |
| 1 | Testing |
| 2 | table   |
| 3 | t2      |
+---+---------+
6 rows in set (0.03 sec)

mysql> delete from total;
Query OK, 0 rows affected (0.01 sec)

mysql> select * from total;
Empty set (0.00 sec)

!!! you can now also check that totals.MRG is empty !!!

mysql> select * from t1;
+---+---------+
| a | message |
+---+---------+
| 1 | Testing |
| 2 | table   |
| 3 | t1      |
+---+---------+
3 rows in set (0.00 sec)

mysql> select * from t2;
+---+---------+
| a | message |
+---+---------+
| 1 | Testing |
| 2 | table   |
| 3 | t2      |
+---+---------+
3 rows in set (0.01 sec)

mysql> alter TABLE total UNION=(t1,t2);
Query OK, 0 rows affected (1.00 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> select * from total;
+---+---------+
| a | message |
+---+---------+
| 1 | Testing |
| 2 | table   |
| 3 | t1      |
| 1 | Testing |
| 2 | table   |
| 3 | t2      |
+---+---------+
6 rows in set (0.01 sec)

mysql> 

>Fix:
Use a WHERE clause to specify which rows to delete.

>Submitter-Id:  [EMAIL PROTECTED]
>Originator:    Fred van Engen
>Organization:
 XO Communications B.V.
>MySQL support: none
>Synopsis:      "DELETE FROM mergetable" clears merge definition
>Severity:      non-critical
>Priority:      low
>Category:      mysql
>Class:         sw-bug
>Release:       mysql-3.23.33 (Source distribution)

>Environment:
        
System: SunOS lei 5.7 Generic_106541-07 sun4u sparc SUNW,Ultra-250
Architecture: sun4

Some paths:  /usr/local/bin/perl /usr/local/bin/make /usr/local/bin/gcc
GCC: Reading specs from /opt/gcc/lib/gcc-lib/sparc-sun-solaris2.7/2.8.1/specs
gcc version 2.8.1
Compilation info: CC='gcc'  CFLAGS=''  CXX='gcc'  CXXFLAGS=''  LDFLAGS=''
LIBC: 
-rw-r--r--   1 bin      bin      1693556 Sep 22  1999 /lib/libc.a
lrwxrwxrwx   1 root     root          11 Oct  7  1999 /lib/libc.so -> ./libc.so.1
-rwxr-xr-x   1 bin      bin      1115304 Sep 22  1999 /lib/libc.so.1
-rw-r--r--   1 bin      bin      1693556 Sep 22  1999 /usr/lib/libc.a
lrwxrwxrwx   1 root     root          11 Oct  7  1999 /usr/lib/libc.so -> ./libc.so.1
-rwxr-xr-x   1 bin      bin      1115304 Sep 22  1999 /usr/lib/libc.so.1
Configure command: ./configure  --prefix=/opt/mysql-3.23
Perl: This is perl, version 5.005_03 built for sun4-solaris

!!! The above is generated by mysqlbug on the system that MySQL runs on. The
!!! MySQL source was compiled on an identical system with gcc 2.95.2.


---------------------------------------------------------------------
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 <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to