List:Commits« Previous MessageNext Message »
From:Michael Widenius Date:October 22 2008 1:13am
Subject:bzr commit into mysql-6.0 branch (monty:2745)
View as plain text  
#At file:///home/my/mysql-6.0-maria/

 2745 Michael Widenius	2008-10-22
      Fixes associated with last 5.1-maria -> 6.0-maria merge
modified:
  mysql-test/lib/mtr_cases.pl
  mysql-test/r/lock.result
  mysql-test/suite/maria/r/maria.result
  mysql-test/suite/maria/t/maria.test
  mysql-test/t/lock.test
  sql/key.cc

per-file messages:
  mysql-test/lib/mtr_cases.pl
    Allow one to run test cases as mysql-test-run suite.test
  mysql-test/r/lock.result
    Added used table that was missing from inital cleanup
  mysql-test/suite/maria/r/maria.result
    Fixed test cases
  mysql-test/suite/maria/t/maria.test
    Fixed test cases
  mysql-test/t/lock.test
    Added used table that was missing from inital cleanup
  sql/key.cc
    Better fix for keys of length 0.
    (The bug is actually in my_charpos() that can values out of range)
=== modified file 'mysql-test/lib/mtr_cases.pl'
--- a/mysql-test/lib/mtr_cases.pl	2008-10-20 19:13:22 +0000
+++ b/mysql-test/lib/mtr_cases.pl	2008-10-21 23:12:53 +0000
@@ -60,13 +60,14 @@ sub collect_test_cases ($) {
 
   my $suites= shift; # Semicolon separated list of test suites
   my $cases = [];    # Array of hash
+  my %found_suites;
 
   foreach my $suite (split(",", $suites))
   {
+    $found_suites{$suite}= 1;
     push(@$cases, collect_one_suite($suite));
   }
 
-
   if ( @::opt_cases )
   {
     # Check that the tests specified was found
@@ -75,6 +76,12 @@ sub collect_test_cases ($) {
     {
       my $found= 0;
       my ($sname, $tname, $extension)= split_testname($test_name_spec);
+      if (defined($sname) && !defined($found_suites{$sname}))
+      {
+	$found_suites{$sname}= 1;
+	push(@$cases, collect_one_suite($sname));
+      }
+
       foreach my $test ( @$cases )
       {
 	# test->{name} is always in suite.name format

=== modified file 'mysql-test/r/lock.result'
--- a/mysql-test/r/lock.result	2008-10-09 10:58:51 +0000
+++ b/mysql-test/r/lock.result	2008-10-21 23:12:53 +0000
@@ -1,4 +1,4 @@
-drop table if exists t1,t2;
+drop table if exists t1,t2,t3;
 CREATE TABLE t1 (  `id` int(11) NOT NULL default '0', `id2` int(11) NOT NULL default '0',
`id3` int(11) NOT NULL default '0', `dummy1` char(30) default NULL, PRIMARY KEY 
(`id`,`id2`), KEY `index_id3` (`id3`)) ENGINE=MyISAM;
 insert into t1 (id,id2) values (1,1),(1,2),(1,3);
 LOCK TABLE t1 WRITE;

=== modified file 'mysql-test/suite/maria/r/maria.result'
--- a/mysql-test/suite/maria/r/maria.result	2008-10-20 13:03:34 +0000
+++ b/mysql-test/suite/maria/r/maria.result	2008-10-21 23:12:53 +0000
@@ -2551,6 +2551,8 @@ insert into t1 values (1);
 lock table t1 write concurrent;
 delete from t1;
 ERROR 42000: The storage engine for the table doesn't support DELETE in WRITE CONCURRENT
+drop table t1;
+ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
 unlock tables;
 drop table t1;
 create table t1 (p int primary key, i int, a char(10), key k1(i), key k2(a))
@@ -2599,6 +2601,11 @@ ALTER TABLE t1 CHANGE c d varchar(10);
 affected rows: 0
 info: Records: 0  Duplicates: 0  Warnings: 0
 drop table t1;
+create table t1 (s1 int);
+insert into t1 values (1);
+alter table t1 partition by list (s1) (partition p1 values in (2));
+ERROR HY000: Table has no partition for value 1
+drop table t1;
 create table t1 (c1 int);
 create table t2 (c1 int);
 lock table t1 read, t2 read;

=== modified file 'mysql-test/suite/maria/t/maria.test'
--- a/mysql-test/suite/maria/t/maria.test	2008-10-20 13:03:34 +0000
+++ b/mysql-test/suite/maria/t/maria.test	2008-10-21 23:12:53 +0000
@@ -1832,6 +1832,8 @@ lock table t1 write concurrent;
 # should be fixed with fully implemented versioning
 --error ER_CHECK_NOT_IMPLEMENTED
 delete from t1;
+--error 1099
+drop table t1;
 unlock tables;
 drop table t1;
 
@@ -1880,7 +1882,18 @@ ALTER TABLE t1 CHANGE c d varchar(10);
 drop table t1;
 
 #
+# Bug #39227 Maria: crash with ALTER TABLE PARTITION
+#
+
+create table t1 (s1 int);
+insert into t1 values (1);
+--error ER_NO_PARTITION_FOR_GIVEN_VALUE
+alter table t1 partition by list (s1) (partition p1 values in (2));
+drop table t1;
+
+#
 # Bug #39226 Maria: crash with FLUSH TABLES WITH READ LOCK after LOCK TABLES
+#
 
 create table t1 (c1 int);
 create table t2 (c1 int);
@@ -1891,7 +1904,9 @@ flush tables with read lock;
 unlock tables;
 drop table t1, t2;
 
+#
 # Set defaults back
+#
 --disable_result_log
 --disable_query_log
 eval set global storage_engine=$default_engine, maria_page_checksum=$default_checksum;

=== modified file 'mysql-test/t/lock.test'
--- a/mysql-test/t/lock.test	2008-06-25 12:44:00 +0000
+++ b/mysql-test/t/lock.test	2008-10-21 23:12:53 +0000
@@ -3,7 +3,7 @@
 #
 
 --disable_warnings
-drop table if exists t1,t2;
+drop table if exists t1,t2,t3;
 --enable_warnings
 CREATE TABLE t1 (  `id` int(11) NOT NULL default '0', `id2` int(11) NOT NULL default '0',
`id3` int(11) NOT NULL default '0', `dummy1` char(30) default NULL, PRIMARY KEY 
(`id`,`id2`), KEY `index_id3` (`id3`)) ENGINE=MyISAM;
 insert into t1 (id,id2) values (1,1),(1,2),(1,3);

=== modified file 'sql/key.cc'
--- a/sql/key.cc	2008-09-08 14:54:16 +0000
+++ b/sql/key.cc	2008-10-21 23:12:53 +0000
@@ -368,7 +368,7 @@ void key_unpack(String *to,TABLE *table,
     {
       CHARSET_INFO *cs= field->charset();
       field->val_str(&tmp);
-      if (cs->mbmaxlen > 1 && tmp.length() > 0 &&
+      if (cs->mbmaxlen > 1 &&
           table->field[key_part->fieldnr - 1]->field_length !=
           key_part->length)
       {
@@ -382,7 +382,7 @@ void key_unpack(String *to,TABLE *table,
         uint charpos, char_length= key_part->length / cs->mbmaxlen;
         if ((charpos= my_charpos(cs, tmp.ptr(),
                                  tmp.ptr() + tmp.length(),
-                                 char_length)) < key_part->length)
+                                 char_length)) < tmp.length())
           tmp.length(charpos);
       }
       

Thread
bzr commit into mysql-6.0 branch (monty:2745) Michael Widenius22 Oct