diff --git a/test/myxql_test.exs b/test/myxql_test.exs index c8e78d0..bfb3238 100644 --- a/test/myxql_test.exs +++ b/test/myxql_test.exs @@ -142,17 +142,26 @@ defmodule MyXQLTest do log = &send(self, &1) assert {:ok, %MyXQL.Result{}} = - MyXQL.query(c.conn, "BEGIN", [], query_type: :text, log: log) + MyXQL.query(c.conn, "PREPARE prepared_stmt FROM 'SELECT 1';", [], + query_type: :text, + log: log + ) assert_receive %DBConnection.LogEntry{query: %MyXQL.TextQuery{}} assert {:error, %MyXQL.Error{mysql: %{code: 1295}}} = - MyXQL.query(c.conn, "BEGIN", [], query_type: :binary, log: log) + MyXQL.query(c.conn, "PREPARE prepared_stmt FROM 'SELECT 1';", [], + query_type: :binary, + log: log + ) assert_receive %DBConnection.LogEntry{query: %MyXQL.Query{}} assert {:ok, %MyXQL.Result{}} = - MyXQL.query(c.conn, "BEGIN", [], query_type: :binary_then_text, log: log) + MyXQL.query(c.conn, "PREPARE prepared_stmt FROM 'SELECT 1';", [], + query_type: :binary_then_text, + log: log + ) assert_receive %DBConnection.LogEntry{query: %MyXQL.Query{}} end