-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli,sql: fix reported result columns for EXPLAIN ANALYZE
This fixes an issue where EXPLAIN ANALYZE would report a RowDescription for both the EXPLAIN and for the statement being explained. If the statement had a different number of result columns, this would confuse the CLI. No release note, since this bug was not released. Release note: None
- Loading branch information
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#! /usr/bin/env expect -f | ||
|
||
source [file join [file dirname $argv0] common.tcl] | ||
|
||
start_server $argv | ||
|
||
start_test "Ensure that EXPLAIN ANALYZE works as expected in the sql shell" | ||
|
||
# Spawn a sql shell. | ||
spawn $argv sql | ||
set client_spawn_id $spawn_id | ||
eexpect root@ | ||
|
||
# Check for a regression where the CLI would get confused when the statement | ||
# had a different number of result columns. | ||
send "EXPLAIN ANALYZE SELECT 1,2;\r" | ||
eexpect "info" | ||
eexpect "planning time" | ||
eexpect "actual row count" | ||
|
||
send_eof | ||
eexpect eof | ||
|
||
end_test | ||
|
||
stop_server $argv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters