vidalraphael

vidalraphael

Hi,

I’m facing some trouble with prepared statements in MySQL.

Whenever I try to run queries on some tables/views, I get the following error:

** (exit) an exception was raised:
    ** (Mariaex.Error) (1615): Prepared statement needs to be re-prepared
        (ecto) lib/ecto/adapters/sql.ex:436: Ecto.Adapters.SQL.execute_and_cache/7
        (ecto) lib/ecto/repo/queryable.ex:130: Ecto.Repo.Queryable.execute/5
        (ecto) lib/ecto/repo/queryable.ex:35: Ecto.Repo.Queryable.all/4
        (ecto) lib/ecto/repo/queryable.ex:68: Ecto.Repo.Queryable.one/4
        ...
        (plug) lib/plug/adapters/cowboy/handler.ex:15: Plug.Adapters.Cowboy.Handler.upgrade/4
        (cowboy) /code/deps/cowboy/src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4

Reading it online, I found that this has to do with some problem at the database level, and my options are fixing the db or disabling prepared statements, but I have zero access to change the db configuration.

I looked arround at the Ecto, Mariaex and DBConnection codebase I could not find a way to disable it.

I am willing to make a PR creating a new configuration, but I’m kind off clueless on how or where to do it.

Does anyone have any tips for me?

Showing Posts 1 to 3

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

An example of the kind of query you’re running would likely facilitate debugging.

vidalraphael

vidalraphael OP

It’s a simple select with a left join in a view.

The thing that’s causing the error is the database itself, so a sample select will not help much, since I have no authorization to make any adjustments on the database level.

Just to clarify, we have a clone of the production database that is used for staging purposes, and it works flawlessly on it. The error only occurs on the production server.

michalmuskala

michalmuskala

I’m not sure about the error, so won’t be much of a help here, but I can say that disabling prepared statements won’t work because they are essential to the architecture of ecto.

— All posts loaded —

Where Next? Top

Trending in Questions Top

Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
Onor.io
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
Trolleger
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
matt-savvy
Anyone here using Honeybadger? My Honeybadger account is being overwhelmed with noise from some bots. Seeing a lot of Bandit.HTTPError...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews