diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2013-05-24 00:19:26 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2013-05-24 00:19:26 +0200 |
commit | 33b95315680e42754d41f63f72a003f0d69959d3 (patch) | |
tree | 3d44c9739a99883376492b047ca97a4276744561 /storage/connect/tabutil.cpp | |
parent | 7ef4c5df470e2c1ee0d5e7b57e05deebdcad753e (diff) | |
download | mariadb-git-33b95315680e42754d41f63f72a003f0d69959d3.tar.gz |
- Fix setting default type to MYSQL->PROXY->DOS in some places where it
was not done correctly.
- Fix a bug causing add_field to generate a syntax error on DOUBLE columns
with a 0 decimal value.
- Column can be undefined when Srcdef is specified.
modified:
storage/connect/ha_connect.cc
storage/connect/mycat.cc
storage/connect/tabmysql.cpp
storage/connect/tabutil.cpp
storage/connect/tabutil.h
Diffstat (limited to 'storage/connect/tabutil.cpp')
-rw-r--r-- | storage/connect/tabutil.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/storage/connect/tabutil.cpp b/storage/connect/tabutil.cpp index 5c4b428b09a..04271d1a460 100644 --- a/storage/connect/tabutil.cpp +++ b/storage/connect/tabutil.cpp @@ -120,7 +120,7 @@ TABLE_SHARE *GetTableShare(PGLOBAL g, THD *thd, const char *db, /* of the object table that will be retrieved by GetData commands. */ /************************************************************************/ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db, - const char *name, bool info) + const char *name, bool& info) { static int buftyp[] = {TYPE_STRING, TYPE_SHORT, TYPE_STRING, TYPE_INT, TYPE_INT, TYPE_SHORT, TYPE_SHORT, TYPE_SHORT, @@ -143,7 +143,9 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db, if (!(s = GetTableShare(g, thd, db, name, mysql))) { return NULL; } else if (s->is_view) { - strcpy(g->Message, "Cannot retreive Proxy columns from a view"); + strcpy(g->Message, "Use MYSQL type to see columns from a view"); + info = true; // To tell caller name is a view + free_table_share(s); return NULL; } else n = s->fieldnames.count; @@ -615,6 +617,8 @@ TDBTBC::TDBTBC(PPRXDEF tdp) : TDBCAT(tdp) /***********************************************************************/ PQRYRES TDBTBC::GetResult(PGLOBAL g) { - return TabColumns(g, current_thd, Db, Tab, false); + bool b = false; + + return TabColumns(g, current_thd, Db, Tab, b); } // end of GetResult |