mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
- Fix bugs in handling of remote index when updating and deleting
modified: storage/connect/ha_connect.cc storage/connect/tabdos.cpp storage/connect/tabfmt.cpp storage/connect/tabmysql.cpp - add AVG_REC_LENGTH option to avoid result mismatch between Windows and Linux modified: storage/connect/mysql-test/connect/r/part_file.result storage/connect/mysql-test/connect/r/part_table.result storage/connect/mysql-test/connect/t/part_file.test
This commit is contained in:
@@ -590,22 +590,17 @@ bool TDBCSV::CheckErr(void)
|
||||
/***********************************************************************/
|
||||
int TDBCSV::EstimatedLength(PGLOBAL g)
|
||||
{
|
||||
int n = 0;
|
||||
PCOLDEF cdp;
|
||||
|
||||
if (trace)
|
||||
htrc("EstimatedLength: Fields=%d Columns=%p\n", Fields, Columns);
|
||||
|
||||
if (!Fields) {
|
||||
PCSVCOL colp;
|
||||
for (cdp = To_Def->GetCols(); cdp; cdp = cdp->GetNext())
|
||||
if (!cdp->IsSpecial() && !cdp->IsVirtual()) // A true column
|
||||
n++;
|
||||
|
||||
for (colp = (PCSVCOL)Columns; colp; colp = (PCSVCOL)colp->Next)
|
||||
if (!colp->IsSpecial() && !colp->IsVirtual()) // A true column
|
||||
Fields = MY_MAX(Fields, (int)colp->Fldnum);
|
||||
|
||||
if (Columns)
|
||||
Fields++; // Fldnum was 0 based
|
||||
|
||||
} // endif Fields
|
||||
|
||||
return (int)Fields; // Number of separators if all fields are null
|
||||
return --n; // Number of separators if all fields are null
|
||||
} // end of Estimated Length
|
||||
|
||||
#if 0
|
||||
|
Reference in New Issue
Block a user