Prepared statement needs to be re-prepared ?

Ranorex Spy, Recorder, and Studio.
qa-auto
Posts: 64
Joined: Mon Aug 05, 2019 10:46 pm

Prepared statement needs to be re-prepared ?

Post by qa-auto » Wed Jan 27, 2021 8:43 pm

Hi,

Has anyone seen this error after defining a data source?

All my other data sources use selects without joins just fine.

SQL
SELECT distinct ld.loan_id,
th.effective_due_date
FROM trans_hdr th
INNER JOIN vw_loan_data ld ON th.id=ld.hdr_id
INNER JOIN customer c ON th.customer_id=c.id
WHERE th.status_id in (1)
and th.loan_model_id = 459
and th.store_id = '171' order by rand() limit 1;
image (48).png
image (48).png (8.81 KiB) Viewed 173 times

User avatar
vseaver
Certified Professional
Certified Professional
Posts: 16
Joined: Tue Jan 19, 2021 5:24 pm
Location: Colorado, US

Re: Prepared statement needs to be re-prepared ?

Post by vseaver » Fri Apr 23, 2021 7:52 pm

If you run this sql statement against the SQL database does it work outside of Ranorex?
Sales Engineer @ Ranorex

qa-auto
Posts: 64
Joined: Mon Aug 05, 2019 10:46 pm

Re: Prepared statement needs to be re-prepared ?

Post by qa-auto » Thu May 06, 2021 7:30 pm

Yes.

In the meantime, I'm writing a work around by using a MySqlDataAdapter to get the result set and then creating a SimpleDataConnector. Not quite finished yet.

Lorinda

qa-auto
Posts: 64
Joined: Mon Aug 05, 2019 10:46 pm

Re: Prepared statement needs to be re-prepared ?

Post by qa-auto » Thu May 06, 2021 7:40 pm

Cannot move forward now because of this issue:

viewtopic.php?f=13&t=19351&p=65947#p65947

Jacob
Certified Professional
Certified Professional
Posts: 21
Joined: Mon Mar 22, 2021 10:01 pm

Re: Prepared statement needs to be re-prepared ?

Post by Jacob » Thu May 06, 2021 9:58 pm

To add on to this, I did find an open bug in the MariaDB Jira for a similar issue. It looks like it will be addressed in one of the upstream 10.5 releases of MariaDB, but may have been fixed in later versions already. It does seem possible to increase table_definition_cache to bypass this particular issue for the time being, but it may crop up again.

--Jacob
Image

OliviaParcker23
Posts: 1
Joined: Fri May 07, 2021 10:40 am

Re: Prepared statement needs to be re-prepared ?

Post by OliviaParcker23 » Fri May 07, 2021 11:12 am

that is, in version 10.5 everything is already fine?

Jacob
Certified Professional
Certified Professional
Posts: 21
Joined: Mon Mar 22, 2021 10:01 pm

Re: Prepared statement needs to be re-prepared ?

Post by Jacob » Mon May 10, 2021 3:15 pm

Hi Olivia,

According to the posts in the Jira defect, it seems as though older versions of MariaDB aren't handling the situation as well as 10.5, but it is still possible to encounter the issue in 10.5. From what I can see, we're still waiting on a fix from the MariaDB team.

--Jacob
Image