Commit 83ce3529 authored by Daniel Black's avatar Daniel Black

quote table name in mysql_check:is_view. increment version too

parent 4987080d
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
/* By Jani Tolonen, 2001-04-20, MySQL Development Team */ /* 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 "client_priv.h"
#include <m_ctype.h> #include <m_ctype.h>
...@@ -526,12 +526,14 @@ static int is_view(const char *table, uint length) ...@@ -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)))) if (!(query =(char *) my_malloc((sizeof(char)*(length+110)), MYF(MY_WME))))
DBUG_RETURN(-1); DBUG_RETURN(-1);
ptr= strmov(query, "SHOW CREATE TABLE "); ptr= strmov(query, "SHOW CREATE TABLE `");
ptr= strxmov(ptr, table, NullS); ptr= strxmov(ptr, table, NullS);
ptr= strxmov(ptr, "`", NullS);
if (mysql_query(sock, query)) if (mysql_query(sock, query))
{ {
fprintf(stderr, "Failed to %s\n", query); fprintf(stderr, "Failed to %s\n", query);
fprintf(stderr, "Error: %s\n", mysql_error(sock)); fprintf(stderr, "Error: %s\n", mysql_error(sock));
my_free(query);
DBUG_RETURN(-1); DBUG_RETURN(-1);
} }
res= mysql_store_result(sock); res= mysql_store_result(sock);
......
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