Skip to content

vtgate: fix panic on 'analyze table'#4090

Merged
sougou merged 1 commit intovitessio:masterfrom
sougou:panic
Jul 18, 2018
Merged

vtgate: fix panic on 'analyze table'#4090
sougou merged 1 commit intovitessio:masterfrom
sougou:panic

Conversation

@sougou
Copy link
Copy Markdown
Contributor

@sougou sougou commented Jul 18, 2018

analyze table was categorized as a DDL in order to store the table
name. However, vttablet code was not expecting fields to be returned
on DDL execution. This caused it to return a result with valid rows,
but empty fields, which caused vtgate to crash.

I've now changed DDL statements to also return fields. For good
measure, I've also changed DMLs to return fields, because there's
no harm.

Signed-off-by: Sugu Sougoumarane ssougou@gmail.com

analyze table was categorized as a DDL in order to store the table
name. However, vttablet code was not expecting fields to be returned
on DDL execution. This caused it to return a result with valid rows,
but empty fields, which caused vtgate to crash.

I've now changed DDL statements to also return fields. For good
measure, I've also changed DMLs to return fields, because there's
no harm.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
@sougou sougou requested a review from acharis July 18, 2018 02:45
@acharis
Copy link
Copy Markdown
Contributor

acharis commented Jul 18, 2018

wondering if there are any uses of txFetch or execSQL that still pass in false. if not, then maybe we should just elide that param. if we want to keep it, then this LGTM.

@sougou
Copy link
Copy Markdown
Contributor Author

sougou commented Jul 18, 2018

execSQL has use cases that use false, but probably not the case with txFetch. But it's no big deal to keep the flag explicit, in case it's needed in the future.

@sougou sougou merged commit fbb85d8 into vitessio:master Jul 18, 2018
@sougou sougou deleted the panic branch July 21, 2018 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants