We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b85b6bb commit e5fbf05Copy full SHA for e5fbf05
spec/mysql2/error_spec.rb
@@ -39,6 +39,10 @@
39
end
40
41
42
+ let(:server_info) do
43
+ @client.server_info
44
+ end
45
+
46
before do
47
# sanity check
48
expect(valid_utf8.encoding).to eql(Encoding::UTF_8)
@@ -56,7 +60,15 @@
56
60
expect(bad_err.message.encoding).to eql(Encoding::UTF_8)
57
61
expect(bad_err.message).to be_valid_encoding
58
62
59
- expect(bad_err.message).to include("??}\u001F")
63
+ # MariaDB 10.5 returns a little different error message unlike MySQL
64
+ # and other old MariaDBs.
65
+ # https://jira.mariadb.org/browse/MDEV-25400
66
+ err_str = if server_info[:version].match(/MariaDB/) && server_info[:id] >= 100500
67
+ "??}\\001F"
68
+ else
69
+ "??}\u001F"
70
71
+ expect(bad_err.message).to include(err_str)
72
73
74
0 commit comments