List:Commits« Previous MessageNext Message »
From:igor Date:May 15 2007 10:16pm
Subject:bk commit into 5.0 tree (igor:1.2487)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of igor. When igor 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-05-15 13:16:10-07:00, igor@stripped +3 -0
  Merge olga.mysql.com:/home/igor/dev-opt/mysql-4.1-opt-bug28272
  into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug28272
  MERGE: 1.1616.3024.13

  mysql-test/r/innodb_mysql.result@stripped, 2007-05-15 13:10:55-07:00, igor@stripped +0
-0
    Auto merged
    MERGE: 1.3.1.6

  mysql-test/t/innodb_mysql.test@stripped, 2007-05-15 13:10:55-07:00, igor@stripped +0
-0
    Auto merged
    MERGE: 1.3.1.6

  sql/sql_select.cc@stripped, 2007-05-15 13:16:08-07:00, igor@stripped +6 -6
    Manual merge
    MERGE: 1.216.148.3

# 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:	igor
# Host:	olga.mysql.com
# Root:	/home/igor/dev-opt/mysql-5.0-opt-bug28272/RESYNC

--- 1.520/sql/sql_select.cc	2007-05-15 13:16:17 -07:00
+++ 1.521/sql/sql_select.cc	2007-05-15 13:16:17 -07:00
@@ -976,6 +976,12 @@
     }
   }
 
+  if (conds &&!outer_join && const_table_map != found_const_table_map
&& 
+      (select_options & SELECT_DESCRIBE) &&
+      select_lex->master_unit() == &thd->lex->unit) // upper level SELECT
+  {
+    conds=new Item_int((longlong) 0,1);	// Always false
+  }
   if (make_join_select(this, select, conds))
   {
     zero_result_cause=

--- 1.20/mysql-test/r/innodb_mysql.result	2007-05-15 13:16:17 -07:00
+++ 1.21/mysql-test/r/innodb_mysql.result	2007-05-15 13:16:17 -07:00
@@ -144,6 +144,27 @@
 c1	cnt
 1a	2
 DROP TABLE t1;
+CREATE TABLE t1 (
+a1 decimal(10,0) DEFAULT NULL,
+a2 blob,
+a3 time DEFAULT NULL,
+a4 blob,
+a5 char(175) DEFAULT NULL,
+a6 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+a7 tinyblob,
+INDEX idx (a6,a7(239),a5)
+) ENGINE=InnoDB;
+EXPLAIN SELECT a4 FROM t1 WHERE
+a6=NULL AND
+a4='UNcT5pIde4I6c2SheTo4gt92OV1jgJCVkXmzyf325R1DwLURkbYHwhydANIZMbKTgdcR5xS';
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const
tables
+EXPLAIN SELECT t1.a4 FROM t1, t1 t WHERE
+t.a6=t.a6 AND t1.a6=NULL AND
+t1.a4='UNcT5pIde4I6c2SheTo4gt92OV1jgJCVkXmzyf325R1DwLURkbYHwhydANIZMbKTgdcR5xS';
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const
tables
+DROP TABLE t1;
 End of 4.1 tests
 create table t1m (a int) engine=myisam;
 create table t1i (a int) engine=innodb;

--- 1.20/mysql-test/t/innodb_mysql.test	2007-05-15 13:16:17 -07:00
+++ 1.21/mysql-test/t/innodb_mysql.test	2007-05-15 13:16:17 -07:00
@@ -169,6 +169,31 @@
 SELECT * FROM t1;
 DROP TABLE t1;
 
+#
+# Bug #28272: EXPLAIN for SELECT from an empty InnoDB table
+#
+
+CREATE TABLE t1 (
+  a1 decimal(10,0) DEFAULT NULL,
+  a2 blob,
+  a3 time DEFAULT NULL,
+  a4 blob,
+  a5 char(175) DEFAULT NULL,
+  a6 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+  a7 tinyblob,
+  INDEX idx (a6,a7(239),a5)
+) ENGINE=InnoDB;
+
+EXPLAIN SELECT a4 FROM t1 WHERE
+a6=NULL AND
+a4='UNcT5pIde4I6c2SheTo4gt92OV1jgJCVkXmzyf325R1DwLURkbYHwhydANIZMbKTgdcR5xS';
+
+EXPLAIN SELECT t1.a4 FROM t1, t1 t WHERE
+t.a6=t.a6 AND t1.a6=NULL AND
+t1.a4='UNcT5pIde4I6c2SheTo4gt92OV1jgJCVkXmzyf325R1DwLURkbYHwhydANIZMbKTgdcR5xS';
+
+DROP TABLE t1;
+
 --echo End of 4.1 tests
 #
 # Bug #12882  	min/max inconsistent on empty table
Thread
bk commit into 5.0 tree (igor:1.2487)igor15 May