-
Steinar H. Gunderson authored
Yet more test changes to prepare for the hypergraph optimizer: - Add --sorted_result to several test files. - Use the new --skip_if_hypergraph directive to skip some statements whose results depend on the query plan chosen or similar. - Add a few blank lines between some queries so that diff(1) will have an easier time making diff hunks that MTR's hypergraph error detection will parse. The latter case is a bit tricky. Imagine two skipped queries in a row: EXECUTE stmt; EXECUTE stmt; Normally, the output would look something like this: EXECUTE stmt; response for s1 EXECUTE stmt; response for s2 but with --skip_if_hypergraph or similar, it would be instead: EXECUTE stmt; <ignored hypergraph optimizer error> EXECUTE stmt; <ignored hypergraph optimizer error> We'd expect the diff to be then EXECUTE stmt; -response for s1 +<ignored hypergraph optimizer error> EXECUTE stmt; -response for s2 +<ignored hypergraph optimizer error> but if we're unlucky, diff(1) could choose to parse this as EXECUTE stmt; -response for s1 -EXECUTE stmt; -response for s2 +<ignored hypergraph optimizer error> +EXECUTE stmt; +<ignored hypergraph optimizer error> mysqltest's logic would then go ahead and ignore the first five lines of the diff, but then see the “added” EXECUTE stmt; line, erroneously seeing it as a non-ignorable diff and thus fail the test instead of skipping it. Adding some extra air helps the diff in making skippable output. Change-Id: Ib8edcb13c241299dba545b2def2fe47aac4a2df7
Steinar H. Gunderson authoredYet more test changes to prepare for the hypergraph optimizer: - Add --sorted_result to several test files. - Use the new --skip_if_hypergraph directive to skip some statements whose results depend on the query plan chosen or similar. - Add a few blank lines between some queries so that diff(1) will have an easier time making diff hunks that MTR's hypergraph error detection will parse. The latter case is a bit tricky. Imagine two skipped queries in a row: EXECUTE stmt; EXECUTE stmt; Normally, the output would look something like this: EXECUTE stmt; response for s1 EXECUTE stmt; response for s2 but with --skip_if_hypergraph or similar, it would be instead: EXECUTE stmt; <ignored hypergraph optimizer error> EXECUTE stmt; <ignored hypergraph optimizer error> We'd expect the diff to be then EXECUTE stmt; -response for s1 +<ignored hypergraph optimizer error> EXECUTE stmt; -response for s2 +<ignored hypergraph optimizer error> but if we're unlucky, diff(1) could choose to parse this as EXECUTE stmt; -response for s1 -EXECUTE stmt; -response for s2 +<ignored hypergraph optimizer error> +EXECUTE stmt; +<ignored hypergraph optimizer error> mysqltest's logic would then go ahead and ignore the first five lines of the diff, but then see the “added” EXECUTE stmt; line, erroneously seeing it as a non-ignorable diff and thus fail the test instead of skipping it. Adding some extra air helps the diff in making skippable output. Change-Id: Ib8edcb13c241299dba545b2def2fe47aac4a2df7
Loading