List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:April 25 2007 1:14pm
Subject:bk commit into 5.0 tree (svoj:1.2443) BUG#26976
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of svoj. When svoj 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-25 16:14:43+05:00, svoj@stripped +6 -0
  BUG#26976 - Missing table in merge not noted in related error msg +
              SHOW CREATE TABLE fails
  Improved error message in case we fail to open underlying table.
  Now we report table name.
  No test case needed - error message covered by current tests.

  myisammrg/myrg_open.c@stripped, 2007-04-25 16:14:41+05:00, svoj@stripped +2 -0
    In case we fail to open underlying table, report table name.

  mysql-test/r/merge.result@stripped, 2007-04-25 16:14:41+05:00, svoj@stripped +9 -9
    Fixed a test case according to fix for BUG#26976.

  mysql-test/t/merge.test@stripped, 2007-04-25 16:14:41+05:00, svoj@stripped +9 -9
    Fixed a test case according to fix for BUG#26976.

  sql/ha_myisammrg.cc@stripped, 2007-04-25 16:14:41+05:00, svoj@stripped +3 -1
    In case we fail to open underlying table, report table name.

  sql/handler.cc@stripped, 2007-04-25 16:14:41+05:00, svoj@stripped +2 -1
    HA_ERR_WRONG_MRG_TABLE_DEF is now reported by the handler.

  sql/share/errmsg.txt@stripped, 2007-04-25 16:14:41+05:00, svoj@stripped +1 -22
    In case we fail to open underlying table, report table name.

# 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:	svoj
# Host:	june.mysql.com
# Root:	/home/svoj/devel/mysql/BUG26976/mysql-5.0-engines

--- 1.35/myisammrg/myrg_open.c	2006-12-31 00:02:05 +04:00
+++ 1.36/myisammrg/myrg_open.c	2007-04-25 16:14:41 +05:00
@@ -90,6 +90,7 @@ MYRG_INFO *myrg_open(const char *name, i
     if (!(isam=mi_open(buff,mode,(handle_locking?HA_OPEN_WAIT_IF_LOCKED:0))))
     {
       my_errno= HA_ERR_WRONG_MRG_TABLE_DEF;
+      my_error(my_errno, MYF(0), buff);
       goto err;
     }
     if (!m_info)                                /* First file */
@@ -118,6 +119,7 @@ MYRG_INFO *myrg_open(const char *name, i
     if (m_info->reclength != isam->s->base.reclength)
     {
       my_errno=HA_ERR_WRONG_MRG_TABLE_DEF;
+      my_error(my_errno, MYF(0), buff);
       goto err;
     }
     m_info->options|= isam->s->options;

--- 1.89/sql/ha_myisammrg.cc	2007-02-21 15:04:59 +04:00
+++ 1.90/sql/ha_myisammrg.cc	2007-04-25 16:14:41 +05:00
@@ -122,6 +122,7 @@ int ha_myisammrg::open(const char *name,
     DBUG_PRINT("error",("reclength: %lu  mean_rec_length: %lu",
 			table->s->reclength, mean_rec_length));
     error= HA_ERR_WRONG_MRG_TABLE_DEF;
+    my_error(error, MYF(0), file->open_tables->table->filename);
     goto err;
   }
   if ((error= table2myisam(table, &keyinfo, &recinfo, &recs)))
@@ -141,6 +142,7 @@ int ha_myisammrg::open(const char *name,
     {
       my_free((gptr) recinfo, MYF(0));
       error= HA_ERR_WRONG_MRG_TABLE_DEF;
+      my_error(error, MYF(0), u_table->table->filename);
       goto err;
     }
   }
@@ -149,7 +151,7 @@ int ha_myisammrg::open(const char *name,
   /* Merge table has more than 2G rows */
   if (table->s->crashed)
   {
-    error= HA_ERR_WRONG_MRG_TABLE_DEF;
+    error= HA_ERR_RECORD_FILE_FULL;
     goto err;
   }
 #endif

--- 1.231/sql/handler.cc	2007-04-05 08:30:15 +05:00
+++ 1.232/sql/handler.cc	2007-04-25 16:14:41 +05:00
@@ -1753,7 +1753,8 @@ void handler::print_error(int error, myf
     textno=ER_KEY_NOT_FOUND;
     break;
   case HA_ERR_WRONG_MRG_TABLE_DEF:
-    textno=ER_WRONG_MRG_TABLE;
+    /* Error is reported by the handler. */
+    DBUG_VOID_RETURN;
     break;
   case HA_ERR_FOUND_DUPP_KEY:
   {

--- 1.78/sql/share/errmsg.txt	2007-02-23 20:36:00 +04:00
+++ 1.79/sql/share/errmsg.txt	2007-04-25 16:14:41 +05:00
@@ -3810,28 +3810,7 @@ ER_WRONG_KEY_COLUMN 42000 
 	swe "Den använda tabelltypen kan inte indexera kolumn '%-.64s'"
 	ukr "÷ÉËÏÒÉÓÔÁÎÉÊ ×ËÁÚ¦×ÎÉË æ ÎÅ ÍÏÖÅ ¦ÎÄÅËÓÕ×ÁÔÉ ÓÔÏ×ÂÅÃØ '%-.64s'"
 ER_WRONG_MRG_TABLE  
-	cze "V-B¹echny tabulky v MERGE tabulce nejsou definovány stejnì"
-	dan "Tabellerne i MERGE er ikke defineret ens"
-	nla "Niet alle tabellen in de MERGE tabel hebben identieke gedefinities"
-	eng "Unable to open underlying table which is differently defined or of non-MyISAM type
or doesn't exist"
-	est "Kõik tabelid MERGE tabeli määratluses ei ole identsed"
-	fre "Toutes les tables de la table de type MERGE n'ont pas la même définition"
-	ger "Nicht alle Tabellen in der MERGE-Tabelle sind gleich definiert"
-	hun "A MERGE tablaban talalhato tablak definicioja nem azonos"
-	ita "Non tutte le tabelle nella tabella di MERGE sono definite in maniera identica"
-	jpn "All tables in the MERGE table are not defined identically"
-	kor "All tables in the MERGE table are not defined identically"
-	nor "All tables in the MERGE table are not defined identically"
-	norwegian-ny "All tables in the MERGE table are not defined identically"
-	pol "All tables in the MERGE table are not defined identically"
-	por "Todas as tabelas contidas na tabela fundida (MERGE) não estão definidas
identicamente"
-	rum "Toate tabelele din tabela MERGE nu sint definite identic"
-	rus "îÅ ×ÓÅ ÔÁÂÌÉÃÙ × MERGE ÏÐÒÅÄÅÌÅÎÙ ÏÄÉÎÁËÏ×Ï"
-	serbian "Tabele iskorištene u 'MERGE' tabeli nisu definisane na isti naèin"
-	slo "All tables in the MERGE table are not defined identically"
-	spa "Todas las tablas en la MERGE tabla no estan definidas identicamente"
-	swe "Tabellerna i MERGE-tabellen är inte identiskt definierade"
-	ukr "æ Õ MERGE TABLE ÍÁÀÔØ Ò¦ÚÎÕ ÓÔÒÕËÔÕÒÕ"
+	eng "Table '%-.64s' is differently defined or of non-MyISAM type or doesn't exist"
 ER_DUP_UNIQUE 23000 
 	cze "Kv-Bùli unique constraintu nemozu zapsat do tabulky '%-.64s'"
 	dan "Kan ikke skrive til tabellen '%-.64s' fordi det vil bryde CONSTRAINT regler"

--- 1.60/mysql-test/r/merge.result	2007-04-18 16:22:21 +05:00
+++ 1.61/mysql-test/r/merge.result	2007-04-25 16:14:41 +05:00
@@ -178,9 +178,9 @@ t3	CREATE TABLE `t3` (
 ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`,`t2`)
 create table t4 (a int not null, b char(10), key(a)) engine=MERGE UNION=(t1,t2);
 select * from t4;
-ERROR HY000: Unable to open underlying table which is differently defined or of
non-MyISAM type or doesn't exist
+ERROR HY000: Table './test/t1' is differently defined or of non-MyISAM type or doesn't
exist
 alter table t4 add column c int;
-ERROR HY000: Unable to open underlying table which is differently defined or of
non-MyISAM type or doesn't exist
+ERROR HY000: Table './test/t1' is differently defined or of non-MyISAM type or doesn't
exist
 create database mysqltest;
 create table mysqltest.t6 (a int not null primary key auto_increment, message char(20));
 create table t5 (a int not null, b char(20), key(a)) engine=MERGE
UNION=(test.t1,mysqltest.t6);
@@ -772,36 +772,36 @@ CREATE TABLE t1(a INT);
 INSERT INTO t1 VALUES(2),(1);
 CREATE TABLE t2(a INT, KEY(a)) ENGINE=MERGE UNION=(t1);
 SELECT * FROM t2 WHERE a=2;
-ERROR HY000: Unable to open underlying table which is differently defined or of
non-MyISAM type or doesn't exist
+ERROR HY000: Table './test/t1' is differently defined or of non-MyISAM type or doesn't
exist
 DROP TABLE t1, t2;
 CREATE TABLE t1(a INT) ENGINE=MEMORY;
 CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t1);
 SELECT * FROM t2;
-ERROR HY000: Unable to open underlying table which is differently defined or of
non-MyISAM type or doesn't exist
+ERROR HY000: Table './test/t1' is differently defined or of non-MyISAM type or doesn't
exist
 DROP TABLE t1, t2;
 CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t3);
 SELECT * FROM t2;
-ERROR HY000: Unable to open underlying table which is differently defined or of
non-MyISAM type or doesn't exist
+ERROR HY000: Table './test/t3' is differently defined or of non-MyISAM type or doesn't
exist
 DROP TABLE t2;
 CREATE TABLE t1(a INT, b TEXT);
 CREATE TABLE tm1(a TEXT, b INT) ENGINE=MERGE UNION=(t1);
 SELECT * FROM tm1;
-ERROR HY000: Unable to open underlying table which is differently defined or of
non-MyISAM type or doesn't exist
+ERROR HY000: Table './test/t1' is differently defined or of non-MyISAM type or doesn't
exist
 DROP TABLE t1, tm1;
 CREATE TABLE t1(a SMALLINT, b SMALLINT);
 CREATE TABLE tm1(a INT) ENGINE=MERGE UNION=(t1);
 SELECT * FROM tm1;
-ERROR HY000: Unable to open underlying table which is differently defined or of
non-MyISAM type or doesn't exist
+ERROR HY000: Table './test/t1' is differently defined or of non-MyISAM type or doesn't
exist
 DROP TABLE t1, tm1;
 CREATE TABLE t1(a SMALLINT, b SMALLINT, KEY(a, b));
 CREATE TABLE tm1(a SMALLINT, b SMALLINT, KEY(a)) ENGINE=MERGE UNION=(t1);
 SELECT * FROM tm1;
-ERROR HY000: Unable to open underlying table which is differently defined or of
non-MyISAM type or doesn't exist
+ERROR HY000: Table './test/t1' is differently defined or of non-MyISAM type or doesn't
exist
 DROP TABLE t1, tm1;
 CREATE TABLE t1(a SMALLINT, b SMALLINT, KEY(b));
 CREATE TABLE tm1(a SMALLINT, b SMALLINT, KEY(a)) ENGINE=MERGE UNION=(t1);
 SELECT * FROM tm1;
-ERROR HY000: Unable to open underlying table which is differently defined or of
non-MyISAM type or doesn't exist
+ERROR HY000: Table './test/t1' is differently defined or of non-MyISAM type or doesn't
exist
 DROP TABLE t1, tm1;
 CREATE TABLE t1(c1 VARCHAR(1));
 CREATE TABLE m1 LIKE t1;

--- 1.50/mysql-test/t/merge.test	2007-04-18 16:20:04 +05:00
+++ 1.51/mysql-test/t/merge.test	2007-04-25 16:14:41 +05:00
@@ -47,9 +47,9 @@ show create table t3;
 
 # The following should give errors
 create table t4 (a int not null, b char(10), key(a)) engine=MERGE UNION=(t1,t2);
---error 1168
+--error 143
 select * from t4;
---error 1168
+--error 143
 alter table t4 add column c int;
 
 #
@@ -385,7 +385,7 @@ drop table t1, t2, t3;
 CREATE TABLE t1(a INT);
 INSERT INTO t1 VALUES(2),(1);
 CREATE TABLE t2(a INT, KEY(a)) ENGINE=MERGE UNION=(t1);
---error 1168
+--error 143
 SELECT * FROM t2 WHERE a=2;
 DROP TABLE t1, t2;
 
@@ -395,11 +395,11 @@ DROP TABLE t1, t2;
 #
 CREATE TABLE t1(a INT) ENGINE=MEMORY;
 CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t1);
---error 1168
+--error 143
 SELECT * FROM t2;
 DROP TABLE t1, t2;
 CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t3);
---error 1168
+--error 143
 SELECT * FROM t2;
 DROP TABLE t2;
 
@@ -408,25 +408,25 @@ DROP TABLE t2;
 #
 CREATE TABLE t1(a INT, b TEXT);
 CREATE TABLE tm1(a TEXT, b INT) ENGINE=MERGE UNION=(t1);
---error 1168
+--error 143
 SELECT * FROM tm1;
 DROP TABLE t1, tm1;
 
 CREATE TABLE t1(a SMALLINT, b SMALLINT);
 CREATE TABLE tm1(a INT) ENGINE=MERGE UNION=(t1);
---error 1168
+--error 143
 SELECT * FROM tm1;
 DROP TABLE t1, tm1;
 
 CREATE TABLE t1(a SMALLINT, b SMALLINT, KEY(a, b));
 CREATE TABLE tm1(a SMALLINT, b SMALLINT, KEY(a)) ENGINE=MERGE UNION=(t1);
---error 1168
+--error 143
 SELECT * FROM tm1;
 DROP TABLE t1, tm1;
 
 CREATE TABLE t1(a SMALLINT, b SMALLINT, KEY(b));
 CREATE TABLE tm1(a SMALLINT, b SMALLINT, KEY(a)) ENGINE=MERGE UNION=(t1);
---error 1168
+--error 143
 SELECT * FROM tm1;
 DROP TABLE t1, tm1;
 
Thread
bk commit into 5.0 tree (svoj:1.2443) BUG#26976Sergey Vojtovich25 Apr