79669443

Date: 2025-06-17 16:17:23
Score: 2.5
Natty:
Report link

I found the problem. MySQL newbie issue. :(

I had a session variable declared DECLARE log_id INT;
In the queries, that used log_id, MySQL is using the variable instead of the column from the table.
So the statement

SELECT value_id, log_id from testdata;

Returned the value_id from the table, but the variable log_id value. Renaming the declared variable solved the issue.

Consider this question answered! Thanks to everyone who provided input.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (1): :(
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Rick Scero