>Description:
A constraint violation doesn't show which constraint was violated,
which is bad for fixing bugs.
>How-To-Repeat:
create table a(b int, index(b)) type=innodb;
create table c(d int, index(d)) type=innodb;
alter table c add constraint foo foreign key(`d`) references `a` (`b`);
insert into c values(123);
=> ERROR 1216: Cannot add or update a child row: a foreign key constraint fails
>Fix:
Tell me which constraint fails, please.
>Submitter-Id: <submitter ID>
>Originator: Matthias Urlichs
>Organization:
noris network AG, Nuernberg, Germany
>MySQL support: icense
>Synopsis: Constraint violations don't show which constraint fails
>Severity: serious
>Priority: low
>Category: mysql
>Class: sw-bug
>Release: mysql-4.1.0-alpha (current Bitkeeper source)
>C compiler: gcc.real (GCC) 3.2.3 20030308 (Debian prerelease)
>C++ compiler: g++.real (GCC) 3.2.3 20030228 (Debian prerelease)
>Environment:
System: Linux play.smurf.noris.de 2.4.19-586tsc #1 Sun Oct 6 18:00:21 EST 2002 i686
unknown unknown GNU/Linux
Architecture: i686
Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-linux/3.2.3/specs
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,proto,pascal,objc,ada --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib
--enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu
--enable-java-gc=boehm --enable-objc-gc i386-linux
Thread model: posix
gcc version 3.2.3 20030308 (Debian prerelease)
Compilation info: CC='gcc' CFLAGS='' CXX='g++' CXXFLAGS='' LDFLAGS='' ASFLAGS=''
LIBC:
lrwxrwxrwx 1 root root 13 2003-02-28 17:59 /lib/libc.so.6 ->
libc-2.3.1.so
-rwxr-xr-x 1 root root 1104072 2003-02-25 14:46 /lib/libc-2.3.1.so
-rw-r--r-- 1 root root 2337976 2003-02-25 14:47 /usr/lib/libc.a
-rw-r--r-- 1 root root 178 2003-02-25 14:47 /usr/lib/libc.so
Configure command: ./configure '--prefix=/usr' '--exec-prefix=/usr'
'--libexecdir=/usr/sbin' '--datadir=/usr/share' '--sysconfdir=/etc/mysql'
'--localstatedir=/var/lib/mysql' '--includedir=/usr/include'
'--infodir=/usr/share/info' '--mandir=/usr/share/man' '--enable-shared'
'--enable-static' '--enable-thread-safe-client' '--enable-assembler'
'--enable-local-infile' '--with-raid'
'--with-unix-socket-path=/var/run/mysqld/mysqld.sock' '--with-mysqld-user=mysql'
'--with-libwrap' '--with-client-ldflags=-lstdc++' '--with-embedded-server'
'--with-vio' '--with-openssl' '--without-docs' '--without-bench' '--without-readline'
'--with-extra-charsets=all' '--with-debug' '--with-innodb'
---------------------------------------------------------------------
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