Background
MatrixOne issue: matrixorigin/matrixone#17598
show node list is internally planned by MatrixOne as select 1 where 0. The MySQL client and JDBC execution do not return a data row for this statement, but mo-tester genrs wrote the ResultSet metadata header into .result, which appeared as an unexpected placeholder 1.
Reproduction
Use a minimal case:
set save_query_result = on;
/* save_result */show node list;
select * from result_scan(last_query_id()) as u;
set save_query_result = off;
/* save_result */show node list;
select * from result_scan(last_query_id()) as u;
Before the fix, mo-tester generated output like:
/* save_result */show node list;
➤ 1[-5,64,0]
This is not a real show node list row; it is the placeholder column metadata from the internal select 1 where 0 rewrite.
Expected behavior
mo-tester should not emit the internal placeholder 1 for an empty show node list ResultSet. It should keep normal empty ResultSet behavior for ordinary SQL such as select 1 where 0.
Fix
PR: #198
The fix normalizes this specific empty show node list placeholder ResultSet to no result and avoids writing null result text in genrs mode.
Verification
JAVA_HOME=$(/usr/libexec/java_home -v 20) PATH="$JAVA_HOME/bin:$PATH" mvn -q -DskipTests jar:jar
- Local minimal case: before fix mo-tester emitted
➤ 1[-5,64,0]; after fix it no longer emits the placeholder 1.
- Control case
select 1 where 0 still preserves its header, so generic empty ResultSet behavior is not changed.
Background
MatrixOne issue: matrixorigin/matrixone#17598
show node listis internally planned by MatrixOne asselect 1 where 0. The MySQL client and JDBC execution do not return a data row for this statement, but mo-testergenrswrote the ResultSet metadata header into.result, which appeared as an unexpected placeholder1.Reproduction
Use a minimal case:
Before the fix, mo-tester generated output like:
This is not a real
show node listrow; it is the placeholder column metadata from the internalselect 1 where 0rewrite.Expected behavior
mo-tester should not emit the internal placeholder
1for an emptyshow node listResultSet. It should keep normal empty ResultSet behavior for ordinary SQL such asselect 1 where 0.Fix
PR: #198
The fix normalizes this specific empty
show node listplaceholder ResultSet to no result and avoids writing null result text ingenrsmode.Verification
JAVA_HOME=$(/usr/libexec/java_home -v 20) PATH="$JAVA_HOME/bin:$PATH" mvn -q -DskipTests jar:jar➤ 1[-5,64,0]; after fix it no longer emits the placeholder1.select 1 where 0still preserves its header, so generic empty ResultSet behavior is not changed.