Browse Source

- 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
pull/22/head
Olivier Bertrand 11 years ago
parent
commit
ea5d7a5cce
  1. 6
      storage/connect/CMakeLists.txt
  2. 8
      storage/connect/ha_connect.cc
  3. 5
      storage/connect/tabvir.h

6
storage/connect/CMakeLists.txt

@ -23,15 +23,15 @@ array.cpp blkfil.cpp colblk.cpp csort.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
tabdos.cpp tabfix.cpp tabfmt.cpp table.cpp tabmul.cpp taboccur.cpp
tabpivot.cpp tabsys.cpp tabtbl.cpp tabutil.cpp tabvct.cpp tabxcl.cpp
valblk.cpp value.cpp xindex.cpp xobject.cpp
tabpivot.cpp tabsys.cpp tabtbl.cpp tabutil.cpp tabvct.cpp tabvir.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
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
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
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)
#

8
storage/connect/ha_connect.cc

@ -5508,6 +5508,14 @@ int ha_connect::create(const char *name, TABLE *table_arg,
DBUG_RETURN(rc);
} // 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()) {
case MYSQL_TYPE_SHORT:
case MYSQL_TYPE_LONG:

5
storage/connect/tabvir.h

@ -8,6 +8,11 @@
typedef class VIRDEF *PVIRDEF;
typedef class TDBVIR *PTDBVIR;
/***********************************************************************/
/* Return the unique column definition to MariaDB. */
/***********************************************************************/
PQRYRES VirColumns(PGLOBAL g, char *tab, char *db, bool info);
/* --------------------------- VIR classes --------------------------- */
/***********************************************************************/

Loading…
Cancel
Save