List:Commits« Previous MessageNext Message »
From:tim Date:April 4 2007 9:05am
Subject:bk commit into 5.1 tree (tsmith:1.2559)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tsmith. When tsmith 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://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-04-04 11:05:22+02:00, tsmith@stripped +9 -0
  Merge tsmith@stripped:/home/bk/mysql-5.1
  into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/mrg04/51
  MERGE: 1.2550.1.3

  mysql-test/r/information_schema.result@stripped, 2007-04-04 11:05:06+02:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.147.1.2

  mysql-test/t/sp.test@stripped, 2007-04-04 11:05:06+02:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.225.1.1

  sql/item_func.cc@stripped, 2007-04-04 11:05:07+02:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.367.1.2

  sql/mysqld.cc@stripped, 2007-04-04 11:05:09+02:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.625.1.1

  sql/sp.cc@stripped, 2007-04-04 11:05:11+02:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.142.1.1

  sql/sp_head.h@stripped, 2007-04-04 11:05:11+02:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.100.1.2

  sql/sql_lex.h@stripped, 2007-04-04 11:05:11+02:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.269.1.1

  sql/sql_yacc.yy@stripped, 2007-04-04 11:05:13+02:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.558.1.1

  sql/table.cc@stripped, 2007-04-04 11:05:14+02:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.281.1.2

# 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:	tsmith
# Host:	quadxeon.mysql.com
# Root:	/benchmarks/ext3/TOSAVE/tsmith/bk/maint/mrg04/51/RESYNC

--- 1.372/sql/item_func.cc	2007-04-03 12:36:19 +02:00
+++ 1.373/sql/item_func.cc	2007-04-04 11:05:07 +02:00
@@ -5029,7 +5029,7 @@ Item_func_sp::func_name() const
 {
   THD *thd= current_thd;
   /* Calculate length to avoid reallocation of string for sure */
-  uint len= ((m_name->m_db.length +
+  uint len= ((m_name->m_explicit_name ? m_name->m_db.length : 0 +
               m_name->m_name.length)*2 + //characters*quoting
              2 +                         // ` and `
              1 +                         // .
@@ -5039,8 +5039,11 @@ Item_func_sp::func_name() const
                system_charset_info);
 
   qname.length(0);
-  append_identifier(thd, &qname, m_name->m_db.str, m_name->m_db.length);
-  qname.append('.');
+  if (m_name->m_explicit_name)
+  {
+    append_identifier(thd, &qname, m_name->m_db.str, m_name->m_db.length);
+    qname.append('.');
+  }
   append_identifier(thd, &qname, m_name->m_name.str, m_name->m_name.length);
   return qname.ptr();
 }

--- 1.626/sql/mysqld.cc	2007-04-03 12:29:59 +02:00
+++ 1.627/sql/mysqld.cc	2007-04-04 11:05:09 +02:00
@@ -7347,6 +7347,18 @@ static void mysql_init_variables(void)
   /* Allow Win32 and NetWare users to move MySQL anywhere */
   {
     char prg_dev[LIBLEN];
+#if defined __WIN__
+	char executing_path_name[LIBLEN];
+	if (!test_if_hard_path(my_progname))
+	{
+		// we don't want to use GetModuleFileName inside of my_path since
+		// my_path is a generic path dereferencing function and here we care
+		// only about the executing binary.
+		GetModuleFileName(NULL, executing_path_name, sizeof(executing_path_name));
+		my_path(prg_dev, executing_path_name, NULL);
+	}
+	else
+#endif
     my_path(prg_dev,my_progname,"mysql/bin");
     strcat(prg_dev,"/../");			// Remove 'bin' to get base dir
     cleanup_dirname(mysql_home,prg_dev);

--- 1.270/sql/sql_lex.h	2007-03-27 19:09:51 +02:00
+++ 1.271/sql/sql_lex.h	2007-04-04 11:05:11 +02:00
@@ -188,12 +188,12 @@ typedef struct st_lex_master_info
   uint port, connect_retry;
   ulonglong pos;
   ulong server_id;
-  /* 
-     Variable for MASTER_SSL option.
-     MASTER_SSL=0 in CHANGE MASTER TO corresponds to SSL_DISABLE
-     MASTER_SSL=1 corresponds to SSL_ENABLE
-  */
-  enum {SSL_UNCHANGED=0, SSL_DISABLE, SSL_ENABLE} ssl; 
+  /*
+    Enum is used for making it possible to detect if the user
+    changed variable or if it should be left at old value
+   */
+  enum {SSL_UNCHANGED, SSL_DISABLE, SSL_ENABLE}
+    ssl, ssl_verify_server_cert;
   char *ssl_key, *ssl_cert, *ssl_ca, *ssl_capath, *ssl_cipher;
   char *relay_log_name;
   ulong relay_log_pos;

--- 1.559/sql/sql_yacc.yy	2007-04-02 10:54:28 +02:00
+++ 1.560/sql/sql_yacc.yy	2007-04-04 11:05:13 +02:00
@@ -1859,7 +1859,7 @@ ev_sql_stmt:
             */
             if (lex->sphead)
             {
-              my_error(ER_EVENT_RECURSIVITY_FORBIDDEN, MYF(0));
+              my_error(ER_EVENT_RECURSION_FORBIDDEN, MYF(0));
               MYSQL_YYABORT;
             }
               
@@ -2707,7 +2707,7 @@ sp_proc_stmt_statement:
               else
                 i->m_query.length= lex->tok_end - sp->m_tmp_query;
               i->m_query.str= strmake_root(YYTHD->mem_root,
-                                           (char *)sp->m_tmp_query,
+                                           sp->m_tmp_query,
                                            i->m_query.length);
               sp->add_instr(i);
             }
@@ -9311,7 +9311,7 @@ param_marker:
             my_error(ER_VIEW_SELECT_VARIABLE, MYF(0));
             MYSQL_YYABORT;
           }
-          item= new Item_param((uint) (lex->tok_start - (uchar *) thd->query));
+          item= new Item_param((uint) (lex->tok_start - thd->query));
           if (!($$= item) || lex->param_list.push_back(item))
           {
             my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
@@ -10148,7 +10148,7 @@ option_type_value:
               if (!(qbuff.str= alloc_root(YYTHD->mem_root, qbuff.length + 5)))
                 MYSQL_YYABORT;
 
-              strmake(strmake(qbuff.str, "SET ", 4), (char *)sp->m_tmp_query,
+              strmake(strmake(qbuff.str, "SET ", 4), sp->m_tmp_query,
                       qbuff.length);
               qbuff.length+= 4;
               i->m_query= qbuff;
@@ -11368,18 +11368,16 @@ view_select_aux:
 	{
           THD *thd= YYTHD;
           LEX *lex= thd->lex;
-          char *stmt_beg= (lex->sphead ?
-                           (char *)lex->sphead->m_tmp_query :
-                           thd->query);
+          const char *stmt_beg= (lex->sphead ?
+                                 lex->sphead->m_tmp_query : thd->query);
 	  lex->create_view_select_start= $2 - stmt_beg;
 	}
 	| '(' remember_name select_paren ')' union_opt
 	{
           THD *thd= YYTHD;
           LEX *lex= thd->lex;
-          char *stmt_beg= (lex->sphead ?
-                           (char *)lex->sphead->m_tmp_query :
-                           thd->query);
+          const char *stmt_beg= (lex->sphead ?
+                                 lex->sphead->m_tmp_query : thd->query);
 	  lex->create_view_select_start= $2 - stmt_beg;
 	}
 	;

--- 1.148/mysql-test/r/information_schema.result	2007-03-29 16:40:24 +02:00
+++ 1.149/mysql-test/r/information_schema.result	2007-04-04 11:05:06 +02:00
@@ -1408,4 +1408,33 @@ select user,db from information_schema.p
 user	db
 user3148	test
 drop user user3148@localhost;
+DROP TABLE IF EXISTS thread_status;
+CREATE TABLE thread_status (variable_name VARCHAR(64),
+variable_value DECIMAL(22,7));
+CREATE TABLE server_status (variable_name VARCHAR(64),
+variable_value DECIMAL(22,7));
+DROP EVENT IF EXISTS log_status;
+CREATE EVENT log_status
+ON SCHEDULE AT NOW()
+ON COMPLETION PRESERVE
+DO
+BEGIN
+INSERT INTO thread_status SELECT variable_name, variable_value FROM
+information_schema.session_status;
+INSERT INTO server_status SELECT variable_name, variable_value FROM
+information_schema.global_status;
+END$$
+SET GLOBAL event_scheduler=1;
+SELECT * FROM thread_status WHERE variable_name LIKE 'SSL%' LIMIT 1,2;
+variable_name	variable_value
+SSL_ACCEPTS	0.0000000
+SSL_CALLBACK_CACHE_HITS	0.0000000
+SELECT variable_name FROM server_status LIMIT 1,2;
+variable_name
+ABORTED_CONNECTS
+BINLOG_CACHE_DISK_USE
+DROP EVENT log_status;
+DROP TABLE thread_status;
+DROP TABLE server_status;
+SET GLOBAL event_scheduler=0;
 End of 5.1 tests.

--- 1.227/mysql-test/t/sp.test	2007-03-27 18:08:07 +02:00
+++ 1.228/mysql-test/t/sp.test	2007-04-04 11:05:06 +02:00
@@ -706,9 +706,11 @@ begin
   insert into test.t1 values (concat(x, "2"), y+2);
 end|
 
---system rm -f $MYSQLTEST_VARDIR/tmp/spout
+# Remove spout file if it exists
+--error 0,1
+--remove_file $MYSQLTEST_VARDIR/tmp/spout
 call into_outfile("ofile", 1)|
---system rm -f $MYSQLTEST_VARDIR/tmp/spout
+--remove_file $MYSQLTEST_VARDIR/tmp/spout
 delete from t1|
 drop procedure into_outfile|
 
@@ -723,9 +725,11 @@ begin
   insert into test.t1 values (concat(x, "2"), y+2);
 end|
 
---system rm -f $MYSQLTEST_VARDIR/tmp/spdump
+# Remove spdump file if it exists
+--error 0,1
+--remove_file $MYSQLTEST_VARDIR/tmp/spdump
 call into_dumpfile("dfile", 1)|
---system rm -f $MYSQLTEST_VARDIR/tmp/spdump
+--remove_file $MYSQLTEST_VARDIR/tmp/spdump
 delete from t1|
 drop procedure into_dumpfile|
 

--- 1.143/sql/sp.cc	2007-03-27 19:09:51 +02:00
+++ 1.144/sql/sp.cc	2007-04-04 11:05:11 +02:00
@@ -1041,7 +1041,7 @@ sp_exist_routines(THD *thd, TABLE_LIST *
     lex_name.length= strlen(routine->table_name);
     lex_db.str= thd->strmake(routine->db, lex_db.length);
     lex_name.str= thd->strmake(routine->table_name, lex_name.length);
-    name= new sp_name(lex_db, lex_name);
+    name= new sp_name(lex_db, lex_name, true);
     name->init_qname(thd);
     sp_object_found= sp_find_routine(thd, TYPE_ENUM_PROCEDURE, name,
                                      &thd->sp_proc_cache, FALSE) != NULL ||

--- 1.101/sql/sp_head.h	2007-03-27 19:09:51 +02:00
+++ 1.102/sql/sp_head.h	2007-04-04 11:05:11 +02:00
@@ -59,9 +59,10 @@ public:
     calling set_routine_type().
   */
   LEX_STRING m_sroutines_key;
+  bool       m_explicit_name;                   /**< Prepend the db name? */
 
-  sp_name(LEX_STRING db, LEX_STRING name)
-    : m_db(db), m_name(name)
+  sp_name(LEX_STRING db, LEX_STRING name, bool use_explicit_name)
+    : m_db(db), m_name(name), m_explicit_name(use_explicit_name)
   {
     m_qname.str= m_sroutines_key.str= 0;
     m_qname.length= m_sroutines_key.length= 0;
@@ -79,6 +80,7 @@ public:
     m_name.length= m_qname.length= key_len - 1;
     m_db.str= 0;
     m_db.length= 0;
+    m_explicit_name= false;
   }
 
   // Init. the qualified name from the db and name.
Thread
bk commit into 5.1 tree (tsmith:1.2559)tim4 Apr