Below is the list of changes that have just been committed into a local
4.1 repository of hf. When hf 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.2488 05/12/10 18:02:36 holyfoot@deer.(none) +3 -0
Fix for bug #15225 (ANALYZE temporary has no effect)
sql/sql_table.cc
1.308 05/12/10 18:01:53 holyfoot@stripped +9 -4
we don't need to remove temporary table from the cache,
but we need to reload it's info
mysql-test/t/analyze.test
1.7 05/12/10 18:01:53 holyfoot@stripped +9 -0
test case added
mysql-test/r/analyze.result
1.4 05/12/10 18:01:53 holyfoot@stripped +9 -0
test result fixed
# 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: holyfoot
# Host: deer.(none)
# Root: /home/hf/work/mysql-4.1.15225
--- 1.307/sql/sql_table.cc Fri Nov 25 14:25:25 2005
+++ 1.308/sql/sql_table.cc Sat Dec 10 18:01:53 2005
@@ -2140,10 +2140,15 @@
table->table->version=0; // Force close of table
else if (open_for_modify)
{
- pthread_mutex_lock(&LOCK_open);
- remove_table_from_cache(thd, table->table->table_cache_key,
- table->table->real_name, RTFC_NO_FLAG);
- pthread_mutex_unlock(&LOCK_open);
+ if (table->table->tmp_table)
+ table->table->file->info(HA_STATUS_CONST);
+ else
+ {
+ pthread_mutex_lock(&LOCK_open);
+ remove_table_from_cache(thd, table->table->table_cache_key,
+ table->table->real_name, RTFC_NO_FLAG);
+ pthread_mutex_unlock(&LOCK_open);
+ }
/* May be something modified consequently we have to invalidate cache */
query_cache_invalidate3(thd, table->table, 0);
}
--- 1.3/mysql-test/r/analyze.result Tue Nov 15 20:14:50 2005
+++ 1.4/mysql-test/r/analyze.result Sat Dec 10 18:01:53 2005
@@ -37,3 +37,12 @@
execute stmt1;
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
deallocate prepare stmt1;
+create temporary table t1(a int, index(a));
+insert into t1 values('1'),('2'),('3'),('4'),('5');
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status OK
+show index from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 1 a 1 a A 5 NULL NULL YES BTREE
+drop table t1;
--- 1.6/mysql-test/t/analyze.test Tue Nov 15 20:14:51 2005
+++ 1.7/mysql-test/t/analyze.test Sat Dec 10 18:01:53 2005
@@ -48,4 +48,13 @@
execute stmt1;
deallocate prepare stmt1;
+#
+# bug#15225 (ANALYZE temporary has no effect)
+#
+create temporary table t1(a int, index(a));
+insert into t1 values('1'),('2'),('3'),('4'),('5');
+analyze table t1;
+show index from t1;
+drop table t1;
+
# End of 4.1 tests
| Thread |
|---|
| • bk commit into 4.1 tree (holyfoot:1.2488) BUG#15225 | holyfoot | 10 Dec |