Commit 8a633c94 authored by Olivier Bertrand's avatar Olivier Bertrand

- Fix bug MDEV-5919. Was because doing fseek of a stream closed by another thread.

modified:
  storage/connect/filamtxt.cpp

- Fix a bug causing a re-open table not being reset.
modified:
  storage/connect/ha_connect.cc
parent 0449abe0
...@@ -887,7 +887,8 @@ int DOSFAM::RenameTempFile(PGLOBAL g) ...@@ -887,7 +887,8 @@ int DOSFAM::RenameTempFile(PGLOBAL g)
// This loop is necessary because, in case of join, // This loop is necessary because, in case of join,
// To_File can have been open several times. // To_File can have been open several times.
for (PFBLOCK fb = PlgGetUser(g)->Openlist; fb; fb = fb->Next) for (PFBLOCK fb = PlgGetUser(g)->Openlist; fb; fb = fb->Next)
rc = PlugCloseFile(g, fb); if (fb == To_Fb || fb == To_Fbt)
rc = PlugCloseFile(g, fb);
tempname = (char*)To_Fbt->Fname; tempname = (char*)To_Fbt->Fname;
PlugSetPath(filename, To_File, Tdbp->GetPath()); PlugSetPath(filename, To_File, Tdbp->GetPath());
......
...@@ -2500,10 +2500,13 @@ int ha_connect::rnd_init(bool scan) ...@@ -2500,10 +2500,13 @@ int ha_connect::rnd_init(bool scan)
DBUG_RETURN(HA_ERR_INITIALIZATION); DBUG_RETURN(HA_ERR_INITIALIZATION);
// Do not close the table if it was opened yet (locked?) // Do not close the table if it was opened yet (locked?)
if (IsOpened()) if (IsOpened()) {
DBUG_RETURN(0); if (tdbp->OpenDB(g)) // Rewind table
// CloseTable(g); Was done before making things done twice DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
else if (xp->CheckQuery(valid_query_id)) else
DBUG_RETURN(0);
} else if (xp->CheckQuery(valid_query_id))
tdbp= NULL; // Not valid anymore tdbp= NULL; // Not valid anymore
// When updating, to avoid skipped update, force the table // When updating, to avoid skipped update, force the table
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment