1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

ORDER BY optimization

Fixed new bug when reading field types


client/mysql.cc:
  Fixed output for -T
libmysql/libmysql.c:
  Filled missing fields in new MYSQL_FIELD structure
  Fixed new bug when reading field types
mysql-test/r/order_by.result:
  Result after new order by optimization
sql/opt_range.cc:
  New ORDER BY optimization
sql/opt_range.h:
  New ORDER BY optimization
sql/set_var.cc:
  Speed optimization
sql/sql_select.cc:
  New ORDER BY optimization
  
  This alllows MySQL to change a ref/range index from (a,b) to (a,c) when 'b' was not used to find rows and one did
  ORDER BY a,c or ORDER BY c
This commit is contained in:
unknown
2003-05-27 18:40:37 +03:00
parent 1540912eca
commit ef6d3a8060
7 changed files with 40 additions and 20 deletions

View File

@@ -1793,9 +1793,8 @@ print_field_types(MYSQL_RES *result)
MYSQL_FIELD *field;
while ((field = mysql_fetch_field(result)))
{
tee_fprintf(PAGER,"%s '%s' %d %d %d %d %d\n",
field->name,
field->table ? "" : field->table,
tee_fprintf(PAGER,"'%s.%s.%s.%s' %d %d %d %d %d\n",
field->catalog, field->db, field->table, field->name,
(int) field->type,
field->length, field->max_length,
field->flags, field->decimals);