Skip to content

Commit ff861cb

Browse files
Greg RychlewskiGreg Rychlewski
authored andcommitted
Mariadb counts affected rows in trailing ok packets differently than mysql
1 parent 1bb3ab5 commit ff861cb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/myxql/client_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ defmodule MyXQL.ClientTest do
350350
{:ok, com_stmt_prepare_ok(statement_id: statement_id)} =
351351
Client.com_stmt_prepare(client, "CALL single_ok_procedure()")
352352

353-
{:ok, ok_packet(affected_rows: 1, status_flags: status_flags)} =
353+
{:ok, ok_packet(status_flags: status_flags)} =
354354
Client.com_stmt_execute(client, statement_id, [], :cursor_type_read_only)
355355

356356
assert list_status_flags(status_flags) == [:server_status_autocommit]

test/myxql_test.exs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -663,10 +663,10 @@ defmodule MyXQLTest do
663663
setup :connect
664664

665665
test "text query", c do
666-
assert %MyXQL.Result{num_rows: 1, rows: nil} =
666+
assert %MyXQL.Result{rows: nil} =
667667
MyXQL.query!(c.conn, "CALL single_ok_procedure()", [], query_type: :text)
668668

669-
assert %MyXQL.Result{num_rows: 1, rows: nil} =
669+
assert %MyXQL.Result{rows: nil} =
670670
MyXQL.query!(c.conn, "CALL single_ok_procedure()", [], query_type: :text)
671671

672672
assert [%MyXQL.Result{rows: [[1]]}, %MyXQL.Result{num_rows: 0, rows: nil}] =
@@ -680,7 +680,7 @@ defmodule MyXQLTest do
680680
end
681681

682682
test "prepared query", c do
683-
assert {%MyXQL.Query{}, %MyXQL.Result{num_rows: 1, rows: nil}} =
683+
assert {%MyXQL.Query{}, %MyXQL.Result{rows: nil}} =
684684
MyXQL.prepare_execute!(c.conn, "", "CALL single_ok_procedure()")
685685

686686
assert {%MyXQL.Queries{},

0 commit comments

Comments
 (0)