List:Commits« Previous MessageNext Message »
From:tim Date:July 15 2006 6:33am
Subject:bk commit into 5.1 tree (tsmith:1.2220)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tim. When tim 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, 2006-07-15 00:33:24-06:00, tsmith@stripped +8 -0
  Merge bk-internal.mysql.com:/home/bk/mysql-5.1
  into  siva.hindu.god:/usr/home/tim/m/bk/merge-51
  (which is mysql-5.1-new-maint team tree)
  MERGE: 1.2181.1.69

  include/my_base.h@stripped, 2006-07-14 23:36:20-06:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.86.1.5

  mysql-test/extra/rpl_tests/rpl_loaddata.test@stripped, 2006-07-14 23:36:21-06:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.2.1.1

  mysql-test/lib/mtr_cases.pl@stripped, 2006-07-14 23:36:21-06:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.19.1.1

  mysql-test/lib/mtr_report.pl@stripped, 2006-07-15 00:33:16-06:00, tsmith@stripped +1 -1
    merge of mysql-5.1 -> mysql-5.1-new-maint
    MERGE: 1.25.1.1

  mysql-test/mysql-test-run.pl@stripped, 2006-07-15 00:33:16-06:00, tsmith@stripped +2 -3
    merge of mysql-5.1 -> mysql-5.1-new-maint
    MERGE: 1.122.1.8

  mysql-test/r/rpl_loaddata.result@stripped, 2006-07-14 23:36:21-06:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.31.1.2

  mysql-test/r/sp-security.result@stripped, 2006-07-14 23:36:22-06:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.32.1.1

  mysql-test/t/sp-security.test@stripped, 2006-07-14 23:36:22-06:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.33.1.1

# 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:	siva.hindu.god
# Root:	/usr/home/tim/m/bk/merge-51/RESYNC

--- 1.89/include/my_base.h	2006-07-15 00:33:41 -06:00
+++ 1.90/include/my_base.h	2006-07-15 00:33:41 -06:00
@@ -155,7 +155,16 @@
     Mark the table as a log table. For some handlers (e.g. CSV) this results
     in a special locking for the table.
   */
-  HA_EXTRA_MARK_AS_LOG_TABLE
+  HA_EXTRA_MARK_AS_LOG_TABLE,
+  /*
+    Informs handler that write_row() which tries to insert new row into the
+    table and encounters some already existing row with same primary/unique
+    key can replace old row with new row instead of reporting error (basically
+    it informs handler that we do REPLACE instead of simple INSERT).
+    Off by default.
+  */
+  HA_EXTRA_WRITE_CAN_REPLACE,
+  HA_EXTRA_WRITE_CANNOT_REPLACE
 };
 
 	/* The following is parameter to ha_panic() */

--- 1.29/mysql-test/lib/mtr_cases.pl	2006-07-15 00:33:41 -06:00
+++ 1.30/mysql-test/lib/mtr_cases.pl	2006-07-15 00:33:41 -06:00
@@ -40,6 +40,23 @@
 
   opendir(TESTDIR, $testdir) or mtr_error("Can't open dir \"$testdir\": $!");
 
+  # ----------------------------------------------------------------------
+  # Disable some tests listed in disabled.def
+  # ----------------------------------------------------------------------
+  my %disabled;
+  if ( open(DISABLED, "$testdir/disabled.def" ) )
+  {
+    while ( <DISABLED> )
+      {
+        chomp;
+        if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ )
+          {
+            $disabled{$1}= $2;
+          }
+      }
+    close DISABLED;
+  }
+
   if ( @::opt_cases )
   {
     foreach my $tname ( @::opt_cases ) { # Run in specified order, no sort
@@ -103,30 +120,13 @@
         }
       }
 
-      collect_one_test_case($testdir,$resdir,$tname,$elem,$cases,{},
+      collect_one_test_case($testdir,$resdir,$tname,$elem,$cases,\%disabled,
         $component_id);
     }
     closedir TESTDIR;
   }
   else
   {
-    # ----------------------------------------------------------------------
-    # Disable some tests listed in disabled.def
-    # ----------------------------------------------------------------------
-    my %disabled;
-    if ( ! $::opt_ignore_disabled_def and open(DISABLED, "$testdir/disabled.def" ) )
-    {
-      while ( <DISABLED> )
-      {
-        chomp;
-        if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ )
-        {
-          $disabled{$1}= $2;
-        }
-      }
-      close DISABLED;
-    }
-
     foreach my $elem ( sort readdir(TESTDIR) ) {
       my $component_id= undef;
       my $tname= undef;
@@ -418,18 +418,33 @@
   }
 
   # FIXME why this late?
+  my $marked_as_disabled= 0;
   if ( $disabled->{$tname} )
   {
-    $tinfo->{'skip'}= 1;
-    $tinfo->{'disable'}= 1;   # Sub type of 'skip'
-    $tinfo->{'comment'}= $disabled->{$tname} if $disabled->{$tname};
+    $marked_as_disabled= 1;
+    $tinfo->{'comment'}= $disabled->{$tname};
   }
 
   if ( -f $disabled_file )
   {
-    $tinfo->{'skip'}= 1;
-    $tinfo->{'disable'}= 1;   # Sub type of 'skip'
+    $marked_as_disabled= 1;
     $tinfo->{'comment'}= mtr_fromfile($disabled_file);
+  }
+
+  # If test was marked as disabled, either opt_enable_disabled is off and then
+  # we skip this test, or it is on and then we run this test but warn
+
+  if ( $marked_as_disabled )
+  {
+    if ( $::opt_enable_disabled )
+    {
+      $tinfo->{'dont_skip_though_disabled'}= 1;
+    }
+    else
+    {
+      $tinfo->{'skip'}= 1;
+      $tinfo->{'disable'}= 1;   # Sub type of 'skip'
+    }
   }
 
   if ( $component_id eq 'im' )

--- 1.32/mysql-test/lib/mtr_report.pl	2006-07-15 00:33:41 -06:00
+++ 1.33/mysql-test/lib/mtr_report.pl	2006-07-15 00:33:41 -06:00
@@ -10,6 +10,7 @@
 sub mtr_report_test_passed($);
 sub mtr_report_test_failed($);
 sub mtr_report_test_skipped($);
+sub mtr_report_test_not_skipped_though_disabled($);
 
 sub mtr_show_failed_diff ($);
 sub mtr_report_stats ($);
@@ -98,6 +99,23 @@
   else
   {
     print "[ skipped ]   $tinfo->{'comment'}\n";
+  }
+}
+
+sub mtr_report_tests_not_skipped_though_disabled ($) {
+  my $tests= shift;
+
+  if ( $::opt_enable_disabled )
+  {
+    my @disabled_tests= grep {$_->{'dont_skip_though_disabled'}} @$tests;
+    if ( @disabled_tests )
+    {
+      print "\nTest(s) which will be run though they are marked as disabled:\n";
+      foreach my $tinfo ( sort {$a->{'name'} cmp $b->{'name'}} @disabled_tests )
+      {
+        printf "  %-20s : %s\n", $tinfo->{'name'}, $tinfo->{'comment'};
+      }
+    }
   }
 }
 

--- 1.140/mysql-test/mysql-test-run.pl	2006-07-15 00:33:41 -06:00
+++ 1.141/mysql-test/mysql-test-run.pl	2006-07-15 00:33:41 -06:00
@@ -216,6 +216,7 @@
 our $opt_fast;
 our $opt_force;
 our $opt_reorder;
+our $opt_enable_disabled;
 
 our $opt_gcov;
 our $opt_gcov_err;
@@ -286,7 +287,7 @@
 our $opt_valgrind= 0;
 our $opt_valgrind_mysqld= 0;
 our $opt_valgrind_mysqltest= 0;
-our $default_valgrind_options= "-v --show-reachable=yes";
+our $default_valgrind_options= "--show-reachable=yes";
 our $opt_valgrind_options;
 our $opt_valgrind_path;
 
@@ -657,6 +658,7 @@
              'fast'                     => \$opt_fast,
              'netware'                  => \$opt_netware,
              'reorder'                  => \$opt_reorder,
+             'enable-disabled'          => \$opt_enable_disabled,
              'script-debug'             => \$opt_script_debug,
              'verbose'                  => \$opt_verbose,
              'sleep=i'                  => \$opt_sleep,
@@ -1914,12 +1916,12 @@
 
   mtr_print_thick_line();
 
-  mtr_report("Finding  Tests in the '$suite' suite");
-
   mtr_timer_start($glob_timers,"suite", 60 * $opt_suite_timeout);
 
   mtr_report("Starting Tests in the '$suite' suite");
 
+  mtr_report_tests_not_skipped_though_disabled($tests);
+
   mtr_print_header();
 
   foreach my $tinfo ( @$tests )
@@ -3612,9 +3614,16 @@
 }
 
 
+sub generate_cmdline_mysqldump ($) {
+  my($info) = @_;
+  return
+    "$exe_mysqldump --no-defaults -uroot " .
+      "--port=$info->[0]->{'port'} " .
+      "--socket=$info->[0]->{'path_sock'} --password=";
+}
+
 sub run_mysqltest ($) {
   my $tinfo=       shift;
-
   my $cmdline_mysqlcheck= "$exe_mysqlcheck --no-defaults -uroot " .
                           "--port=$master->[0]->{'port'} " .
                           "--socket=$master->[0]->{'path_sock'} --password=";
@@ -3624,17 +3633,15 @@
       " --debug=d:t:A,$opt_vardir_trace/log/mysqlcheck.trace";
   }
 
-  my $cmdline_mysqldump= "$exe_mysqldump --no-defaults -uroot " .
-                         "--port=$master->[0]->{'port'} " .
-                         "--socket=$master->[0]->{'path_sock'} --password=";
-
- my $cmdline_mysqldumpslave= "$exe_mysqldump --no-defaults -uroot " .
-                         "--socket=$slave->[0]->{'path_sock'} --password=";
+  my $cmdline_mysqldump= generate_cmdline_mysqldump $master;
+  my $cmdline_mysqldumpslave= generate_cmdline_mysqldump $slave;
 
   if ( $opt_debug )
   {
     $cmdline_mysqldump .=
-      " --debug=d:t:A,$opt_vardir_trace/log/mysqldump.trace";
+      " --debug=d:t:A,$opt_vardir_trace/log/mysqldump-master.trace";
+    $cmdline_mysqldumpslave .=
+      " --debug=d:t:A,$opt_vardir_trace/log/mysqldump-slave.trace";
   }
 
   my $cmdline_mysqlslap;
@@ -3690,6 +3697,12 @@
     "$exe_mysql_client_test --no-defaults --testcase --user=root --silent " .
     "--port=$master->[0]->{'port'} " .
     "--socket=$master->[0]->{'path_sock'}";
+
+  if ( $opt_debug )
+  {
+    $cmdline_mysql_client_test .=
+      " --debug=d:t:A,$opt_vardir_trace/log/mysql_client_test.trace";
+  }
 
   if ( $glob_use_embedded_server )
   {

--- 1.3/mysql-test/extra/rpl_tests/rpl_loaddata.test	2006-07-15 00:33:41 -06:00
+++ 1.4/mysql-test/extra/rpl_tests/rpl_loaddata.test	2006-07-15 00:33:41 -06:00
@@ -20,8 +20,11 @@
 reset master;
 connection master;
 
+select last_insert_id();
 create table t1(a int not null auto_increment, b int, primary key(a) );
 load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
+# verify that LAST_INSERT_ID() is set by LOAD DATA INFILE
+select last_insert_id();
 
 create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60));
 load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines;

--- 1.32/mysql-test/r/rpl_loaddata.result	2006-07-15 00:33:42 -06:00
+++ 1.33/mysql-test/r/rpl_loaddata.result	2006-07-15 00:33:42 -06:00
@@ -5,8 +5,14 @@
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
 reset master;
+select last_insert_id();
+last_insert_id()
+0
 create table t1(a int not null auto_increment, b int, primary key(a) );
 load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
+select last_insert_id();
+last_insert_id()
+1
 create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60));
 load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines;
 create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60));
@@ -22,7 +28,7 @@
 2003-03-22	2416	a	bbbbb
 show master status;
 File	Position	Binlog_Do_DB	Binlog_Ignore_DB
-slave-bin.000001	1276		
+slave-bin.000001	1248		
 drop table t1;
 drop table t2;
 drop table t3;
@@ -33,7 +39,7 @@
 start slave;
 show slave status;
 Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	1793	#	#	master-bin.000001	Yes	Yes				#			0		0	1793	#	None		0	No						#
+#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	1765	#	#	master-bin.000001	Yes	Yes				#			0		0	1765	#	None		0	No						#
 set sql_log_bin=0;
 delete from t1;
 set sql_log_bin=1;
@@ -43,7 +49,7 @@
 change master to master_user='root';
 show slave status;
 Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	1828	#	#	master-bin.000001	No	No				#			0		0	1828	#	None		0	No						#
+#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	1800	#	#	master-bin.000001	No	No				#			0		0	1800	#	None		0	No						#
 set global sql_slave_skip_counter=1;
 start slave;
 set sql_log_bin=0;

--- 1.33/mysql-test/r/sp-security.result	2006-07-15 00:33:42 -06:00
+++ 1.34/mysql-test/r/sp-security.result	2006-07-15 00:33:42 -06:00
@@ -410,3 +410,34 @@
 ---> connection: root
 DROP USER mysqltest_2@localhost;
 DROP DATABASE mysqltest;
+GRANT USAGE ON *.* TO user19857@localhost IDENTIFIED BY 'meow';
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE ROUTINE, ALTER ROUTINE ON test.* TO
+user19857@localhost;
+SELECT Host,User,Password FROM mysql.user WHERE User='user19857';
+Host	User	Password
+localhost	user19857	*82DC221D557298F6CE9961037DB1C90604792F5C
+
+---> connection: mysqltest_2_con
+use test;
+CREATE PROCEDURE sp19857() DETERMINISTIC
+BEGIN
+DECLARE a INT;
+SET a=1;
+SELECT a;
+END //
+SHOW CREATE PROCEDURE test.sp19857;
+Procedure	sql_mode	Create Procedure
+sp19857		CREATE DEFINER=`user19857`@`localhost` PROCEDURE `sp19857`()
+    DETERMINISTIC
+BEGIN
+DECLARE a INT;
+SET a=1;
+SELECT a;
+END
+DROP PROCEDURE IF EXISTS test.sp19857;
+
+---> connection: root
+SELECT Host,User,Password FROM mysql.user WHERE User='user19857';
+Host	User	Password
+localhost	user19857	*82DC221D557298F6CE9961037DB1C90604792F5C
+DROP USER user19857@localhost;

--- 1.34/mysql-test/t/sp-security.test	2006-07-15 00:33:42 -06:00
+++ 1.35/mysql-test/t/sp-security.test	2006-07-15 00:33:42 -06:00
@@ -721,4 +721,50 @@
 DROP DATABASE mysqltest;
 
 
+#
+# Bug#19857 - When a user with CREATE ROUTINE priv creates a routine,
+#             it results in NULL p/w
+#
+
+# Can't test with embedded server that doesn't support grants
+
+GRANT USAGE ON *.* TO user19857@localhost IDENTIFIED BY 'meow';
+GRANT SELECT, INSERT, UPDATE, DELETE, CREATE ROUTINE, ALTER ROUTINE ON test.* TO
+user19857@localhost;
+SELECT Host,User,Password FROM mysql.user WHERE User='user19857';
+
+--connect (mysqltest_2_con,localhost,user19857,meow,test)
+--echo
+--echo ---> connection: mysqltest_2_con
+--connection mysqltest_2_con
+
+use test;
+
+DELIMITER //;
+  CREATE PROCEDURE sp19857() DETERMINISTIC
+  BEGIN
+    DECLARE a INT;
+    SET a=1;
+    SELECT a;
+  END //
+DELIMITER ;//
+
+SHOW CREATE PROCEDURE test.sp19857;
+
+--disconnect mysqltest_2_con
+--connect (mysqltest_2_con,localhost,user19857,meow,test)
+--connection mysqltest_2_con
+
+DROP PROCEDURE IF EXISTS test.sp19857;
+
+--echo
+--echo ---> connection: root
+--connection con1root
+
+--disconnect mysqltest_2_con
+
+SELECT Host,User,Password FROM mysql.user WHERE User='user19857';
+
+DROP USER user19857@localhost;
+
 # End of 5.0 bugs.
Thread
bk commit into 5.1 tree (tsmith:1.2220)tim15 Jul