Fix DDL table identifier parsing

The parsing was inadequate and did not support all forms of quoted
identifiers.
This commit is contained in:
Markus Mäkelä
2018-01-26 13:50:06 +02:00
parent b7e475f316
commit 9146a215f7
3 changed files with 142 additions and 65 deletions

View File

@ -302,12 +302,12 @@ extern void read_table_info(uint8_t *ptr, uint8_t post_header_len, uint64_t *tab
char* dest, size_t len);
extern TABLE_MAP *table_map_alloc(uint8_t *ptr, uint8_t hdr_len, TABLE_CREATE* create);
extern void table_map_free(TABLE_MAP *map);
extern TABLE_CREATE* table_create_alloc(const char* sql, int len, const char* db);
extern TABLE_CREATE* table_create_alloc(const char* ident, const char* sql, int len, const char* db);
extern TABLE_CREATE* table_create_copy(AVRO_INSTANCE *router, const char* sql, size_t len, const char* db);
extern void table_create_free(TABLE_CREATE* value);
extern bool table_create_save(TABLE_CREATE *create, const char *filename);
extern bool table_create_alter(TABLE_CREATE *create, const char *sql, const char *end);
extern void read_alter_identifier(const char *sql, const char *end, char *dest, int size);
extern void read_table_identifier(const char* db, const char *sql, const char *end, char *dest, int size);
extern int avro_client_handle_request(AVRO_INSTANCE *, AVRO_CLIENT *, GWBUF *);
extern void avro_client_rotate(AVRO_INSTANCE *router, AVRO_CLIENT *client, uint8_t *ptr);
extern bool avro_open_binlog(const char *binlogdir, const char *file, int *fd);