1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Bug #17766: The server accepts to create MERGE tables which cannot work

Changed the error reporting (and a crash) when inserting data into a
 MERGE table that has no underlying tables or no INSERT_METHOD specified
 by reporting that it is read-only.


include/my_base.h:
  Add new handler error
mysql-test/r/merge.result:
  Update results
mysql-test/t/merge.test:
  Add new regression test
sql/ha_myisammrg.cc:
  When trying to insert into a MERGE table with no underlying tables
  or no INSERT_METHOD, report that it is read-only.
sql/handler.cc:
  Handle new error message
This commit is contained in:
unknown
2006-07-11 17:28:50 -07:00
parent c3cb46908c
commit 97cdd9df8a
5 changed files with 38 additions and 2 deletions

View File

@@ -347,8 +347,9 @@ enum ha_base_keytype {
#define HA_ERR_NULL_IN_SPATIAL 158 /* NULLs are not supported in spatial index */
#define HA_ERR_TABLE_DEF_CHANGED 159 /* The table changed in storage engine */
#define HA_ERR_TABLE_NEEDS_UPGRADE 160 /* The table changed in storage engine */
#define HA_ERR_TABLE_READONLY 161 /* The table is not writable */
#define HA_ERR_LAST 160 /*Copy last error nr.*/
#define HA_ERR_LAST 161 /*Copy last error nr.*/
/* Add error numbers before HA_ERR_LAST and change it accordingly. */
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)