Below is the list of changes that have just been committed into a local
5.1 repository of kaa. When kaa 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, 2006-12-14 21:18:48+03:00, kaa@stripped +4 -0
Merge polly.local:/tmp/maint/bug24117/my50-bug24117
into polly.local:/tmp/maint/bug24117/my51-bug24117
MERGE: 1.1810.2321.7
mysql-test/r/sp.result@stripped, 2006-12-14 21:18:44+03:00, kaa@stripped +17 -17
Manual merge
MERGE: 1.170.1.47
mysql-test/t/sp.test@stripped, 2006-12-14 21:17:01+03:00, kaa@stripped +0 -0
Auto merged
MERGE: 1.174.1.33
sql/field.cc@stripped, 2006-12-14 21:17:02+03:00, kaa@stripped +0 -0
Auto merged
MERGE: 1.256.34.1
sql/field.h@stripped, 2006-12-14 21:17:02+03:00, kaa@stripped +0 -0
Auto merged
MERGE: 1.153.13.1
# 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: kaa
# Host: polly.local
# Root: /tmp/maint/bug24117/my51-bug24117/RESYNC
--- 1.352/sql/field.cc 2006-12-14 21:19:03 +03:00
+++ 1.353/sql/field.cc 2006-12-14 21:19:03 +03:00
@@ -7961,6 +7961,16 @@ void Field_enum::sql_type(String &res) c
}
+Field *Field_enum::new_field(MEM_ROOT *root, struct st_table *new_table,
+ bool keep_type)
+{
+ Field_enum *res= (Field_enum*) Field::new_field(root, new_table, keep_type);
+ if (res)
+ res->typelib= copy_typelib(root, typelib);
+ return res;
+}
+
+
/*
set type.
This is a string which can have a collection of different values.
--- 1.191/sql/field.h 2006-12-14 21:19:03 +03:00
+++ 1.192/sql/field.h 2006-12-14 21:19:03 +03:00
@@ -1350,6 +1350,7 @@ public:
{
flags|=ENUM_FLAG;
}
+ Field *new_field(MEM_ROOT *root, struct st_table *new_table, bool keep_type);
enum_field_types type() const { return FIELD_TYPE_STRING; }
enum Item_result cmp_type () const { return INT_RESULT; }
enum Item_result cast_to_int_type () const { return INT_RESULT; }
--- 1.236/mysql-test/r/sp.result 2006-12-14 21:19:03 +03:00
+++ 1.237/mysql-test/r/sp.result 2006-12-14 21:19:03 +03:00
@@ -5407,7 +5407,7 @@ drop database if exists това_е_дъ
create database това_е_дълго_име_за_база_данни_нали|
INSERT INTO mysql.proc VALUES ('това_е_дълго_име_за_база_данни_нали','това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго','PROCEDURE','това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго','SQL','CONTAINS_SQL','NO','DEFINER','','','bad_body','root@localhost',now(), now(),'','')|
call това_е_дълго_име_за_база_данни_нали.това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго()|
-ERROR HY000: Failed to load routine това_е_дълго_име_за_база_данни_нали.. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
+ERROR HY000: Failed to load routine това_е_дълго_име_за_база_данни_нали.това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
drop database това_е_дълго_име_за_база_данни_нали|
CREATE TABLE t3 (
Member_ID varchar(15) NOT NULL,
@@ -5708,4 +5708,20 @@ DROP TABLE bug23760, bug23760_log|
DROP PROCEDURE bug23760_update_log|
DROP PROCEDURE bug23760_test_row_count|
DROP FUNCTION bug23760_rc_test|
+DROP PROCEDURE IF EXISTS bug24117|
+DROP TABLE IF EXISTS t3|
+CREATE TABLE t3(c1 ENUM('abc'))|
+INSERT INTO t3 VALUES('abc')|
+CREATE PROCEDURE bug24117()
+BEGIN
+DECLARE t3c1 ENUM('abc');
+DECLARE mycursor CURSOR FOR SELECT c1 FROM t3;
+OPEN mycursor;
+FLUSH TABLES;
+FETCH mycursor INTO t3c1;
+CLOSE mycursor;
+END|
+CALL bug24117()|
+DROP PROCEDURE bug24117|
+DROP TABLE t3|
drop table t1,t2;
--- 1.207/mysql-test/t/sp.test 2006-12-14 21:19:03 +03:00
+++ 1.208/mysql-test/t/sp.test 2006-12-14 21:19:03 +03:00
@@ -6659,6 +6659,30 @@ DROP PROCEDURE bug23760_test_row_count|
DROP FUNCTION bug23760_rc_test|
#
+# BUG#24117: server crash on a FETCH with a cursor on a table which is not in
+# the table cache
+#
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS bug24117|
+DROP TABLE IF EXISTS t3|
+--enable_warnings
+CREATE TABLE t3(c1 ENUM('abc'))|
+INSERT INTO t3 VALUES('abc')|
+CREATE PROCEDURE bug24117()
+BEGIN
+ DECLARE t3c1 ENUM('abc');
+ DECLARE mycursor CURSOR FOR SELECT c1 FROM t3;
+ OPEN mycursor;
+ FLUSH TABLES;
+ FETCH mycursor INTO t3c1;
+ CLOSE mycursor;
+END|
+CALL bug24117()|
+DROP PROCEDURE bug24117|
+DROP TABLE t3|
+
+#
# NOTE: The delimiter is `|`, and not `;`. It is changed to `;`
# at the end of the file!
#
| Thread |
|---|
| • bk commit into 5.1 tree (kaa:1.2397) | Alexey Kopytov | 14 Dec |