summaryrefslogtreecommitdiff
path: root/sql/ha_innodb.cc
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2003-04-16 16:45:01 +0300
committerunknown <heikki@hundin.mysql.fi>2003-04-16 16:45:01 +0300
commit33ac47279b7367c816c90642f1b4e530c05f248e (patch)
tree7fff68a7504903b0da22aa86bbf09e69351a2184 /sql/ha_innodb.cc
parent07c29cc91aaba8a7982db9b7ba9c95ffc9ab7445 (diff)
downloadmariadb-git-33ac47279b7367c816c90642f1b4e530c05f248e.tar.gz
Many files:
Merge InnoDB-4.0.13; DROP FOREIGN KEY now works innobase/buf/buf0flu.c: Merge InnoDB-4.0.13; DROP FOREIGN KEY now works innobase/dict/dict0crea.c: Merge InnoDB-4.0.13; DROP FOREIGN KEY now works innobase/dict/dict0dict.c: Merge InnoDB-4.0.13; DROP FOREIGN KEY now works innobase/dict/dict0load.c: Merge InnoDB-4.0.13; DROP FOREIGN KEY now works innobase/ibuf/ibuf0ibuf.c: Merge InnoDB-4.0.13; DROP FOREIGN KEY now works innobase/include/db0err.h: Merge InnoDB-4.0.13; DROP FOREIGN KEY now works innobase/include/dict0dict.h: Merge InnoDB-4.0.13; DROP FOREIGN KEY now works innobase/include/row0ins.h: Merge InnoDB-4.0.13; DROP FOREIGN KEY now works innobase/lock/lock0lock.c: Merge InnoDB-4.0.13; DROP FOREIGN KEY now works innobase/os/os0file.c: Merge InnoDB-4.0.13; DROP FOREIGN KEY now works innobase/row/row0ins.c: Merge InnoDB-4.0.13; DROP FOREIGN KEY now works innobase/row/row0mysql.c: Merge InnoDB-4.0.13; DROP FOREIGN KEY now works innobase/row/row0sel.c: Merge InnoDB-4.0.13; DROP FOREIGN KEY now works innobase/row/row0upd.c: Merge InnoDB-4.0.13; DROP FOREIGN KEY now works innobase/srv/srv0srv.c: Merge InnoDB-4.0.13; DROP FOREIGN KEY now works innobase/ut/ut0ut.c: Merge InnoDB-4.0.13; DROP FOREIGN KEY now works sql/ha_innodb.cc: Merge InnoDB-4.0.13; DROP FOREIGN KEY now works
Diffstat (limited to 'sql/ha_innodb.cc')
-rw-r--r--sql/ha_innodb.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index ea8eaf6653e..edafc142fd3 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -242,6 +242,10 @@ convert_error_code_to_mysql(
return(HA_ERR_CANNOT_ADD_FOREIGN);
+ } else if (error == (int) DB_CANNOT_DROP_CONSTRAINT) {
+
+ return(HA_WRONG_CREATE_OPTION);
+
} else if (error == (int) DB_COL_APPEARS_TWICE_IN_INDEX) {
return(HA_ERR_CRASHED);
@@ -3048,6 +3052,9 @@ ha_innobase::create(
trx_search_latch_release_if_reserved(parent_trx);
trx = trx_allocate_for_mysql();
+
+ trx->mysql_thd = thd;
+ trx->mysql_query_str = &((*thd).query);
if (thd->options & OPTION_NO_FOREIGN_KEY_CHECKS) {
trx->check_foreigns = FALSE;
@@ -3231,6 +3238,9 @@ ha_innobase::delete_table(
trx = trx_allocate_for_mysql();
+ trx->mysql_thd = current_thd;
+ trx->mysql_query_str = &((*current_thd).query);
+
name_len = strlen(name);
assert(name_len < 1000);
@@ -3309,6 +3319,8 @@ innobase_drop_database(
casedn_str(namebuf);
#endif
trx = trx_allocate_for_mysql();
+ trx->mysql_thd = current_thd;
+ trx->mysql_query_str = &((*current_thd).query);
error = row_drop_database_for_mysql(namebuf, trx);
@@ -3368,6 +3380,8 @@ ha_innobase::rename_table(
}
trx = trx_allocate_for_mysql();
+ trx->mysql_thd = current_thd;
+ trx->mysql_query_str = &((*current_thd).query);
name_len1 = strlen(from);
name_len2 = strlen(to);