Announcement

Announcement Module
Collapse
No announcement yet.

Outfile huge table caused error

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Outfile huge table caused error

    Hi,

    i have a table which contains 10 millions records and i want to have full dump in outfile in CSV format. But there is error regarding disk full.
    I am getting the following error

    100206 4:13:13 [ERROR] /usr/libexec/mysqld: Incorrect key file for table '#sql_64e8_0.MYI'; try to repair it
    100206 4:13:13 [ERROR] /usr/libexec/mysqld: Disk is full writing '/var/log/mysql/slonj157.016913' (Errcode: 28). Waiting for someone to free space... Retry in 60 secs
    100206 4:23:23 [ERROR] /usr/libexec/mysqld: Incorrect key file for table '#sql_64e8_0.MYI'; try to repair it
    100206 4:23:23 [ERROR] /usr/libexec/mysqld: Disk is full writing '/var/log/mysql/slonj157.016916' (Errcode: 28). Waiting for someone to free space... Retry in 60 secs


    I have used the below query to generate outfile
    ${MYSQL} -u$db_user -p$db_pass ${DATABASE} -Bse "set max_heap_table_size= 1073741824; set tmp_table_size= 1073741824;select
    'id','asin','title','artist','modified','created' union
    select id,asin,title,artist,modified,created from table_name INTO OUTFILE \"/tmp/table_name.csv\" FIELDS TERMINATED BY \"^~\"
    OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\\n';"

    As tmp size is only 512MB i have set 1Gb in session.So why i am getting this error? There is more than 24 GB space in / folder.

    Thanks In advance.

    Fedora

  • #2
    /var is mounted on a different partition? WHat's the output of df?

    Comment


    • #3
      Below are the output of df -h

      Filesystem Size Used Avail Use% Mounted on
      /dev/mapper/Vol00
      39G 13G 24G 36% /
      /dev/p1 97M 27M 65M 30% /boot
      tmpfs 7.9G 0 7.9G 0% /dev/shm

      Comment

      Working...
      X