1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Fixed wrong error codes from InnoDB/XtraDB that caused %M to give system dependent error messages (for unknown error code)

- InnoDB now returns handler specific HA_WRONG_CREATE_OPTION instead of MySQL specific ER_ILLEGAL_HA_CREATE_OPTION
- This changes the user level error message from "Unknown error" to "Wrong create options"


mysql-test/r/lowercase_table2.result:
  Updated result file
mysql-test/r/partition_innodb_plugin.result:
  Updated to new error message
mysql-test/r/partition_open_files_limit.result:
  Updated result file
mysql-test/r/row-checksum-old.result:
  Updated to new error message
mysql-test/r/row-checksum.result:
  Updated to new error message
mysql-test/r/symlink.result:
  Updated result file
mysql-test/suite/innodb/r/innodb-create-options.result:
  Updated to new error message
mysql-test/suite/innodb/r/innodb-zip.result:
  Updated to new error message
mysql-test/suite/innodb/r/innodb.result:
  Updated to new error message
storage/innobase/handler/ha_innodb.cc:
  Return HA_WRONG_CREATE_OPTION instead of ER_ILLEGAL_HA_CREATE_OPTION
  This gives more clear and OS indepedent error messages
storage/xtradb/handler/ha_innodb.cc:
  Return HA_WRONG_CREATE_OPTION instead of ER_ILLEGAL_HA_CREATE_OPTION
  This gives more clear and OS indepedent error messages
This commit is contained in:
Michael Widenius
2012-07-06 19:10:18 +03:00
parent f27c26e95a
commit 5a86a61219
11 changed files with 293 additions and 293 deletions

View File

@@ -67,7 +67,7 @@ LOCK TABLE t1 WRITE;
# ALTER fails because COMPRESSED/KEY_BLOCK_SIZE
# are incompatible with innodb_file_per_table = OFF;
ALTER TABLE t1 ADD PARTITION PARTITIONS 1;
ERROR HY000: Got error 1478 "Unknown error 1478" from storage engine
ERROR HY000: Got error 140 "Wrong create options" from storage engine
t1#P#p0.ibd
t1.frm
t1.par
@@ -76,18 +76,18 @@ t1.par
SET innodb_strict_mode = OFF;
ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
Warnings:
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=4.
Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=4.
Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=4.
t1.frm
t1.par
ALTER TABLE t1 REBUILD PARTITION p0;
Warnings:
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=4.
UNLOCK TABLES;
SHOW CREATE TABLE t1;
Table Create Table