Commit d861b617 authored by Olivier Bertrand's avatar Olivier Bertrand

- Fix regression error for multiple 2 tables.

modified:
  storage/connect/tabmul.cpp

- Fix regression error on field types. Cannot eliminate BINARY_FLAG that
  is on for DATE columns. Update result from dbf.test case.

modified:
  storage/connect/ha_connect.cc
  storage/connect/mysql-test/connect/r/dbf.result
parent a8428e3a
...@@ -4036,7 +4036,7 @@ int ha_connect::create(const char *name, TABLE *table_arg, ...@@ -4036,7 +4036,7 @@ int ha_connect::create(const char *name, TABLE *table_arg,
DBUG_RETURN(rc); DBUG_RETURN(rc);
} // endif flags } // endif flags
if (fp->flags & (BLOB_FLAG | BINARY_FLAG | ENUM_FLAG | SET_FLAG)) { if (fp->flags & (BLOB_FLAG | ENUM_FLAG | SET_FLAG)) {
sprintf(g->Message, "Unsupported type for column %s", sprintf(g->Message, "Unsupported type for column %s",
fp->field_name); fp->field_name);
my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0)); my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0));
......
...@@ -394,22 +394,22 @@ CREATE TABLE t1 ...@@ -394,22 +394,22 @@ CREATE TABLE t1
( (
a BLOB a BLOB
) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='t1.dbf'; ) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='t1.dbf';
ERROR HY000: Unsupported type for column 'a' ERROR HY000: Unsupported type for column a
CREATE TABLE t1 CREATE TABLE t1
( (
a TINYBLOB a TINYBLOB
) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='t1.dbf'; ) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='t1.dbf';
ERROR HY000: Unsupported type for column 'a' ERROR HY000: Unsupported type for column a
CREATE TABLE t1 CREATE TABLE t1
( (
a MEDIUMBLOB a MEDIUMBLOB
) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='t1.dbf'; ) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='t1.dbf';
ERROR HY000: Unsupported type for column 'a' ERROR HY000: Unsupported type for column a
CREATE TABLE t1 CREATE TABLE t1
( (
a LONGBLOB a LONGBLOB
) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='t1.dbf'; ) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='t1.dbf';
ERROR HY000: Unsupported type for column 'a' ERROR HY000: Unsupported type for column a
# #
# Testing DATE # Testing DATE
# #
......
...@@ -125,14 +125,15 @@ PTDB TDBMUL::Duplicate(PGLOBAL g) ...@@ -125,14 +125,15 @@ PTDB TDBMUL::Duplicate(PGLOBAL g)
bool TDBMUL::InitFileNames(PGLOBAL g) bool TDBMUL::InitFileNames(PGLOBAL g)
{ {
#define PFNZ 4096 #define PFNZ 4096
#define FNSZ _MAX_DRIVE+_MAX_DIR+_MAX_FNAME+_MAX_EXT
char *pfn[PFNZ]; char *pfn[PFNZ];
char *filename; char *filename;
int rc, n = 0; int rc, n = 0;
if (trace) if (trace)
htrc("in InitFileName: fn[]=%d\n", _MAX_DRIVE+_MAX_DIR+_MAX_FNAME+_MAX_EXT); htrc("in InitFileName: fn[]=%d\n", FNSZ);
filename = (char*)PlugSubAlloc(g, NULL, _MAX_DRIVE+_MAX_DIR+_MAX_FNAME+_MAX_EXT); filename = (char*)PlugSubAlloc(g, NULL, FNSZ);
// The sub table may need to refer to the Table original block // The sub table may need to refer to the Table original block
Tdbp->SetTable(To_Table); // Was not set at construction Tdbp->SetTable(To_Table); // Was not set at construction
...@@ -263,7 +264,7 @@ bool TDBMUL::InitFileNames(PGLOBAL g) ...@@ -263,7 +264,7 @@ bool TDBMUL::InitFileNames(PGLOBAL g)
return true; return true;
while (n < PFNZ) { while (n < PFNZ) {
if (!fgets(filename, sizeof(filename), stream)) { if (!fgets(filename, FNSZ, stream)) {
fclose(stream); fclose(stream);
break; break;
} // endif fgets } // endif fgets
......
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