@@ -10,21 +10,22 @@ defmodule Ecto.Integration.PrepareTest do
10
10
11
11
stmt_count_query = "SHOW GLOBAL STATUS LIKE '%prepared_stmt_count%'"
12
12
assert % { rows: [ [ _ , orig_count ] ] } = TestRepo . query! ( stmt_count_query , [ ] )
13
+ orig_count = String . to_integer ( orig_count )
13
14
14
15
# Uncached
15
16
assert TestRepo . all ( Post , prepare: :unnamed ) == [ one , two ]
16
17
% { rows: [ [ _ , new_count ] ] } = TestRepo . query! ( stmt_count_query , [ ] )
17
- assert new_count == orig_count
18
+ assert String . to_integer ( new_count ) == orig_count
18
19
assert TestRepo . all ( Post , prepare: :named ) == [ one , two ]
19
20
assert % { rows: [ [ _ , new_count ] ] } = TestRepo . query! ( stmt_count_query , [ ] )
20
- assert new_count == orig_count + 1
21
+ assert String . to_integer ( new_count ) == orig_count + 1
21
22
22
23
# Cached
23
24
assert TestRepo . all ( Post , prepare: :unnamed ) == [ one , two ]
24
25
assert % { rows: [ [ _ , new_count ] ] } = TestRepo . query! ( stmt_count_query , [ ] )
25
- assert new_count == orig_count + 1
26
+ assert String . to_integer ( new_count ) == orig_count + 1
26
27
assert TestRepo . all ( Post , prepare: :named ) == [ one , two ]
27
28
assert % { rows: [ [ _ , new_count ] ] } = TestRepo . query! ( stmt_count_query , [ ] )
28
- assert new_count == orig_count + 1
29
+ assert String . to_integer ( new_count ) == orig_count + 1
29
30
end
30
31
end
0 commit comments