summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-01-30 10:46:30 +0100
committermonty@mysql.com <>2004-01-30 10:46:30 +0100
commited44e769ba34d6c4f71b99d74b6762ecbe1256d2 (patch)
tree2a068ced93fee028dc48d93be3aa5b24618ebef8 /sql/sql_class.cc
parent71c6d0c4f9e3047d70c60b3bc2f13efbd9fe3b7e (diff)
downloadmariadb-git-ed44e769ba34d6c4f71b99d74b6762ecbe1256d2.tar.gz
Fixed parsing of column names and foreign key constraints in Innobase to handle quoted identifiers and identifiers with space. (Bug #1725)
Fix optimizer tuning bug when first used key part was a constant. (Bug #1679)
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc22
1 files changed, 14 insertions, 8 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 3ea61da28fc..fc83131e98a 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -538,7 +538,6 @@ select_export::~select_export()
int
select_export::prepare(List<Item> &list)
{
- char path[FN_REFLEN];
uint option=4;
bool blob_flag=0;
#ifdef DONT_ALLOW_FULL_LOAD_DATA_PATHS
@@ -739,9 +738,13 @@ err:
void select_export::send_error(uint errcode,const char *err)
{
::send_error(&thd->net,errcode,err);
- (void) end_io_cache(&cache);
- (void) my_close(file,MYF(0));
- file= -1;
+ if (file > 0)
+ {
+ (void) end_io_cache(&cache);
+ (void) my_close(file,MYF(0));
+ (void) my_delete(path,MYF(0)); // Delete file on error
+ file= -1;
+ }
}
@@ -849,10 +852,13 @@ err:
void select_dump::send_error(uint errcode,const char *err)
{
::send_error(&thd->net,errcode,err);
- (void) end_io_cache(&cache);
- (void) my_close(file,MYF(0));
- (void) my_delete(path,MYF(0)); // Delete file on error
- file= -1;
+ if (file > 0)
+ {
+ (void) end_io_cache(&cache);
+ (void) my_close(file,MYF(0));
+ (void) my_delete(path,MYF(0)); // Delete file on error
+ file= -1;
+ }
}