sql_handler.cc:
Backport the InnoDB HANDLER bug fix from 4.1 sql/sql_handler.cc: Backport the InnoDB HANDLER bug fix from 4.1
This commit is contained in:
parent
d0551ec55b
commit
260d208a46
@ -109,6 +109,8 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
|
|||||||
if (cond && cond->fix_fields(thd,tables))
|
if (cond && cond->fix_fields(thd,tables))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
table->file->init_table_handle_for_HANDLER(); // Only InnoDB requires it
|
||||||
|
|
||||||
if (keyname)
|
if (keyname)
|
||||||
{
|
{
|
||||||
if ((keyno=find_type(keyname, &table->keynames, 1+2)-1)<0)
|
if ((keyno=find_type(keyname, &table->keynames, 1+2)-1)<0)
|
||||||
@ -128,8 +130,6 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
|
|||||||
|
|
||||||
insert_fields(thd,tables,tables->db,tables->alias,&it);
|
insert_fields(thd,tables,tables->db,tables->alias,&it);
|
||||||
|
|
||||||
table->file->init_table_handle_for_HANDLER(); // Only InnoDB requires it
|
|
||||||
|
|
||||||
select_limit+=offset_limit;
|
select_limit+=offset_limit;
|
||||||
send_fields(thd,list,1);
|
send_fields(thd,list,1);
|
||||||
|
|
||||||
@ -139,6 +139,8 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
|
|||||||
if (!lock)
|
if (!lock)
|
||||||
goto err0; // mysql_lock_tables() printed error message already
|
goto err0; // mysql_lock_tables() printed error message already
|
||||||
|
|
||||||
|
table->file->init_table_handle_for_HANDLER(); // Only InnoDB requires it
|
||||||
|
|
||||||
for (num_rows=0; num_rows < select_limit; )
|
for (num_rows=0; num_rows < select_limit; )
|
||||||
{
|
{
|
||||||
switch(mode) {
|
switch(mode) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user