# Implicit type conversions not happening after upgrade from 5.7 to 8.0

**URL:** <https://forums.percona.com/t/implicit-type-conversions-not-happening-after-upgrade-from-5-7-to-8-0/29829>\
**Category:** Percona Server for MySQL\
**Tags:** mysql\
**Created:** [April 24, 2024, 12:16pm UTC](https://forums.percona.com/t/implicit-type-conversions-not-happening-after-upgrade-from-5-7-to-8-0/29829 "2024-04-24T12:16:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![erpramodprajapat](https://avatars.discourse-cdn.com/v4/letter/e/c37758/32.png) [@erpramodprajapat](https://forums.percona.com/u/erpramodprajapat)\
**Post date:** [April 24, 2024, 12:16pm UTC](https://forums.percona.com/t/implicit-type-conversions-not-happening-after-upgrade-from-5-7-to-8-0/29829/1 "2024-04-24T12:16:57Z")

</div>

I am having a table lets say test(a int, b varchar)  
when I running query select \* from test where a=‘101’ its giving me required output on both 5.7 and 8.0  
but when I am running same query in procedure its giving output only in 5.7 but not in 8.0, I am having so many procedure that having implicit type conversion, How can I configure 8.0 to keep this conversion same as 5.7

or am I doing something wrong

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [April 24, 2024, 5:24pm UTC](https://forums.percona.com/t/implicit-type-conversions-not-happening-after-upgrade-from-5-7-to-8-0/29829/2 "2024-04-24T17:24:06Z")

</div>

@erpramodprajapat,  
Implicit type conversion is rarely safe to use. I suggest you write the proper SQL using CAST(), as this will be more compliant to the SQL language and the behavior will be expected.

---

<div class="post-metadata">

**Author:** ![erpramodprajapat](https://avatars.discourse-cdn.com/v4/letter/e/c37758/32.png) [@erpramodprajapat](https://forums.percona.com/u/erpramodprajapat)\
**Post date:** [April 25, 2024, 4:37am UTC](https://forums.percona.com/t/implicit-type-conversions-not-happening-after-upgrade-from-5-7-to-8-0/29829/3 "2024-04-25T04:37:23Z")

</div>

Agree @matthewb , but why its different behavior with stored procedures , with there anything that I can configure to make this correct ?

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [April 25, 2024, 2:11pm UTC](https://forums.percona.com/t/implicit-type-conversions-not-happening-after-upgrade-from-5-7-to-8-0/29829/4 "2024-04-25T14:11:24Z")

</div>

Check the SQL\_MODE of the stored procedure by looking at mysql.proc table. When you create a stored procedure, the SQL\_MODE of the server at that time is preserved and restored each time the proc runs. You might have changed something here.
