Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.
> 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?

share|improve this question
add comment

1 Answer

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

share|improve this answer
    
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 1 '11 at 5:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.