mariadb/include
unknown 5b71281467 Fix for bug #24117 "server crash on a FETCH with a cursor on a table which is not in the table cache"
Problem:
When creating a temporary field for a temporary table in create_tmp_field_from_field(), a resulting field is created as an exact copy of an original one (in Field::new_field()). However, Field_enum and Field_set contain a pointer (typelib) to memory allocated in the parent table's MEM_ROOT, which under some circumstances may be deallocated later by the time a temporary table is used.

Solution:
Override the new_field() method for Field_enum and Field_set and create a separate copy of the typelib structure in there.


include/typelib.h:
  Added copy_typelib() declaration
mysql-test/r/sp.result:
  Added a testcase for bug #24117 "server crash on a FETCH with a cursor on a table which is not in the table cache"
mysql-test/t/sp.test:
  Added a testcase for bug #24117 "server crash on a FETCH with a cursor on a table which is not in the table cache"
mysys/typelib.c:
  Added copy_typelib() definition
sql/field.cc:
  Create a copy of the internal 'typelib' structure when copying Field_enum of Field_set objects.
sql/field.h:
  Override new_field method in Field_enum (and Field_set) to copy the typelib structure.
2006-12-14 20:58:07 +03:00
..
.cvsignore
abi_check Make --mem settable with environment variable MTR_MEM and make it possible to pass the directory to use. I.e --mem=<directory> 2006-11-07 11:07:27 +01:00
base64.h WL#2835: Base64 mysys functions 2005-10-14 01:14:23 +02:00
config-netware.h Fix for bug#21537, "Error at startup" 2006-08-23 12:08:08 +02:00
config-os2.h
config-win.h Fixed Bug#19479:mysqldump creates invalid dump. 2006-06-01 12:34:44 +03:00
decimal.h A lot of fixes to Precision math 2005-05-05 20:06:49 +05:00
errmsg.h A fix and a test case for Bug#9643 " CURSOR_TYPE_SCROLLABLE dos not work" 2005-05-16 18:27:21 +04:00
ft_global.h
hash.h Small cleanup in code handling stored routines/table prelocking. 2006-11-01 15:41:48 +03:00
heap.h Bug #12796: Record lost in HEAP table 2005-11-08 00:26:37 -05:00
help_end.h Several fixes for Netware. 2005-08-24 22:03:34 +03:00
help_start.h Several fixes for Netware. 2005-08-24 22:03:34 +03:00
keycache.h Bug#12920 - key_read_requests counter appears to re-set 2005-09-14 13:18:16 +02:00
m_ctype.h Merge bk@192.168.21.1:mysql-4.1 2006-10-12 13:50:22 +05:00
m_string.h Merge rama.(none):/home/jimw/my/mysql-4.1-clean 2006-09-28 18:09:10 -07:00
Makefile.am Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint 2006-11-13 13:33:33 +01:00
md5.h
my_aes.h
my_alarm.h
my_alloc.h Fix incorrect spellings of "dropped" in source and tests. (Bug #12828) 2005-08-30 12:24:37 -07:00
my_base.h Merge bk-internal:/home/bk/mysql-5.0-opt 2006-10-17 10:58:01 +03:00
my_bitmap.h Bug#10932 - Building server with key limit of 128, makes test cases fail 2005-07-19 14:13:56 +02:00
my_dbug.h Add ATTRIBUTE_FORMAT specifier to _db_doprnt, which is used by DBUG_PRINT 2006-10-12 20:15:56 +02:00
my_dir.h
my_getopt.h
my_global.h Merge shellback.(none):/home/msvensson/mysql/mysql-4.1-maint 2006-10-03 01:04:18 +02:00
my_handler.h After merge fixes 2006-06-30 20:07:33 +03:00
my_libwrap.h Cleanup to patch for Bug#18246, "compilation error with tcp_wrapper" 2006-06-21 18:35:19 +03:00
my_list.h Rename rest() macro in my_list.h to list_rest(). (Bug #12327) 2005-08-09 18:02:36 -07:00
my_net.h Add definition of SHUT_RDWR for compiling on windows 2006-09-15 17:53:45 +02:00
my_no_pthread.h Include the system header file "pthread.h" even in a non-threaded build. 2006-03-10 17:13:54 +01:00
my_nosys.h
my_pthread.h Merge neptunus.(none):/home/msvensson/mysql/my41-bug13711 2006-05-19 13:09:15 +02:00
my_semaphore.h
my_sys.h Merge bk-internal.mysql.com:/home/bk/mysql-4.1-engines 2006-10-11 22:28:06 +02:00
my_time.h Merge alik.:/mnt/raid/alik/MySQL/devel/5.0-rt 2006-11-07 13:45:56 +03:00
my_tree.h BUG#18160 - Memory-/HEAP Table endless growing indexes 2006-04-19 15:13:50 +05:00
my_user.h Fix for BUG#15110: mysqldump --triggers: does not include DEFINER clause 2006-01-11 02:07:40 +03:00
my_xml.h
myisam.h Merge chilla.local:/home/mydev/mysql-4.1-bug8283-one 2006-10-09 20:03:12 +02:00
myisammrg.h
myisampack.h
mysql.h Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint 2006-10-24 21:05:35 +02:00
mysql_com.h Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2006-09-28 10:09:57 -04:00
mysql_embed.h
mysql_h.ic Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint 2006-11-01 16:11:56 +01:00
mysql_time.h
mysql_version.h.in
mysys_err.h
queues.h
raid.h BUG#10241 cygwin port: invalid pragma interface directives 2005-05-04 15:05:56 +02:00
rijndael.h
sha1.h A fix for Bug#13944 "libmysqlclient exporting sha1_result function": 2006-01-11 17:31:52 +03:00
sql_common.h Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2006-08-02 14:13:01 +04:00
sslopt-case.h
sslopt-longopts.h Merge mysql.com:/home/jimw/my/mysql-5.0-1039 2006-05-19 16:17:24 -07:00
sslopt-vars.h Merge mysql.com:/home/jimw/my/mysql-5.0-1039 2006-05-19 16:17:24 -07:00
t_ctype.h
thr_alarm.h
thr_lock.h Merge mysql.com:/home/my/mysql-4.1 2005-07-28 17:09:54 +03:00
typelib.h Fix for bug #24117 "server crash on a FETCH with a cursor on a table which is not in the table cache" 2006-12-14 20:58:07 +03:00
violite.h Add new define YASSL_PREFIX beforee including ssl.h to activate inclusion of prefix_*.h files 2006-05-31 22:21:40 +02:00