diff options
author | unknown <anozdrin@mysql.com> | 2006-05-10 23:16:30 +0400 |
---|---|---|
committer | unknown <anozdrin@mysql.com> | 2006-05-10 23:16:30 +0400 |
commit | 24a0b385fb48f3d4ace7df12d7115c80d3f4b0be (patch) | |
tree | eee71724a8803bced338d450083b960c7efcab22 /sql/item_func.cc | |
parent | 38447ae81ad2fc08f654fd4a759c6446f31f2026 (diff) | |
download | mariadb-git-24a0b385fb48f3d4ace7df12d7115c80d3f4b0be.tar.gz |
Fix for BUG#18587: Function that accepts and returns TEXT
garbles data if longer than 766 chars.
The problem is that a stored routine returns BLOBs to the previous
caller, BLOBs are shallow-copied (i.e. only pointers to the data are
copied). The fix is to also copy data of BLOBs.
mysql-test/r/sp.result:
Updated result file.
mysql-test/t/sp.test:
Added a test case for BUG#18587.
sql/field_conv.cc:
Do not jump to optimization if the field type is BLOB and
the destination table requires copying of BLOBs.
sql/item_func.cc:
Request copying BLOBs for the result table.
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index 0447ab115ec..603a00947dd 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -4735,6 +4735,7 @@ Item_func_sp::sp_result_field(void) const dummy_table->alias = empty_name; dummy_table->maybe_null = maybe_null; dummy_table->in_use= current_thd; + dummy_table->copy_blobs= TRUE; share->table_cache_key = empty_name; share->table_name = empty_name; } |