Commit ea5d7a5c authored by Olivier Bertrand's avatar Olivier Bertrand

- Add the new files to the source list

modified:
  storage/connect/CMakeLists.txt

- Check VIR columns when creating the table
modified:
  storage/connect/ha_connect.cc
  
- Add VirColumns declaration to avoid gcc warning
modified:
  storage/connect/tabvir.h
parent 160708e1
...@@ -23,15 +23,15 @@ array.cpp blkfil.cpp colblk.cpp csort.cpp ...@@ -23,15 +23,15 @@ array.cpp blkfil.cpp colblk.cpp csort.cpp
filamap.cpp filamdbf.cpp filamfix.cpp filamtxt.cpp filamvct.cpp filamzip.cpp filamap.cpp filamdbf.cpp filamfix.cpp filamtxt.cpp filamvct.cpp filamzip.cpp
filter.cpp maputil.cpp myutil.cpp plgdbutl.cpp reldef.cpp tabcol.cpp filter.cpp maputil.cpp myutil.cpp plgdbutl.cpp reldef.cpp tabcol.cpp
tabdos.cpp tabfix.cpp tabfmt.cpp table.cpp tabmul.cpp taboccur.cpp tabdos.cpp tabfix.cpp tabfmt.cpp table.cpp tabmul.cpp taboccur.cpp
tabpivot.cpp tabsys.cpp tabtbl.cpp tabutil.cpp tabvct.cpp tabxcl.cpp tabpivot.cpp tabsys.cpp tabtbl.cpp tabutil.cpp tabvct.cpp tabvir.cpp
valblk.cpp value.cpp xindex.cpp xobject.cpp tabxcl.cpp valblk.cpp value.cpp xindex.cpp xobject.cpp
array.h blkfil.h block.h catalog.h checklvl.h colblk.h connect.h csort.h array.h blkfil.h block.h catalog.h checklvl.h colblk.h connect.h csort.h
engmsg.h filamap.h filamdbf.h filamfix.h filamtxt.h filamvct.h filamzip.h engmsg.h filamap.h filamdbf.h filamfix.h filamtxt.h filamvct.h filamzip.h
filter.h global.h ha_connect.h inihandl.h maputil.h msgid.h mycat.h myutil.h filter.h global.h ha_connect.h inihandl.h maputil.h msgid.h mycat.h myutil.h
os.h osutil.h plgcnx.h plgdbsem.h preparse.h reldef.h resource.h tabcol.h os.h osutil.h plgcnx.h plgdbsem.h preparse.h reldef.h resource.h tabcol.h
tabdos.h tabfix.h tabfmt.h tabmul.h taboccur.h tabpivot.h tabsys.h tabdos.h tabfix.h tabfmt.h tabmul.h taboccur.h tabpivot.h tabsys.h
tabtbl.h tabutil.h tabvct.h tabxcl.h user_connect.h valblk.h value.h tabtbl.h tabutil.h tabvct.h tabvir.h tabxcl.h user_connect.h valblk.h value.h
xindex.h xobject.h xtable.h) xindex.h xobject.h xtable.h)
# #
......
...@@ -5508,6 +5508,14 @@ int ha_connect::create(const char *name, TABLE *table_arg, ...@@ -5508,6 +5508,14 @@ int ha_connect::create(const char *name, TABLE *table_arg,
DBUG_RETURN(rc); DBUG_RETURN(rc);
} // endif flags } // endif flags
if (type == TAB_VIR)
if (!fp->option_struct || !fp->option_struct->special) {
strcpy(g->Message, "Virtual tables accept only special or virtual columns");
my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0));
rc= HA_ERR_INTERNAL_ERROR;
DBUG_RETURN(rc);
} // endif special
switch (fp->type()) { switch (fp->type()) {
case MYSQL_TYPE_SHORT: case MYSQL_TYPE_SHORT:
case MYSQL_TYPE_LONG: case MYSQL_TYPE_LONG:
......
...@@ -8,6 +8,11 @@ ...@@ -8,6 +8,11 @@
typedef class VIRDEF *PVIRDEF; typedef class VIRDEF *PVIRDEF;
typedef class TDBVIR *PTDBVIR; typedef class TDBVIR *PTDBVIR;
/***********************************************************************/
/* Return the unique column definition to MariaDB. */
/***********************************************************************/
PQRYRES VirColumns(PGLOBAL g, char *tab, char *db, bool info);
/* --------------------------- VIR classes --------------------------- */ /* --------------------------- VIR classes --------------------------- */
/***********************************************************************/ /***********************************************************************/
......
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