Enviado por Juan Francisco ... el Dom, 28/03/2010 - 22:52.• Foro general
Al insertar datos en una tabla InnoDB me aparecio:
ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (tempfile operation failed)
Asi que en una terminal edite:
sudo gedit /etc/mysql/my.cnf
y en la seccion:
# * InnoDB
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.# Read the manual for more InnoDB related options. There are many!
#*** INNODB Specific options ***
# Use this option if you have a MySQL server with InnoDB support enabled
# butyou do not plan to use it. This will save memory and disk space
# and speed up some things.
# Additional memory pool that is used by InnoDB to store metadata
# information.If InnoDB requires more memory for this purpose it will
# start to allocate it from the OS. As this is fast enough on most
# recent operating systems, you normally do not need to change this# value. SHOW INNODB STATUS will display the current amount used.
# If set to 1, InnoDB will flush (fsync) the transaction logs to the
# disk at eachcommit, which offers full ACID behavior. If you are
# willing to compromise this safety, and you are running small
# transactions, you may set this to 0 or 2 to reduce disk I/O to the
# logs. Value0 means that the log is only written to the log file and
# the log file flushed to disk approximately once per second. Value 2
# means the log is written to the log file at each commit, but thelog
# file is only flushed to disk approximately once per second.
# The size of the buffer InnoDB uses for buffering log data. As soon as
# it is...