15.15. Tratamiento de errores de InnoDB

MySQL 5.0

15.15. Tratamiento de errores de InnoDB

Error handling in is not always the same as specified in the SQL standard. According to the standard, any error during an SQL statement should cause the rollback of that statement. sometimes rolls back only part of the statement, or the whole transaction. The following items describe how performs error handling:

  • If you run out of file space in the tablespace, you get the MySQL error and rolls back the SQL statement.

  • A transaction deadlock or a timeout in a lock wait causes to roll back the whole transaction.

  • A duplicate-key error rolls back the SQL statement, if you have not specified the option in your statement.

  • A rolls back the SQL statement.

  • Other errors are mostly detected by the MySQL layer of code (above the storage engine level), and they roll back the corresponding SQL statement. Locks are not released in a rollback of a single SQL statement.

During implicit rollbacks, as well as during the execution of an explicit SQL command, displays in the column for the relevant connection.

15.15.1. Códigos de error de InnoDB

The following is a non-exhaustive list of common -specific errors that you may encounter, with information about why they occur and how to resolve the problem.

  • Cannot create table. If the error message string refers to 150, table creation failed because a foreign key constraint was not correctly formed.

  • Cannot find the table from the data files though the file for the table exists. See Sección 15.17.1, “Resolver problemas de las operaciones del diccionario de datos de .

  • has run out of free space in the tablespace. You should reconfigure the tablespace to add a new data file.

  • Lock wait timeout expired. Transaction was rolled back.

  • Transaction deadlock. You should rerun the transaction.

  • You are trying to add a row but there is no parent row, and a foreign key constraint fails. You should add the parent row first.

  • You are trying to delete a parent row that has children, and a foreign key constraint fails. You should delete the children first.

15.15.2. Códigos de error del sistema oeprativo

To print the meaning of an operating system error number, use the perror program that comes with the MySQL distribution.

The following table provides a list of some common Linux system error codes. For a more complete list, see Linux source code.

  • Operation not permitted

  • No such file or directory

  • No such process

  • Interrupted system call

  • I/O error

  • No such device or address

  • Arg list too long

  • Exec format error

  • Bad file number

  • No child processes

  • Try again

  • Out of memory

  • Permission denied

  • Bad address

  • Block device required

  • Device or resource busy

  • File exists

  • Cross-device link

  • No such device

  • Not a directory

  • Is a directory

  • Invalid argument

  • File table overflow

  • Too many open files

  • Inappropriate ioctl for device

  • Text file busy

  • File too large

  • No space left on device

  • Illegal seek

  • Read-only file system

  • Too many links

The following table provides a list of some common Windows system error codes. For a complete list see the Microsoft website.

  • Incorrect function.

  • The system cannot find the file specified.

  • The system cannot find the path specified.

  • The system cannot open the file.

  • Access is denied.

  • The handle is invalid.

  • The storage control blocks were destroyed.

  • Not enough storage is available to process this command.

  • The storage control block address is invalid.

  • The environment is incorrect.

  • An attempt was made to load a program with an incorrect format.

  • The access code is invalid.

  • The data is invalid.

  • Not enough storage is available to complete this operation.

  • The system cannot find the drive specified.

  • The directory cannot be removed.

  • The system cannot move the file to a different disk drive.

  • There are no more files.

  • The media is write protected.

  • The system cannot find the device specified.

  • The device is not ready.

  • The device does not recognize the command.

  • Data error (cyclic redundancy check).

  • The program issued a command but the command length is incorrect.

  • The drive cannot locate a specific area or track on the disk.

  • The specified disk or diskette cannot be accessed.

  • The drive cannot find the sector requested.

  • The printer is out of paper.

  • The system cannot write to the specified device.

  • The system cannot read from the specified device.

  • A device attached to the system is not functioning.

  • The process cannot access the file because it is being used by another process.

  • The process cannot access the file because another process has locked a portion of the file.

  • The wrong diskette is in the drive. Insert %2 (Volume Serial Number: %3) into drive %1.

  • Too many files opened for sharing.

  • Reached the end of the file.

  • The disk is full.

  • The parameter is incorrect. (If you get this error on Windows, and you have set in or , then add the line to your or file.)

  • The disk is full.

  • The filename, directory name, or volume label syntax is incorrect.

  • Insufficient system resources exist to complete the requested service.