Commit e35a73d1 authored by unknown's avatar unknown

lot's of small changes


mysql-test/r/olap.result:
  some small changes
sql/sql_delete.cc:
  A dirty fix for wrong ref_length returned ...
sql/sql_olap.cc:
  NULL instead of ALL
sql/sql_select.cc:
  This seems like a better solution to me ...
  At least after this a DISTINCT crash bug happens much later.
parent 8becb4cd
...@@ -27,30 +27,30 @@ TV India 1999 100 ...@@ -27,30 +27,30 @@ TV India 1999 100
TV India 2000 200 TV India 2000 200
TV United States 1999 150 TV United States 1999 150
TV United States 2000 150 TV United States 2000 150
Calculator India 0 75 Calculator India NULL 75
Calculator United States 0 200 Calculator United States NULL 200
Computer India 0 2400 Computer India NULL 2400
Computer United States 0 4500 Computer United States NULL 4500
TV India 0 300 TV India NULL 300
TV United States 0 300 TV United States NULL 300
Calculator ALL 1999 50 Calculator NULL 1999 50
Calculator ALL 2000 225 Calculator NULL 2000 225
Computer ALL 1999 2700 Computer NULL 1999 2700
Computer ALL 2000 4200 Computer NULL 2000 4200
TV ALL 1999 250 TV NULL 1999 250
TV ALL 2000 350 TV NULL 2000 350
ALL India 1999 1300 NULL India 1999 1300
ALL India 2000 1475 NULL India 2000 1475
ALL United States 1999 1700 NULL United States 1999 1700
ALL United States 2000 3300 NULL United States 2000 3300
Calculator ALL 0 275 Calculator NULL NULL 275
Computer ALL 0 6900 Computer NULL NULL 6900
TV ALL 0 600 TV NULL NULL 600
ALL India 0 2775 NULL India NULL 2775
ALL United States 0 5000 NULL United States NULL 5000
ALL ALL 1999 3000 NULL NULL 1999 3000
ALL ALL 2000 4775 NULL NULL 2000 4775
ALL ALL 0 7775 NULL NULL NULL 7775
explain select product, country , year, sum(profit) from sales group by product, country, year with cube; explain select product, country , year, sum(profit) from sales group by product, country, year with cube;
table type possible_keys key key_len ref rows Extra table type possible_keys key key_len ref rows Extra
sales ALL NULL NULL NULL NULL 14 Using temporary; Using filesort sales ALL NULL NULL NULL NULL 14 Using temporary; Using filesort
...@@ -74,13 +74,13 @@ TV India 1999 100 ...@@ -74,13 +74,13 @@ TV India 1999 100
TV India 2000 200 TV India 2000 200
TV United States 1999 150 TV United States 1999 150
TV United States 2000 150 TV United States 2000 150
ALL India 1999 1300 NULL India 1999 1300
ALL India 2000 1475 NULL India 2000 1475
ALL United States 1999 1700 NULL United States 1999 1700
ALL United States 2000 3300 NULL United States 2000 3300
ALL ALL 1999 3000 NULL NULL 1999 3000
ALL ALL 2000 4775 NULL NULL 2000 4775
ALL ALL 0 7775 NULL NULL NULL 7775
explain select product, country , year, sum(profit) from sales group by product, country, year with rollup; explain select product, country , year, sum(profit) from sales group by product, country, year with rollup;
table type possible_keys key key_len ref rows Extra table type possible_keys key key_len ref rows Extra
sales ALL NULL NULL NULL NULL 14 Using temporary; Using filesort sales ALL NULL NULL NULL NULL 14 Using temporary; Using filesort
...@@ -100,30 +100,30 @@ TV India 1999 100 ...@@ -100,30 +100,30 @@ TV India 1999 100
TV India 2000 200 TV India 2000 200
TV United States 1999 150 TV United States 1999 150
TV United States 2000 150 TV United States 2000 150
Calculator India 0 75 Calculator India NULL 75
Calculator United States 0 200 Calculator United States NULL 200
Computer India 0 2400 Computer India NULL 2400
Computer United States 0 4500 Computer United States NULL 4500
TV India 0 300 TV India NULL 300
TV United States 0 300 TV United States NULL 300
Calculator ALL 1999 50 Calculator NULL 1999 50
Calculator ALL 2000 225 Calculator NULL 2000 225
Computer ALL 1999 2700 Computer NULL 1999 2700
Computer ALL 2000 4200 Computer NULL 2000 4200
TV ALL 1999 250 TV NULL 1999 250
TV ALL 2000 350 TV NULL 2000 350
ALL India 1999 1300 NULL India 1999 1300
ALL India 2000 1475 NULL India 2000 1475
ALL United States 1999 1700 NULL United States 1999 1700
ALL United States 2000 3300 NULL United States 2000 3300
Calculator ALL 0 275 Calculator NULL NULL 275
Computer ALL 0 6900 Computer NULL NULL 6900
TV ALL 0 600 TV NULL NULL 600
ALL India 0 2775 NULL India NULL 2775
ALL United States 0 5000 NULL United States NULL 5000
ALL ALL 1999 3000 NULL NULL 1999 3000
ALL ALL 2000 4775 NULL NULL 2000 4775
ALL ALL 0 7775 NULL NULL NULL 7775
Calculator India 2000 75 Calculator India 2000 75
Calculator United States 1999 50 Calculator United States 1999 50
Calculator United States 2000 150 Calculator United States 2000 150
......
...@@ -227,7 +227,7 @@ multi_delete::multi_delete(THD *thd_arg, TABLE_LIST *dt, ...@@ -227,7 +227,7 @@ multi_delete::multi_delete(THD *thd_arg, TABLE_LIST *dt,
table->used_keys=0; table->used_keys=0;
tempfiles[counter] = new Unique (refposcmp2, tempfiles[counter] = new Unique (refposcmp2,
(void *) &table->file->ref_length, (void *) &table->file->ref_length,
table->file->ref_length, table->file->ref_length + 1,
MEM_STRIP_BUF_SIZE); MEM_STRIP_BUF_SIZE);
} }
} }
......
...@@ -35,7 +35,7 @@ static int make_new_olap_select(LEX *lex, SELECT_LEX *select_lex, List<Item> new ...@@ -35,7 +35,7 @@ static int make_new_olap_select(LEX *lex, SELECT_LEX *select_lex, List<Item> new
{ {
THD *thd=current_thd; THD *thd=current_thd;
Item *item, *new_item; Item *item, *new_item;
Item_string *constant= new Item_string("ALL",3); Item_null *constant= new Item_null("ALL");
SELECT_LEX *new_select = (SELECT_LEX *) thd->memdup((char*) select_lex, sizeof(*select_lex)); SELECT_LEX *new_select = (SELECT_LEX *) thd->memdup((char*) select_lex, sizeof(*select_lex));
if (!new_select) if (!new_select)
......
...@@ -4037,9 +4037,12 @@ static bool create_myisam_tmp_table(TABLE *table,TMP_TABLE_PARAM *param, ...@@ -4037,9 +4037,12 @@ static bool create_myisam_tmp_table(TABLE *table,TMP_TABLE_PARAM *param,
} }
MI_CREATE_INFO create_info; MI_CREATE_INFO create_info;
bzero((char*) &create_info,sizeof(create_info)); bzero((char*) &create_info,sizeof(create_info));
if ((options & (OPTION_BIG_TABLES | SELECT_SMALL_RESULT)) == if ((options & (OPTION_BIG_TABLES | SELECT_SMALL_RESULT)) !=
OPTION_BIG_TABLES) SELECT_SMALL_RESULT)
{
create_info.data_file_length= ~(ulonglong) 0; create_info.data_file_length= ~(ulonglong) 0;
create_info.max_rows= ~(ulonglong) 0;
}
if ((error=mi_create(table->real_name,table->keys,&keydef, if ((error=mi_create(table->real_name,table->keys,&keydef,
(uint) (param->recinfo-param->start_recinfo), (uint) (param->recinfo-param->start_recinfo),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment