diff options
author | unknown <igor@hundin.mysql.fi> | 2003-04-24 14:33:33 +0300 |
---|---|---|
committer | unknown <igor@hundin.mysql.fi> | 2003-04-24 14:33:33 +0300 |
commit | a7f8b1cb4d5c36f55fffa09ce8b84a1741aeb9f0 (patch) | |
tree | 6de7abb070ee2d000b388d96503497e5aed12979 /sql/sql_select.cc | |
parent | 1db8654191c18def869c03d246e75be704411d03 (diff) | |
download | mariadb-git-a7f8b1cb4d5c36f55fffa09ce8b84a1741aeb9f0.tar.gz |
Many files:
Added the MAX_LENGTH_FOR_SORT_DATA option
filesort.cc:
Added the MAX_LENGTH_FOR_SORT_DATA option
sql/filesort.cc:
Added the MAX_LENGTH_FOR_SORT_DATA option
sql/mysqld.cc:
Added the MAX_LENGTH_FOR_SORT_DATA option
sql/opt_range.cc:
Added the MAX_LENGTH_FOR_SORT_DATA option
sql/records.cc:
Added the MAX_LENGTH_FOR_SORT_DATA option
sql/set_var.cc:
Added the MAX_LENGTH_FOR_SORT_DATA option
sql/sql_base.cc:
Added the MAX_LENGTH_FOR_SORT_DATA option
sql/sql_class.h:
Added the MAX_LENGTH_FOR_SORT_DATA option
sql/sql_delete.cc:
Added the MAX_LENGTH_FOR_SORT_DATA option
sql/sql_select.cc:
Added the MAX_LENGTH_FOR_SORT_DATA option
sql/sql_sort.h:
Added the MAX_LENGTH_FOR_SORT_DATA option
sql/sql_table.cc:
Added the MAX_LENGTH_FOR_SORT_DATA option
sql/sql_update.cc:
Added the MAX_LENGTH_FOR_SORT_DATA option
sql/structs.h:
Added the MAX_LENGTH_FOR_SORT_DATA option
sql/table.h:
Added the MAX_LENGTH_FOR_SORT_DATA option
sql/uniques.cc:
Added the MAX_LENGTH_FOR_SORT_DATA option
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 3fdff4e96a4..d860b5c5bdf 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -4009,7 +4009,7 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, case Item_sum::AVG_FUNC: /* Place for sum & count */ if (group) return new Field_string(sizeof(double)+sizeof(longlong), - maybe_null, item->name,table,&my_charset_bin); + 0, item->name,table,&my_charset_bin); else return new Field_double(item_sum->max_length,maybe_null, item->name, table, item_sum->decimals); @@ -4017,7 +4017,7 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, case Item_sum::STD_FUNC: if (group) return new Field_string(sizeof(double)*2+sizeof(longlong), - maybe_null, item->name,table,&my_charset_bin); + 0, item->name,table,&my_charset_bin); else return new Field_double(item_sum->max_length, maybe_null, item->name,table,item_sum->decimals); @@ -5621,11 +5621,11 @@ end_send(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)), TABLE *table=jt->table; join->select_options ^= OPTION_FOUND_ROWS; - if (table->record_pointers || - (table->io_cache && my_b_inited(table->io_cache))) + if (table->sort.record_pointers || + (table->sort.io_cache && my_b_inited(table->sort.io_cache))) { /* Using filesort */ - join->send_records= table->found_records; + join->send_records= table->sort.found_records; } else { @@ -6460,8 +6460,8 @@ create_sort_index(THD *thd, JOIN_TAB *tab, ORDER *order, if (!(sortorder=make_unireg_sortorder(order,&length))) goto err; /* purecov: inspected */ /* It's not fatal if the following alloc fails */ - table->io_cache=(IO_CACHE*) my_malloc(sizeof(IO_CACHE), - MYF(MY_WME | MY_ZEROFILL)); + table->sort.io_cache=(IO_CACHE*) my_malloc(sizeof(IO_CACHE), + MYF(MY_WME | MY_ZEROFILL)); table->status=0; // May be wrong if quick_select // If table has a range, move it to select @@ -6490,9 +6490,9 @@ create_sort_index(THD *thd, JOIN_TAB *tab, ORDER *order, } if (table->tmp_table) table->file->info(HA_STATUS_VARIABLE); // Get record count - table->found_records=filesort(thd, table,sortorder, length, - select, filesort_limit, &examined_rows); - tab->records=table->found_records; // For SQL_CALC_ROWS + table->sort.found_records=filesort(thd, table,sortorder, length, + select, filesort_limit, &examined_rows); + tab->records=table->sort.found_records; // For SQL_CALC_ROWS delete select; // filesort did select tab->select=0; tab->select_cond=0; @@ -6504,7 +6504,7 @@ create_sort_index(THD *thd, JOIN_TAB *tab, ORDER *order, table->key_read=0; table->file->extra(HA_EXTRA_NO_KEYREAD); } - DBUG_RETURN(table->found_records == HA_POS_ERROR); + DBUG_RETURN(table->sort.found_records == HA_POS_ERROR); err: DBUG_RETURN(-1); } |