Below is the list of changes that have just been committed into a local
4.1 repository of evgen. When evgen 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
1.2463 05/10/03 23:22:46 evgen@stripped +3 -0
Fix bug#13535 Incorrect result from SELECT statement after SHOW TABLE STATUS
After SHOW TABLE STATUS last_insert_id wasn't cleaned, and next select
erroneously rewrites WHERE condition and returs a row;
5.0 isn't affected because of different SHOW TABLE STATUS handling.
last_insert_id cleanup added to mysqld_extend_show_tables().
mysql-test/r/select.result
1.64 05/10/03 23:01:44 evgen@stripped +10 -0
Test case for bug #13535 Incorrect result from SELECT statement after SHOW TABLE
STATUS
mysql-test/t/select.test
1.48 05/10/03 23:01:18 evgen@stripped +10 -0
Test case for bug #13535 Incorrect result from SELECT statement after SHOW TABLE
STATUS
sql/sql_show.cc
1.205 05/10/03 22:48:48 evgen@stripped +9 -3
Fix bug #13535 Incorrect result from SELECT statement after SHOW TABLE STATUS
Added last_insert_id cleanup after SHOW TABLE STATUS command.
# 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: evgen
# Host: moonbone.local
# Root: /work/13535-bug-4.1-mysql
--- 1.204/sql/sql_show.cc 2005-09-29 15:17:01 +04:00
+++ 1.205/sql/sql_show.cc 2005-10-03 22:48:48 +04:00
@@ -462,6 +462,7 @@
TABLE *table;
Protocol *protocol= thd->protocol;
TIME time;
+ int res= 0;
DBUG_ENTER("mysqld_extend_show_tables");
(void) sprintf(path,"%s/%s",mysql_data_home,db);
@@ -632,10 +633,15 @@
close_thread_tables(thd,0);
}
if (protocol->write())
- DBUG_RETURN(-1);
+ {
+ res= -1;
+ break;
+ }
}
- send_eof(thd);
- DBUG_RETURN(0);
+ thd->insert_id(0);
+ if (!res)
+ send_eof(thd);
+ DBUG_RETURN(res);
}
--- 1.63/mysql-test/r/select.result 2005-09-28 00:40:41 +04:00
+++ 1.64/mysql-test/r/select.result 2005-10-03 23:01:44 +04:00
@@ -2626,3 +2626,13 @@
select f1 from t1,t2 where f1=f2 and (f1,f2) = ((1,NULL));
f1
drop table t1,t2;
+create table t1 (f1 int not null auto_increment primary key, f2 varchar(10));
+create table t11 like t1;
+insert into t1 values(1,""),(2,"");
+show table status like 't1%';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 MyISAM 9 Dynamic 2 20 X X X X X X X X latin1_swedish_ci NULL
+t11 MyISAM 9 Dynamic 0 0 X X X X X X X X latin1_swedish_ci NULL
+select 123 as a from t1 where f1 is null;
+a
+drop table t1,t11;
--- 1.47/mysql-test/t/select.test 2005-09-28 00:40:10 +04:00
+++ 1.48/mysql-test/t/select.test 2005-10-03 23:01:18 +04:00
@@ -2174,4 +2174,14 @@
select f1 from t1,t2 where f1=f2 and (f1,f2) = ((1,NULL));
drop table t1,t2;
+#
+# Bug #13535
+#
+create table t1 (f1 int not null auto_increment primary key, f2 varchar(10));
+create table t11 like t1;
+insert into t1 values(1,""),(2,"");
+--replace_column 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
+show table status like 't1%';
+select 123 as a from t1 where f1 is null;
+drop table t1,t11;
# End of 4.1 tests
| Thread |
|---|
| • bk commit into 4.1 tree (evgen:1.2463) BUG#13535 | eugene | 3 Oct |