Skip to content

Commit d2b5992

Browse files
authored
ci: fix MySQL version detection for ORDER BY placeholder parameter count on 2052 unit test (#3928)
* fix(tests): improve hasIncorrectPrepareParameter method * fix(test): >= 9 instead of just > 9 * fix(test): fix hasIncorrectPrepareParameter method to target only known versions intead. uncomment ci pipeline to test against 8.4 of MySQL
1 parent 490502f commit d2b5992

2 files changed

Lines changed: 4 additions & 19 deletions

File tree

.github/workflows/ci-mysql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
'mysql:8.1',
2525
'mysql:8.2',
2626
# 'mysql:8.3', # Already tested in "ci-linux"
27-
# 'mysql:8.4', # TODO: Tests never end
27+
'mysql:8.4',
2828
# 'mysql:9.0', # Already tested in "ci-coverage"
2929
'mysql:9.1',
3030
'mysql:9.2',

test/esm/regressions/2052.test.mjs

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -100,25 +100,10 @@ test(async () => {
100100
const mySqlVersion = await common.getMysqlVersion(connection);
101101

102102
const hasIncorrectPrepareParameter = (() => {
103+
const incorrectVersions = ['8.1.0', '8.2.0', '8.3.0', '8.4.0'];
103104
const { major, minor, patch } = mySqlVersion;
104-
105-
if (major === 9) return false;
106-
if (major === 8 && minor === 4 && patch === 1) return false;
107-
if (major === 8 && minor === 0 && patch >= 38) return false;
108-
109-
if (major > 8) {
110-
return true;
111-
}
112-
113-
if (major === 8 && minor > 0) {
114-
return true;
115-
}
116-
117-
if (major === 8 && minor === 0 && patch >= 22) {
118-
return true;
119-
}
120-
121-
return false;
105+
const verString = `${major}.${minor}.${patch}`;
106+
return incorrectVersions.includes(verString);
122107
})();
123108

124109
await test(

0 commit comments

Comments
 (0)