Commit f48d7662 authored by Olivier Bertrand's avatar Olivier Bertrand

- Include last source modifs

modified:
  storage/connect/filamtxt.cpp
  storage/connect/ha_connect.cc
  storage/connect/tabxml.cpp
parents 81ce7da7 21d9c582
...@@ -934,6 +934,7 @@ int DOSFAM::RenameTempFile(PGLOBAL g) ...@@ -934,6 +934,7 @@ 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)
if (fb == To_Fb || fb == To_Fbt)
rc = PlugCloseFile(g, fb); rc = PlugCloseFile(g, fb);
tempname = (char*)To_Fbt->Fname; tempname = (char*)To_Fbt->Fname;
......
...@@ -2702,10 +2702,13 @@ int ha_connect::rnd_init(bool scan) ...@@ -2702,10 +2702,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()) {
if (tdbp->OpenDB(g)) // Rewind table
DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
else
DBUG_RETURN(0); DBUG_RETURN(0);
// CloseTable(g); Was done before making things done twice
else if (xp->CheckQuery(valid_query_id)) } 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
...@@ -3347,17 +3350,18 @@ int ha_connect::external_lock(THD *thd, int lock_type) ...@@ -3347,17 +3350,18 @@ int ha_connect::external_lock(THD *thd, int lock_type)
// This is unlocking, do it by closing the table // This is unlocking, do it by closing the table
if (xp->CheckQueryID() && sqlcom != SQLCOM_UNLOCK_TABLES if (xp->CheckQueryID() && sqlcom != SQLCOM_UNLOCK_TABLES
&& sqlcom != SQLCOM_LOCK_TABLES) && sqlcom != SQLCOM_LOCK_TABLES
rc= 2; // Logical error ??? && sqlcom != SQLCOM_DROP_TABLE) {
// else if (g->Xchk && (sqlcom == SQLCOM_CREATE_INDEX || sprintf(g->Message, "external_lock: unexpected command %d", sqlcom);
// sqlcom == SQLCOM_DROP_INDEX)) { push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 0, g->Message);
else if (g->Xchk) { DBUG_RETURN(0);
} else if (g->Xchk) {
if (!tdbp) { if (!tdbp) {
if (!(tdbp= GetTDB(g))) if (!(tdbp= GetTDB(g)))
DBUG_RETURN(HA_ERR_INTERNAL_ERROR); DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
else if (!((PTDBASE)tdbp)->GetDef()->Indexable()) { else if (!((PTDBASE)tdbp)->GetDef()->Indexable()) {
sprintf(g->Message, "external_lock: Table %s is not indexable", tdbp->GetName()); sprintf(g->Message, "external_lock: Table %s is not indexable", tdbp->GetName());
// DBUG_RETURN(HA_ERR_INTERNAL_ERROR); // DBUG_RETURN(HA_ERR_INTERNAL_ERROR); causes assert error
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 0, g->Message); push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 0, g->Message);
DBUG_RETURN(0); DBUG_RETURN(0);
} // endif Indexable } // endif Indexable
...@@ -4998,7 +5002,9 @@ int ha_connect::create(const char *name, TABLE *table_arg, ...@@ -4998,7 +5002,9 @@ int ha_connect::create(const char *name, TABLE *table_arg,
sprintf(g->Message, "Unsupported 0 length for column %s", sprintf(g->Message, "Unsupported 0 length for column %s",
fp->field_name); fp->field_name);
rc= HA_ERR_INTERNAL_ERROR; rc= HA_ERR_INTERNAL_ERROR;
my_printf_error(ER_UNKNOWN_ERROR, g->Message, MYF(0)); my_printf_error(ER_UNKNOWN_ERROR,
"Unsupported 0 length for column %s",
MYF(0), fp->field_name);
DBUG_RETURN(rc); DBUG_RETURN(rc);
} // endif fp } // endif fp
...@@ -5017,7 +5023,8 @@ int ha_connect::create(const char *name, TABLE *table_arg, ...@@ -5017,7 +5023,8 @@ int ha_connect::create(const char *name, TABLE *table_arg,
sprintf(g->Message, "Unsupported type for column %s", sprintf(g->Message, "Unsupported type for column %s",
fp->field_name); fp->field_name);
rc= HA_ERR_INTERNAL_ERROR; rc= HA_ERR_INTERNAL_ERROR;
my_printf_error(ER_UNKNOWN_ERROR, g->Message, MYF(0)); my_printf_error(ER_UNKNOWN_ERROR, "Unsupported type for column %s",
MYF(0), fp->field_name);
DBUG_RETURN(rc); DBUG_RETURN(rc);
break; break;
} // endswitch type } // endswitch type
......
...@@ -1326,14 +1326,11 @@ void XMLCOL::WriteColumn(PGLOBAL g) ...@@ -1326,14 +1326,11 @@ void XMLCOL::WriteColumn(PGLOBAL g)
if (Value != To_Val) if (Value != To_Val)
Value->SetValue_pval(To_Val, false); // Convert the updated value Value->SetValue_pval(To_Val, false); // Convert the updated value
if (Value->IsNull())
return;
/*********************************************************************/ /*********************************************************************/
/* If a check pass was done while updating, all node contruction */ /* If a check pass was done while updating, all node contruction */
/* has been already one. */ /* has been already one. */
/*********************************************************************/ /*********************************************************************/
if (Status && Tdbp->Checked) { if (Status && Tdbp->Checked && !Value->IsNull()) {
assert (ColNode != NULL); assert (ColNode != NULL);
assert ((Type ? (void *)ValNode : (void *)AttNode) != NULL); assert ((Type ? (void *)ValNode : (void *)AttNode) != NULL);
goto fin; goto fin;
...@@ -1346,6 +1343,12 @@ void XMLCOL::WriteColumn(PGLOBAL g) ...@@ -1346,6 +1343,12 @@ void XMLCOL::WriteColumn(PGLOBAL g)
if (Tdbp->CheckRow(g, Nod || Tdbp->Colname)) if (Tdbp->CheckRow(g, Nod || Tdbp->Colname))
longjmp(g->jumper[g->jump_level], TYPE_AM_XML); longjmp(g->jumper[g->jump_level], TYPE_AM_XML);
/*********************************************************************/
/* Null values are represented by no node. */
/*********************************************************************/
if (Value->IsNull())
return;
/*********************************************************************/ /*********************************************************************/
/* Find the column and value nodes to update or insert. */ /* Find the column and value nodes to update or insert. */
/*********************************************************************/ /*********************************************************************/
......
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