0
> Create Table: CREATE TABLE `trb3` (
  `id` int(11) default NULL,
  `name` varchar(50) default NULL,
  `purchased` date default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 
PARTITION BY RANGE (YEAR(purchased)) (
  PARTITION p0 VALUES LESS THAN (1990) ENGINE = MyISAM, 
  PARTITION p1 VALUES LESS THAN (1995) ENGINE = MyISAM, 
  PARTITION p2 VALUES LESS THAN (2000) ENGINE = MyISAM, 
  PARTITION p3 VALUES LESS THAN (2005) ENGINE = MyISAM
)
> LOAD DATA INFILE "/path/to/data" INTO TABLE trb3;

Hung up

> SELECT VERSION();
+------------+
| VERSION()  |
+------------+
| 5.1.39-log |
+------------+

BUT if we inserted to dummy data to p1,p2,p3

LOAD DATA INFILE "/path/to/data" INTO TABLE trb3; The error will not be occured.

Why?

freddiefujiwra
  • 1,667
  • 5
  • 25
  • 34

1 Answers1

0

Does your MySQL server have at least read access to the file you're trying to import ? If you're using the LOCAL keyword, then the file is local to the client, otherwise you'll have to ensure the server can access and read it...

You can have a look at the LOCAL paragraph at http://dev.mysql.com/doc/refman/5.1/en/load-data.html

MunsterNet
  • 454
  • 2
  • 3
  • thank you for your comment.but I have tried basically methods and no problem. In my search . it will be occured in case of empty partitions table and LOAD. empty partition , insert , load are no problem – freddiefujiwra Jun 01 '11 at 05:19