Fix CREATE TABLE tokenization
The token skipping function did not check for a period or an opening parenthesis when parsing the test. Also fixed a debug assertion when only NULL values were inserted.
This commit is contained in:
@ -498,6 +498,23 @@ int get_metadata_len(uint8_t type)
|
|||||||
} \
|
} \
|
||||||
}while(false)
|
}while(false)
|
||||||
|
|
||||||
|
// Debug function for checking whether a row event consists of only NULL values
|
||||||
|
static bool all_fields_null(uint8_t* null_bitmap, int ncolumns)
|
||||||
|
{
|
||||||
|
bool rval = true;
|
||||||
|
|
||||||
|
for (long i = 0; i < ncolumns; i++)
|
||||||
|
{
|
||||||
|
if (!bit_is_set(null_bitmap, ncolumns, i))
|
||||||
|
{
|
||||||
|
rval = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return rval;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Extract the values from a single row in a row event
|
* @brief Extract the values from a single row in a row event
|
||||||
*
|
*
|
||||||
@ -525,7 +542,7 @@ uint8_t* process_row_event_data(TABLE_MAP *map, TABLE_CREATE *create, avro_value
|
|||||||
/** Store the null value bitmap */
|
/** Store the null value bitmap */
|
||||||
uint8_t *null_bitmap = ptr;
|
uint8_t *null_bitmap = ptr;
|
||||||
ptr += (ncolumns + 7) / 8;
|
ptr += (ncolumns + 7) / 8;
|
||||||
ss_dassert(ptr < end);
|
ss_dassert(ptr < end || (bit_is_set(null_bitmap, ncolumns, 0)));
|
||||||
|
|
||||||
char trace[ncolumns][768];
|
char trace[ncolumns][768];
|
||||||
memset(trace, 0, sizeof(trace));
|
memset(trace, 0, sizeof(trace));
|
||||||
|
|||||||
@ -1251,7 +1251,7 @@ static void skip_token(const char** saved)
|
|||||||
{
|
{
|
||||||
const char* ptr = *saved;
|
const char* ptr = *saved;
|
||||||
|
|
||||||
while (*ptr && !isspace(*ptr))
|
while (*ptr && !isspace(*ptr) && *ptr != '(' && *ptr != '.')
|
||||||
{
|
{
|
||||||
ptr++;
|
ptr++;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user