Bug #12958 mysqlimport -L option crashes on HP/UX
Submitted: 2 Sep 2005 20:33 Modified: 9 Sep 2005 18:39
Reporter: Hartmut Holzgraefe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:4.0 and up OS:HP/UX (HP/UX 11.*)
Assigned to: Paul DuBois CPU Architecture:Any

[2 Sep 2005 20:33] Hartmut Holzgraefe
Description:
mysqlimport when called with the -L option for LOCAL INFILE crashes on HP-UX 11.x (pa-RISC)

How to repeat:
mysqlimport  --user=<username> --password=<password> -L --fields-terminated-by="," --fields-escaped-by=\\ dbname  filename.txt

Suggested fix:
in client/mysqlimport.c line 370

    mysql_options(&mysql_connection,MYSQL_OPT_LOCAL_INFILE, (char*) &opt_local_file);

opt_local_file is a my_bool variable (so actualy a char) whereas mysql_options() requires a
pointer to an unsigned int as its parameter. this causes an alignment fault on pa-risc

changing the type of opt_local_file should fix the problem
[2 Sep 2005 20: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:

  http://lists.mysql.com/internals/29257
[9 Sep 2005 17:56] Hartmut Holzgraefe
will be fixed in 4.0.27, 4.1.15, 5.0.13
[9 Sep 2005 18:39] Paul DuBois
Noted in 4.0.27, 4.1.15, 5.0.13 changelogs.