List:Internals« Previous MessageNext Message »
From:venu Date:July 8 2003 9:27am
Subject:bk commit into 4.1 tree (1.1567)
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of venu. When venu does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet
  1.1567 03/07/08 02:27:21 venu@stripped +7 -0
  implementation of mysql_stmt_reset client end

  sql/mysql_priv.h
    1.203 03/07/08 02:24:46 venu@stripped +1 -0
    add defination of mysql_stmt_reset

  sql/sql_parse.cc
    1.280 03/07/08 02:17:48 venu@stripped +5 -0
    Add COM_STMT_RESET

  sql/sql_prepare.cc
    1.39 03/07/08 02:17:13 venu@stripped +1 -1
    Fix selects hang after windows slowdown issue fix (send_fields)

  libmysql/libmysql.def
    1.17 03/07/08 02:16:58 venu@stripped +1 -0
    Add mysql_stmt_reset def

  libmysql/libmysql.c
    1.167 03/07/08 02:16:37 venu@stripped +23 -0
    implementation of mysql_stmt_reset client end

  include/mysql_com.h
    1.75 03/07/08 02:16:16 venu@stripped +1 -0
    add COM_STMT_RESET 

  include/mysql.h
    1.74 03/07/08 02:15:58 venu@stripped +1 -0
    add mysql_stmt_reset prototype

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	venu
# Host:	myvenu.com
# Root:	/home/venu/work/sql/dev-4.1

--- 1.73/include/mysql.h	Tue Jun 24 02:10:32 2003
+++ 1.74/include/mysql.h	Tue Jul  8 02:15:58 2003
@@ -566,6 +566,7 @@
 my_bool STDCALL mysql_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
 my_bool STDCALL mysql_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
 my_bool STDCALL mysql_stmt_close(MYSQL_STMT * stmt);
+my_bool STDCALL mysql_stmt_reset(MYSQL_STMT * stmt);
 my_bool STDCALL mysql_stmt_free_result(MYSQL_STMT *stmt);
 unsigned int STDCALL mysql_stmt_errno(MYSQL_STMT * stmt);
 const char *STDCALL mysql_stmt_error(MYSQL_STMT * stmt);

--- 1.74/include/mysql_com.h	Sat Jun 14 01:37:39 2003
+++ 1.75/include/mysql_com.h	Tue Jul  8 02:16:16 2003
@@ -44,6 +44,7 @@
   COM_TIME, COM_DELAYED_INSERT, COM_CHANGE_USER, COM_BINLOG_DUMP,
   COM_TABLE_DUMP, COM_CONNECT_OUT, COM_REGISTER_SLAVE,
   COM_PREPARE, COM_EXECUTE, COM_LONG_DATA, COM_CLOSE_STMT,
+  COM_RESET_STMT, 
   COM_END				/* Must be last */
 };
 

--- 1.166/libmysql/libmysql.c	Sat Jun 14 01:37:39 2003
+++ 1.167/libmysql/libmysql.c	Tue Jul  8 02:16:37 2003
@@ -3316,6 +3316,7 @@
   }
   else
     DBUG_PRINT("exit", ("stmt doesn't contain any resultset"));
+  DBUG_VOID_RETURN;
 }
 
 
@@ -3419,6 +3420,28 @@
 my_bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt)
 {
   return stmt_close(stmt, 0);
+}
+
+/*
+  Reset the statement buffers in server
+*/
+
+my_bool STDCALL mysql_stmt_reset(MYSQL_STMT *stmt)
+{
+  char buff[MYSQL_STMT_HEADER];
+  MYSQL *mysql;
+  DBUG_ENTER("mysql_stmt_reset");
+  DBUG_ASSERT(stmt != 0);
+  
+  mysql= stmt->mysql->last_used_con;
+  int4store(buff, stmt->stmt_id);		/* Send stmt id to server */
+  if (advanced_command(mysql, COM_RESET_STMT,buff,MYSQL_STMT_HEADER,0,0,1))
+  {
+    set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno, 
+                    mysql->net.sqlstate);
+    DBUG_RETURN(1);
+  }
+  DBUG_RETURN(0);
 }
 
 /*

--- 1.202/sql/mysql_priv.h	Fri Jun 27 06:29:06 2003
+++ 1.203/sql/mysql_priv.h	Tue Jul  8 02:24:46 2003
@@ -557,6 +557,7 @@
 bool mysql_stmt_prepare(THD *thd, char *packet, uint packet_length);
 void mysql_stmt_execute(THD *thd, char *packet);
 void mysql_stmt_free(THD *thd, char *packet);
+void mysql_stmt_reset(THD *thd, char *packet);
 void mysql_stmt_get_longdata(THD *thd, char *pos, ulong packet_length);
 int check_insert_fields(THD *thd,TABLE *table,List<Item> &fields,
 			List<Item> &values, ulong counter);

--- 1.279/sql/sql_parse.cc	Tue Jul  1 09:05:28 2003
+++ 1.280/sql/sql_parse.cc	Tue Jul  8 02:17:48 2003
@@ -1290,6 +1290,11 @@
     mysql_stmt_free(thd, packet);
     break;
   }
+  case COM_RESET_STMT:
+  {
+    mysql_stmt_reset(thd, packet);
+    break;
+  }
   case COM_QUERY:
   {
     if (alloc_query(thd, packet, packet_length))

--- 1.16/libmysql/libmysql.def	Tue Jun 24 02:10:32 2003
+++ 1.17/libmysql/libmysql.def	Tue Jul  8 02:16:58 2003
@@ -98,6 +98,7 @@
 	mysql_stat
 	mysql_stmt_affected_rows
 	mysql_stmt_close
+	mysql_stmt_reset
 	mysql_stmt_data_seek
 	mysql_stmt_errno
 	mysql_stmt_error

--- 1.38/sql/sql_prepare.cc	Fri Jul  4 10:53:08 2003
+++ 1.39/sql/sql_prepare.cc	Tue Jul  8 02:17:13 2003
@@ -965,7 +965,7 @@
   PREP_STMT *stmt;
   DBUG_ENTER("mysql_stmt_reset");
 
-  if (!(stmt=find_prepared_statement(thd, stmt_id, "close")))
+  if (!(stmt= find_prepared_statement(thd, stmt_id, "reset")))
   {
     send_error(thd);
     DBUG_VOID_RETURN;
Thread
bk commit into 4.1 tree (1.1567)venu8 Jul