Below is the list of changes that have just been committed into a local
5.0 repository of Sinisa. When Sinisa 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.1776 05/03/05 21:44:15 Sinisa@stripped +5 -0
Fixing bug #8850 in such a way that when TRUNCATE is called within
stored procedure, it is converted to DELETE.
BitKeeper/etc/ignore
1.194 05/03/05 21:44:03 Sinisa@stripped +1 -0
Added acinclude.m4 to the ignore list
sql/sql_parse.cc
1.411 05/03/05 21:44:02 Sinisa@stripped +1 -1
A fix for the bug #8850
sql/sql_delete.cc
1.141 05/03/05 21:44:02 Sinisa@stripped +2 -1
A fix for bug #8850, plus adding a missing call to mysql_init_select(),
which caused mem_root corruption.
mysql-test/t/sp.test
1.105 05/03/05 21:44:02 Sinisa@stripped +24 -0
A test case for the bug #8850
mysql-test/r/sp.result
1.111 05/03/05 21:44:02 Sinisa@stripped +21 -0
A result for the test case for bug #8850
# 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: Sinisa
# Host: sinisa.nasamreza.org
# Root: /mnt/work/petica
--- 1.140/sql/sql_delete.cc Fri Feb 18 13:02:32 2005
+++ 1.141/sql/sql_delete.cc Sat Mar 5 21:44:02 2005
@@ -749,11 +749,12 @@
table_list->db, table_list->table_name);
DBUG_RETURN(TRUE);
}
- if (!ha_supports_generate(table_type))
+ if (!ha_supports_generate(table_type) || thd->lex->sphead)
{
/* Probably InnoDB table */
table_list->lock_type= TL_WRITE;
ha_enable_transaction(thd, FALSE);
+ mysql_init_select(thd->lex);
error= mysql_delete(thd, table_list, (COND*) 0, (SQL_LIST*) 0,
HA_POS_ERROR, 0);
ha_enable_transaction(thd, TRUE);
--- 1.410/sql/sql_parse.cc Sat Feb 26 17:15:33 2005
+++ 1.411/sql/sql_parse.cc Sat Mar 5 21:44:02 2005
@@ -3312,7 +3312,7 @@
Don't allow this within a transaction because we want to use
re-generate table
*/
- if (thd->locked_tables || thd->active_transaction())
+ if ((thd->locked_tables && !lex->sphead) ||
thd->active_transaction())
{
my_message(ER_LOCK_OR_ACTIVE_TRANSACTION,
ER(ER_LOCK_OR_ACTIVE_TRANSACTION), MYF(0));
--- 1.110/mysql-test/r/sp.result Fri Feb 25 18:56:39 2005
+++ 1.111/mysql-test/r/sp.result Sat Mar 5 21:44:02 2005
@@ -2538,3 +2538,24 @@
drop table t3|
drop table t1;
drop table t2;
+drop procedure if exists sp1;
+create table t1 (a int) engine=innodb|
+create procedure sp1 ()
+begin
+truncate table t1; insert t1 values (1); rollback;
+end
+|
+begin;
+insert t1 values (2);
+call sp1();
+ERROR HY000: Can't execute the given command because you have active locked tables or an
active transaction
+commit;
+select * from t1;
+a
+2
+call sp1();
+select * from t1;
+a
+1
+drop table t1;
+drop procedure sp1;
--- 1.104/mysql-test/t/sp.test Fri Feb 25 18:56:39 2005
+++ 1.105/mysql-test/t/sp.test Sat Mar 5 21:44:02 2005
@@ -3073,3 +3073,27 @@
drop table t1;
drop table t2;
+#
+# BUG#8850
+#
+--disable_warnings
+drop procedure if exists sp1;
+--enable_warnings
+delimiter |;
+create table t1 (a int) engine=innodb|
+create procedure sp1 ()
+begin
+ truncate table t1; insert t1 values (1); rollback;
+end
+|
+delimiter ;|
+begin;
+insert t1 values (2);
+--error 1192
+call sp1();
+commit;
+select * from t1;
+call sp1();
+select * from t1;
+drop table t1;
+drop procedure sp1;
--- 1.193/BitKeeper/etc/ignore Mon Feb 28 12:16:40 2005
+++ 1.194/BitKeeper/etc/ignore Sat Mar 5 21:44:03 2005
@@ -1105,3 +1105,4 @@
vio/test-sslclient
vio/test-sslserver
vio/viotest-ssl
+acinclude.m4
| Thread |
|---|
| • bk commit into 5.0 tree (Sinisa:1.1776) BUG#8850 | sinisa | 5 Mar |