From a501347bb95b34abf52f2cb85192be1e8856efeb Mon Sep 17 00:00:00 2001 From: Greg Rychlewski Date: Thu, 2 Jan 2025 19:27:13 -0500 Subject: [PATCH] oops --- integration_test/myxql/prepare_test.exs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/integration_test/myxql/prepare_test.exs b/integration_test/myxql/prepare_test.exs index 98e9e4ac..543a04dc 100644 --- a/integration_test/myxql/prepare_test.exs +++ b/integration_test/myxql/prepare_test.exs @@ -7,8 +7,7 @@ defmodule Ecto.Integration.PrepareTest do alias Ecto.Integration.Post test "prepare option" do - one = TestRepo.insert!(%Post{title: "one"}) - two = TestRepo.insert!(%Post{title: "two"}) + TestRepo.insert!(%Post{title: "one"}) stmt_count_query = "SHOW GLOBAL STATUS LIKE '%prepared_stmt_count%'" assert %{rows: [[_, orig_count]]} = TestRepo.query!(stmt_count_query, []) @@ -17,20 +16,20 @@ defmodule Ecto.Integration.PrepareTest do query = from p in Post, select: fragment("'mxql test prepare option'") # Uncached - assert TestRepo.all(query, prepare: :unnamed) == [one, two] + assert TestRepo.all(query, prepare: :unnamed) == ["mxql test prepare option"] %{rows: [[_, new_count]]} = TestRepo.query!(stmt_count_query, []) assert String.to_integer(new_count) == orig_count - assert TestRepo.all(query, prepare: :named) == [one, two] + assert TestRepo.all(query, prepare: :named) == ["mxql test prepare option"] assert %{rows: [[_, new_count]]} = TestRepo.query!(stmt_count_query, []) assert String.to_integer(new_count) == orig_count + 1 # Cached - assert TestRepo.all(query, prepare: :unnamed) == [one, two] + assert TestRepo.all(query, prepare: :unnamed) == ["mxql test prepare option"] assert %{rows: [[_, new_count]]} = TestRepo.query!(stmt_count_query, []) assert String.to_integer(new_count) == orig_count + 1 - assert TestRepo.all(query, prepare: :named) == [one, two] + assert TestRepo.all(query, prepare: :named) == ["mxql test prepare option"] assert %{rows: [[_, new_count]]} = TestRepo.query!(stmt_count_query, []) assert String.to_integer(new_count) == orig_count + 1 end