Bug #21188 mysqlimport returns random exit code
Submitted: 20 Jul 2006 17:03 Modified: 28 Jul 2006 4:44
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Backup Severity:S3 (Non-critical)
Version:mysql-5.1 OS:
Assigned to: Magnus Blåudd CPU Architecture:Any

[20 Jul 2006 17:03] Magnus Blåudd
mysqlimport executed with --use-threads returns random exit code. This is most likely a threading issue where one of the child threads affects the exitcode when they exit after the main thread.

How to repeat:
./mysql-test-run.pl --do-test=mysqldump

Suggested fix:
Wait for the child threads to exit before exiting from the main loop.
[21 Jul 2006 14:11] Magnus Blåudd
Found that mysqlimport has crashed. Thus 'pclose' in mysqltest returns -1 and errno 10(ECHILD).

(gdb) where
#2  0x00568149 in abort () from /lib/tls/libc.so.6
#3  0x00ac01ca in safe_mutex_lock (mp=0x804cba0, file=0x804b429 "e time.\n",
    line=637) at thr_mutex.c:113
#4  0x0804a7ef in main (argc=2, argv=0x965e190) at mysqlimport.c:645
[21 Jul 2006 14:53] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

[27 Jul 2006 12:11] Magnus Blåudd
Pushed to 5.1.12
[28 Jul 2006 4:44] Paul Dubois
Noted in 5.1.12 changelog.