Commit 61c2e7b2 authored by Olivier Bertrand's avatar Olivier Bertrand

- Fix MDEV-6502

modified:
  storage/connect/ha_connect.cc

- Apply Sergei's fixes
modified:
  storage/connect/filamtxt.cpp
  storage/connect/mysql-test/connect/t/part_file.test
parent f835588c
...@@ -475,7 +475,7 @@ bool DOSFAM::AllocateBuffer(PGLOBAL g) ...@@ -475,7 +475,7 @@ bool DOSFAM::AllocateBuffer(PGLOBAL g)
MODE mode = Tdbp->Mode; MODE mode = Tdbp->Mode;
// Lrecl does not include line ending // Lrecl does not include line ending
Buflen = Lrecl + Ending + ((Bin) ? 1 : 0); Buflen = Lrecl + Ending + ((Bin) ? 1 : 0) + 1; // Sergei
if (trace) if (trace)
htrc("SubAllocating a buffer of %d bytes\n", Buflen); htrc("SubAllocating a buffer of %d bytes\n", Buflen);
......
...@@ -2739,7 +2739,8 @@ int ha_connect::write_row(uchar *buf) ...@@ -2739,7 +2739,8 @@ int ha_connect::write_row(uchar *buf)
DBUG_RETURN(0); // Alter table on an outward partition table DBUG_RETURN(0); // Alter table on an outward partition table
xmod= MODE_INSERT; xmod= MODE_INSERT;
} // endif xmod } else if (xmod == MODE_ANY)
DBUG_RETURN(0); // Probably never met
// Open the table if it was not opened yet (locked) // Open the table if it was not opened yet (locked)
if (!IsOpened() || xmod != tdbp->GetMode()) { if (!IsOpened() || xmod != tdbp->GetMode()) {
...@@ -2751,9 +2752,6 @@ int ha_connect::write_row(uchar *buf) ...@@ -2751,9 +2752,6 @@ int ha_connect::write_row(uchar *buf)
} // endif isopened } // endif isopened
if (tdbp->GetMode() == MODE_ANY)
DBUG_RETURN(0);
#if 0 // AUTO_INCREMENT NIY #if 0 // AUTO_INCREMENT NIY
if (table->next_number_field && buf == table->record[0]) { if (table->next_number_field && buf == table->record[0]) {
int error; int error;
...@@ -4935,7 +4933,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, ...@@ -4935,7 +4933,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd,
} else if (!user) } else if (!user)
user= "root"; user= "root";
if (CheckSelf(g, table_s, host, db, tab, src, port)) if (ok && CheckSelf(g, table_s, host, db, tab, src, port))
ok= false; ok= false;
break; break;
......
...@@ -72,7 +72,7 @@ SHOW INDEX FROM t1; ...@@ -72,7 +72,7 @@ SHOW INDEX FROM t1;
# TODO: this fails on Linux # TODO: this fails on Linux
#SELECT * FROM dr1 ORDER BY fname, ftype; #SELECT * FROM dr1 ORDER BY fname, ftype;
INSERT INTO t1(id,msg) VALUES(4, 'four'); INSERT INTO t1(id,msg) VALUES(4, 'four');
SELECT * FROM dr1; SELECT * FROM dr1 ORDER BY fname, ftype;
INSERT INTO t1(id,msg) VALUES(7,'seven'),(10,'ten'),(40,'forty'),(60,'sixty'),(81,'eighty one'); INSERT INTO t1(id,msg) VALUES(7,'seven'),(10,'ten'),(40,'forty'),(60,'sixty'),(81,'eighty one');
INSERT INTO t1(id,msg) VALUES(72,'seventy two'),(20,'twenty'),(1,'one'),(35,'thirty five'),(8,'eight'); INSERT INTO t1(id,msg) VALUES(72,'seventy two'),(20,'twenty'),(1,'one'),(35,'thirty five'),(8,'eight');
SELECT partition_name, table_rows FROM information_schema.partitions WHERE table_name = 't1'; SELECT partition_name, table_rows FROM information_schema.partitions WHERE table_name = 't1';
......
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