1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Bug#38291 memory corruption and server crash with view/sp/function

Send_field.org_col_name has broken value on secondary execution.
It happens when result field is created from the field which belongs to view
due to forgotten assignment of some Send_field attributes. 
The fix:
set Send_field.org_col_name,org_table_name with correct value during Send_field intialization.
This commit is contained in:
Sergey Glukhov
2008-08-20 14:49:28 +05:00
parent 53fe782e74
commit 9bc9ddd56e
5 changed files with 51 additions and 7 deletions

View File

@ -16162,7 +16162,7 @@ static void test_bug32265()
metadata= mysql_stmt_result_metadata(stmt);
field= mysql_fetch_field(metadata);
DIE_UNLESS(strcmp(field->table, "v1") == 0);
DIE_UNLESS(strcmp(field->org_table, "t1") == 0);
DIE_UNLESS(strcmp(field->org_table, "v1") == 0);
DIE_UNLESS(strcmp(field->db, "client_test_db") == 0);
mysql_free_result(metadata);
mysql_stmt_close(stmt);
@ -16174,7 +16174,7 @@ static void test_bug32265()
metadata= mysql_stmt_result_metadata(stmt);
field= mysql_fetch_field(metadata);
DIE_UNLESS(strcmp(field->table, "v1") == 0);
DIE_UNLESS(strcmp(field->org_table, "t1") == 0);
DIE_UNLESS(strcmp(field->org_table, "v1") == 0);
DIE_UNLESS(strcmp(field->db, "client_test_db") == 0);
mysql_free_result(metadata);
mysql_stmt_close(stmt);