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,
DBUG_RETURN(rc);
} // 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",
fp->field_name);
my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0));
......
......@@ -394,22 +394,22 @@ CREATE TABLE t1
(
a BLOB
) 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
(
a TINYBLOB
) 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
(
a MEDIUMBLOB
) 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
(
a LONGBLOB
) 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
#
......
......@@ -125,14 +125,15 @@ PTDB TDBMUL::Duplicate(PGLOBAL g)
bool TDBMUL::InitFileNames(PGLOBAL g)
{
#define PFNZ 4096
#define FNSZ _MAX_DRIVE+_MAX_DIR+_MAX_FNAME+_MAX_EXT
char *pfn[PFNZ];
char *filename;
int rc, n = 0;
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
Tdbp->SetTable(To_Table); // Was not set at construction
......@@ -263,7 +264,7 @@ bool TDBMUL::InitFileNames(PGLOBAL g)
return true;
while (n < PFNZ) {
if (!fgets(filename, sizeof(filename), stream)) {
if (!fgets(filename, FNSZ, stream)) {
fclose(stream);
break;
} // 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