From b66ffdcbda177da67dd85f3eb8f6114253581897 Mon Sep 17 00:00:00 2001
From: unknown <schwenke@alpha.xl.local>
Date: Fri, 29 Jul 2005 15:40:39 +0200
Subject: [PATCH] fixed two bugs that break Windows build

libmysql/libmysql.def:
  "get_defaults_files" has been renamed to "get_defaults_options"
  but was not removed here
sql/sql_select.cc:
  pulled variable out of for() scope to satisfy dumb MSVC6 compiler
---
 libmysql/libmysql.def | 1 -
 sql/sql_select.cc     | 5 +++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libmysql/libmysql.def b/libmysql/libmysql.def
index 5d8c2309063..a469c67c466 100644
--- a/libmysql/libmysql.def
+++ b/libmysql/libmysql.def
@@ -148,7 +148,6 @@ EXPORTS
 	mysql_embedded
 	mysql_server_init
 	mysql_server_end
-	get_defaults_files
 	mysql_set_character_set
 	mysql_get_character_set_info
 	get_defaults_options
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 117e16a2db3..793ce76b0f4 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -1842,6 +1842,7 @@ Cursor::fetch(ulong num_rows)
   JOIN_TAB *join_tab= join->join_tab + join->const_tables;
   enum_nested_loop_state error= NESTED_LOOP_OK;
   Query_arena backup_arena;
+  Engine_info *info;
   DBUG_ENTER("Cursor::fetch");
   DBUG_PRINT("enter",("rows: %lu", num_rows));
 
@@ -1856,7 +1857,7 @@ Cursor::fetch(ulong num_rows)
   /* save references to memory, allocated during fetch */
   thd->set_n_backup_item_arena(this, &backup_arena);
 
-  for (Engine_info *info= ht_info; info->read_view ; info++)
+  for (info= ht_info; info->read_view ; info++)
     (info->ht->set_cursor_read_view)(info->read_view);
 
   join->fetch_limit+= num_rows;
@@ -1875,7 +1876,7 @@ Cursor::fetch(ulong num_rows)
   /* Grab free_list here to correctly free it in close */
   thd->restore_backup_item_arena(this, &backup_arena);
 
-  for (Engine_info *info= ht_info; info->read_view; info++)
+  for (info= ht_info; info->read_view; info++)
     (info->ht->set_cursor_read_view)(0);
 
   if (error == NESTED_LOOP_CURSOR_LIMIT)