MXS-1248: Pointer value alone does not tell validity

The pointer pointing to a recursive select may be non-null even
if it is not valid. The specific boolean must be checked as well.
This commit is contained in:
Johan Wikman
2017-06-30 08:59:03 +02:00
parent 7913f0ddf1
commit 7297ae129c

View File

@ -2909,7 +2909,7 @@ int32_t qc_mysql_get_field_info(GWBUF* buf, const QC_FIELD_INFO** infos, uint32_
{
update_field_infos(pi, lex, element->spec, usage, NULL);
if (element->first_recursive)
if (element->is_recursive && element->first_recursive)
{
update_field_infos(pi, lex, element->first_recursive, usage, NULL);
}