Skip to content

Commit

Permalink
quote table name in mysql_check:is_view. increment version too
Browse files Browse the repository at this point in the history
  • Loading branch information
grooverdan committed Apr 14, 2015
1 parent 4987080 commit 83ce352
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/mysqlcheck.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 83ce352

Please sign in to comment.