summaryrefslogtreecommitdiff
path: root/sql/ha_innodb.h
diff options
context:
space:
mode:
authorunknown <osku@127.(none)>2005-09-23 16:22:27 +0300
committerunknown <osku@127.(none)>2005-09-23 16:22:27 +0300
commite4b0b0d00cfb7e668f1890bbb050a476e45a1d5d (patch)
tree43f72da6760864b8d20d6e9cdf26fd07d9b15b08 /sql/ha_innodb.h
parentabda6dc69fa6d1fb75cf5754eb71edd10baae12c (diff)
downloadmariadb-git-e4b0b0d00cfb7e668f1890bbb050a476e45a1d5d.tar.gz
Fix bug #3443, better foreign key error messsages.
innobase/dict/dict0dict.c: Add 'add_newline' parameter to dict_print_info_on_foreign_key_in_create_format. innobase/include/dict0dict.h: Add 'add_newline' parameter to dict_print_info_on_foreign_key_in_create_format. innobase/include/os0file.h: Add os_file_read_string. innobase/include/trx0trx.h: Add trx_set_detailed_error and trx_set_detailed_error_from_file functions and a detailed_error field to trx_struct. innobase/include/ut0mem.h: Add ut_strlcpy. innobase/os/os0file.c: Add os_file_read_string. innobase/row/row0ins.c: Add row_ins_set_detailed function and call it when needed. Adapt to changes in dict_print_info_on_foreign_key_in_create_format. innobase/trx/trx0trx.c: Add trx_set_detailed_error and trx_set_detailed_error_from_file. Clear trx->detailed_error in trx_create. innobase/ut/ut0mem.c: Add ut_strlcpy. mysql-test/r/innodb.result: Add new tests, adapt existing ones whose output was changed. mysql-test/t/innodb.test: Add new tests, adapt existing ones whose output was changed. sql/ha_innodb.cc: Add get_error_message. Clear trx->detailed_error in start_stmt and external_lock. sql/ha_innodb.h: Add get_error_message. sql/handler.cc: Add special case code in print_error for HA_ERR_ROW_IS_REFERENCED and HA_ERR_NO_REFERENCED_ROW. Change SETMSG to point to new error messages. sql/share/errmsg.txt: Add ER_ROW_IS_REFERENCED_2 and ER_NO_REFERENCED_ROW_2.
Diffstat (limited to 'sql/ha_innodb.h')
-rw-r--r--sql/ha_innodb.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/ha_innodb.h b/sql/ha_innodb.h
index 1c02ac20bb4..d3c7af432a0 100644
--- a/sql/ha_innodb.h
+++ b/sql/ha_innodb.h
@@ -174,6 +174,8 @@ class ha_innobase: public handler
void init_table_handle_for_HANDLER();
ulonglong get_auto_increment();
int reset_auto_increment(ulonglong value);
+
+ virtual bool get_error_message(int error, String *buf);
uint8 table_cache_type() { return HA_CACHE_TBL_ASKTRANSACT; }
/*