Below is the list of changes that have just been committed into a
4.0 repository of sasha. When sasha does a push, they will be propogated 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://www.mysql.com/doc/I/n/Installing_source_tree.html
ChangeSet@stripped, 2002-04-08 18:20:24-06:00, sasha@stripped
fixed bug in truncating temp tables
fixed compilation problem on FreeBSD
added test for truncating temporary tables
mysql-test/r/truncate.result
1.6 02/04/08 18:20:21 sasha@stripped +6 -0
truncate test
mysql-test/t/truncate.test
1.6 02/04/08 18:20:21 sasha@stripped +5 -0
truncate test update
mysys/safemalloc.c
1.12 02/04/08 18:20:21 sasha@stripped +3 -0
fixed FreeBSD compilation problem
sql/sql_delete.cc
1.72 02/04/08 18:20:21 sasha@stripped +6 -2
fixed bug in truncating temporary tables
# 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: sasha
# Host: mysql.sashanet.com
# Root: /reiser-data/mysql-4.0
--- 1.11/mysys/safemalloc.c Fri Apr 5 23:07:23 2002
+++ 1.12/mysys/safemalloc.c Mon Apr 8 18:20:21 2002
@@ -73,7 +73,10 @@
#include "mysys_err.h"
ulonglong safemalloc_mem_limit = ~(ulonglong)0;
+
+#ifdef THREAD
pthread_t shutdown_th,main_th,signal_th;
+#endif
#define pNext tInt._pNext
#define pPrev tInt._pPrev
--- 1.71/sql/sql_delete.cc Fri Mar 22 13:55:05 2002
+++ 1.72/sql/sql_delete.cc Mon Apr 8 18:20:21 2002
@@ -520,7 +520,11 @@
if ((error= (int) !(open_temporary_table(thd, path, table_list->db,
table_list->real_name, 1))))
(void) rm_temporary_table(table_type, path);
- DBUG_RETURN(error ? -1 : 0);
+ /* Sasha: if we return here we will not have binloged the truncation and
+ we will not send_ok() to the client. Yes, we do need better coverage
+ testing, this bug has been here for a few months :-).
+ */
+ goto end;
}
(void) sprintf(path,"%s/%s/%s%s",mysql_data_home,table_list->db,
@@ -549,7 +553,7 @@
*fn_ext(path)=0; // Remove the .frm extension
error= ha_create_table(path,&create_info,1) ? -1 : 0;
query_cache_invalidate3(thd, table_list, 0);
-
+end:
if (!dont_send_ok)
{
if (!error)
--- 1.5/mysql-test/r/truncate.result Wed Oct 10 18:59:45 2001
+++ 1.6/mysql-test/r/truncate.result Mon Apr 8 18:20:21 2002
@@ -14,3 +14,9 @@
drop table t1;
select count(*) from t1;
Table 'test.t1' doesn't exist
+create temporary table t1 (n int);
+insert into t1 values (1),(2),(3);
+truncate table t1;
+select * from t1;
+n
+drop table t1;
--- 1.5/mysql-test/t/truncate.test Wed Oct 10 18:59:43 2001
+++ 1.6/mysql-test/t/truncate.test Mon Apr 8 18:20:21 2002
@@ -13,3 +13,8 @@
# The following should fail
--error 1146
select count(*) from t1;
+create temporary table t1 (n int);
+insert into t1 values (1),(2),(3);
+truncate table t1;
+select * from t1;
+drop table t1;
| Thread |
|---|
| • bk commit into 4.0 tree | sasha | 9 Apr |