Hi!

I suspect that there might be a bug in the LOAD DATA and SOURCE statements
of MySQL-4.0.1-2 (alpha), but since I'm not 100% sure, I am sending this
to the list and maybe someone else migt be able to reproduce...

My configuration:
RedHat Linux 7.3 on i686
MySQL-4.0.1-2 server+client

MySQL built with rpm's from MySQL site.


The problem:

When issuing (from within the mysql client) the following statement;
mysql> LOAD DATA LOCAL INFILE '/path/to/data' INTO TABLE table;
ERROR 2013: Lost connection to MySQL server during query

It reads the first line from my file, and then drops connection.

Also when trying to run "SQL script" with the SOURCE command I get this
error. I found that I cannot create some INNODB tables from within my
script (some INNODB tables are created and some are not, I can't figure
out why).

My SOURCE file looks like this (shortened a bit):


DROP DATABASE db;
CREATE DATABASE db;
USE db;

CREATE TABLE customers (
  customers_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
  INDEX customers_index (customers_id),
  companyname VARCHAR(80) NOT NULL,
  contactname VARCHAR(80) NOT NULL,
  contactemail VARCHAR(80) NOT NULL,
  address VARCHAR(80) NOT NULL,
  postalcode VARCHAR(10) NOT NULL,
  city VARCHAR(80) NOT NULL,
  state VARCHAR(5),
  country VARCHAR(80) NOT NULL,
  PRIMARY KEY(customers_id)
)
TYPE=INNODB;
LOAD DATA LOCAL INFILE '/path/to/customers_data' INTO TABLE customers;

CREATE TABLE users (
  users_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
  username CHAR(10) BINARY NOT NULL,
  password CHAR(255) BINARY NOT NULL,
  customers_id INT NOT NULL,
  FOREIGN KEY (customers_id) REFERENCES customers(customers_id),
  PRIMARY KEY(users_id)
)
TYPE=MYISAM;
/* Used to be INNODB, but that don't work */
LOAD DATA LOCAL INFILE '/path/to/users_data' INTO TABLE users;

However, I "downgraded" to server version 4.0.0-alpha (I had the rpm's
lying around since earlier, so I gave it a shot), both LOAD DATA and SOURCE
statements work fine (with the same files that I tried to use with
4.0.1-2).

A "status shot" of my current (working) settings:

mysql> status;
--------------
mysql  Ver 11.19 Distrib 4.0.1-alpha, for pc-linux-gnu (i686)

Connection id:          1
Current database:       db
Current user:           root@localhost
Current pager:          stdout
Using outfile:          ''
Server version:         4.0.0-alpha
Protocol version:       10
Connection:             Localhost via UNIX socket
Client characterset:    latin1
Server characterset:    latin1
UNIX socket:            /var/lib/mysql/mysql.sock
Uptime:                 25 min 42 sec

Threads: 1  Questions: 114  Slow queries: 0  Opens: 26  Flush tables: 1
Open tables: 20  Queries per second avg: 0.074




Note! The Client is still 4.0.1-2.


Well, maybe I have missed or/and overlooked something, but maybe not...
is this a bug??


Patrik Birgersson


---------------------------------------------------------------------
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