diff options
author | Daniel Black <grooverdan@users.sourceforge.net> | 2015-04-14 13:26:55 +1000 |
---|---|---|
committer | Daniel Black <grooverdan@users.sourceforge.net> | 2015-04-14 13:26:55 +1000 |
commit | 83ce3529b8b2ba5b8070d12aaecbb6c3e3fcaeca (patch) | |
tree | 773494bfc4129523f4f6b21d586acae6d012a595 | |
parent | 4987080ddb42abf1a9111bd6a79e7bed746b66ff (diff) | |
download | mariadb-git-83ce3529b8b2ba5b8070d12aaecbb6c3e3fcaeca.tar.gz |
quote table name in mysql_check:is_view. increment version too
-rw-r--r-- | client/mysqlcheck.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index dfc743d5493..43c7ff0d8a1 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -18,7 +18,7 @@ /* By Jani Tolonen, 2001-04-20, MySQL Development Team */ -#define CHECK_VERSION "2.7.1" +#define CHECK_VERSION "2.7.2-MariaDB" #include "client_priv.h" #include <m_ctype.h> @@ -526,12 +526,14 @@ static int is_view(const char *table, uint length) if (!(query =(char *) my_malloc((sizeof(char)*(length+110)), MYF(MY_WME)))) DBUG_RETURN(-1); - ptr= strmov(query, "SHOW CREATE TABLE "); + ptr= strmov(query, "SHOW CREATE TABLE `"); ptr= strxmov(ptr, table, NullS); + ptr= strxmov(ptr, "`", NullS); if (mysql_query(sock, query)) { fprintf(stderr, "Failed to %s\n", query); fprintf(stderr, "Error: %s\n", mysql_error(sock)); + my_free(query); DBUG_RETURN(-1); } res= mysql_store_result(sock); |