1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

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)
This commit is contained in:
unknown
2004-01-30 10:46:30 +01:00
parent 163dffb4d0
commit f120273dd2
6 changed files with 86 additions and 40 deletions

View File

@@ -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;
}
}