Description:
On a server built with --with-debug=full there's an uninitialized value being printed in a debug message when a merge base table is not defined as myisam:
Version: '5.1.35-debug-log' socket: '' port: 3306 Source distribution
Error:Run-Time Check Failure #3 - The variable 'myisam' is being used without being initialized. At e:\builds\mysql-5.1.35\mysql-5.1.35\storage\myisammrg\ha_myisammrg.cc:383
Variable 'myisam' is not evaluated due to boolean short circuiting:
if ((child->file->ht->db_type != DB_TYPE_MYISAM) ||
!(myisam= ((ha_myisam*) child->file)->file_ptr()))
{
DBUG_PRINT("error", ("no MyISAM handle for child table: '%s'.'%s' 0x%lx",
child->s->db.str, child->s->table_name.str,
(long) child));
my_errno= HA_ERR_WRONG_MRG_TABLE_DEF;
}
DBUG_PRINT("myrg", ("MyISAM handle: 0x%lx my_errno: %d",
(long) myisam, my_errno));
How to repeat:
Run full debug version of mysqld and execute the sql:
flush tables;
drop table if exists m1,t1;
create table t1(id int)engine=memory;
create table m1(id int)engine=merge union=(t1);
check table m1;
Suggested fix:
initialize all those variables to null during declaration.
Description: On a server built with --with-debug=full there's an uninitialized value being printed in a debug message when a merge base table is not defined as myisam: Version: '5.1.35-debug-log' socket: '' port: 3306 Source distribution Error:Run-Time Check Failure #3 - The variable 'myisam' is being used without being initialized. At e:\builds\mysql-5.1.35\mysql-5.1.35\storage\myisammrg\ha_myisammrg.cc:383 Variable 'myisam' is not evaluated due to boolean short circuiting: if ((child->file->ht->db_type != DB_TYPE_MYISAM) || !(myisam= ((ha_myisam*) child->file)->file_ptr())) { DBUG_PRINT("error", ("no MyISAM handle for child table: '%s'.'%s' 0x%lx", child->s->db.str, child->s->table_name.str, (long) child)); my_errno= HA_ERR_WRONG_MRG_TABLE_DEF; } DBUG_PRINT("myrg", ("MyISAM handle: 0x%lx my_errno: %d", (long) myisam, my_errno)); How to repeat: Run full debug version of mysqld and execute the sql: flush tables; drop table if exists m1,t1; create table t1(id int)engine=memory; create table m1(id int)engine=merge union=(t1); check table m1; Suggested fix: initialize all those variables to null during declaration.