summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-01-30 10:46:30 +0100
committerunknown <monty@mysql.com>2004-01-30 10:46:30 +0100
commit3fd91ecaf74bf86acb0cca35e2fba25185b8a4a5 (patch)
tree2a068ced93fee028dc48d93be3aa5b24618ebef8 /sql/sql_class.cc
parent1bd2982a01fa71254aa86c00e0570ebf2ded570f (diff)
downloadmariadb-git-3fd91ecaf74bf86acb0cca35e2fba25185b8a4a5.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) innobase/dict/dict0dict.c: Fixed parsing of column names and foreign key constraints to handle quoted identifiers and identifiers with space. (Bug #1725) mysql-test/r/innodb.result: Test of innodb internal parsing mysql-test/t/innodb.test: Test of innodb internal parsing sql/sql_class.cc: Safety fix for select into outfile and select into dumpfile. Before calling send_error() could cause end_io_cache() to be called several times. sql/sql_class.h: Add path to dumpfile so that we can delete the generated file if something goes wrong. sql/sql_select.cc: Fix optimizer tuning bug when first used key part was a constant. Previously all keys that had this key part first was regarded as equal, even if the query used more key parts for some of the keys. Now we use the range optimizer results to just limit the number of estimated rows if not all key parts where constants. (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;
+ }
}