MXS-1621: Add ALTER TABLE ... [FIRST | AFTER col
] parsing
The parser checks whether the FIRST or AFTER keywords are used and, if AFTER is used, extracts the relevant column name. Added a test case that checks that the parsing works and detects the correct column names.
This commit is contained in:
@ -1040,12 +1040,13 @@ void handle_query_event(AVRO_INSTANCE *router, REP_HEADER *hdr, int *pending_tra
|
||||
db[dblen] = 0;
|
||||
|
||||
size_t sqlsz = len, tmpsz = len;
|
||||
char *tmp = MXS_MALLOC(len);
|
||||
char *tmp = MXS_MALLOC(len + 1);
|
||||
MXS_ABORT_IF_NULL(tmp);
|
||||
remove_mysql_comments((const char**)&sql, &sqlsz, &tmp, &tmpsz);
|
||||
sql = tmp;
|
||||
len = tmpsz;
|
||||
unify_whitespace(sql, len);
|
||||
sql[len] = '\0';
|
||||
|
||||
static bool warn_not_row_format = true;
|
||||
|
||||
|
Reference in New Issue
Block a user