Skip to content

Commit 9b2ed97

Browse files
committed
Fix for outOfRange test case.
1 parent 63e91a4 commit 9b2ed97

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/test/java/testsuite/x/devapi/CollectionFindTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ public void outOfRange() {
131131
}
132132
try {
133133
this.collection.add("{\"_id\": \"1\"}").execute();
134-
DocResult docs = this.collection.find().fields(expr("{'X':cast(pow(2,63) as signed)+1}")).execute();
134+
DocResult docs = this.collection.find().fields(expr(
135+
mysqlVersionMeetsMinimum(ServerVersion.parseVersion("8.0.13")) ? "{'X':cast(pow(2,63) as signed)+1}" : "{'X':1-cast(pow(2,63) as signed)}"))
136+
.execute();
135137
docs.next(); // we are getting valid data from xplugin before the error, need this call to force the error
136138
fail("Statement should raise an error");
137139
} catch (XProtocolError err) {

0 commit comments

Comments
 (0)