From 15df552e99b6d91bbf5482957074453941935b41 Mon Sep 17 00:00:00 2001 From: "sasha@mysql.sashanet.com" <> Date: Thu, 10 May 2001 17:08:29 -0600 Subject: [PATCH] fixes after merge. Now it compiles and passes the test suite --- Docs/manual.texi | 2 +- sql/sql_delete.cc | 4 +++- sql/sql_select.cc | 2 +- sql/sql_update.cc | 4 +++- sql/sql_yacc.yy | 7 +++++++ 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Docs/manual.texi b/Docs/manual.texi index cf1df129f2..1472febc15 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -22870,7 +22870,7 @@ You can set the default isolation level for @code{mysqld} with @findex GRANT @findex REVOKE -@node GRANT, CREATE INDEX, SET TRANSACTION, Reference +@node GRANT, HANDLER, SET TRANSACTION, Reference @section @code{GRANT} and @code{REVOKE} Syntax @example diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index ab7ad16450..85b1c94746 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -205,6 +205,7 @@ int mysql_delete(THD *thd, TABLE_LIST tables; List<Item> fields; List<Item> all_fields; + ha_rows examined_rows; bzero((char*) &tables,sizeof(tables)); tables.table = table; @@ -214,7 +215,8 @@ int mysql_delete(THD *thd, if (setup_order(thd, &tables, fields, all_fields, order) || !(sortorder=make_unireg_sortorder(order, &length)) || (table->found_records = filesort(&table, sortorder, length, - (SQL_SELECT *) 0, 0L, HA_POS_ERROR)) + (SQL_SELECT *) 0, 0L, HA_POS_ERROR, + &examined_rows)) == HA_POS_ERROR) { delete select; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 6262219439..8bdf879b69 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -800,6 +800,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds, err: thd->limit_found_rows = join.send_records; + thd->examined_row_count = join.examined_rows; thd->proc_info="end"; join.lock=0; // It's faster to unlock later join_free(&join); @@ -2546,7 +2547,6 @@ join_free(JOIN *join) delete tab->select; delete tab->quick; x_free(tab->cache.buff); - end_read_record(&tab->read_record); if (tab->table) { if (tab->table->key_read) diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 3cba3b4be6..b6b22ecbc9 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -175,6 +175,7 @@ int mysql_update(THD *thd, TABLE_LIST tables; List<Item> fields; List<Item> all_fields; + ha_rows examined_rows; bzero((char*) &tables,sizeof(tables)); tables.table = table; @@ -184,7 +185,8 @@ int mysql_update(THD *thd, if (setup_order(thd, &tables, fields, all_fields, order) || !(sortorder=make_unireg_sortorder(order, &length)) || (table->found_records = filesort(&table, sortorder, length, - (SQL_SELECT *) 0, 0L, HA_POS_ERROR)) + (SQL_SELECT *) 0, 0L, + HA_POS_ERROR, &examined_rows)) == HA_POS_ERROR) { delete select; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 33c0a4d175..8485f08d23 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -72,6 +72,13 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %token END_OF_INPUT +%token CLOSE_SYM +%token HANDLER_SYM +%token LAST_SYM +%token NEXT_SYM +%token PREV_SYM +%token SQL_CALC_FOUND_ROWS + %token EQ %token EQUAL_SYM %token GE -- 2.30.9