summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-02-01 09:32:59 +0100
committerSergei Golubchik <sergii@pisem.net>2014-02-01 09:32:59 +0100
commit27fbb637d36324992b270f0dc0472807ffa4ebc2 (patch)
treedf75b8a9696358a9f2d987d0319de7b881d3ac33 /sql/handler.cc
parenta9c22c188886bf88f7ff557cecfa1ceb2ed75e12 (diff)
downloadmariadb-git-27fbb637d36324992b270f0dc0472807ffa4ebc2.tar.gz
MDEV-5544 Custom errors (generated from storage engine) not getting returned by mariadb
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index ae337f4a153..0088d6010a5 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -4597,14 +4597,16 @@ int ha_create_table(THD *thd, const char *path,
error= table.file->ha_create(name, &table, create_info);
- (void) closefrm(&table, 0);
-
if (error)
{
- my_error(ER_CANT_CREATE_TABLE, MYF(0), db, table_name, error);
+ if (!thd->is_error())
+ my_error(ER_CANT_CREATE_TABLE, MYF(0), db, table_name, error);
+ table.file->print_error(error, MYF(ME_JUST_WARNING));
PSI_CALL_drop_table_share(temp_table, share.db.str, share.db.length,
share.table_name.str, share.table_name.length);
}
+
+ (void) closefrm(&table, 0);
err:
free_table_share(&share);