Bug #118404 Unknown column error occurs during INSERT due to trigger referencing a non-existent or misnamed column in the employee t

Submitted: 9 Jun 2025 18:02 Modified: 10 Jun 2025 12:35
Reporter: Amandi Shanuri Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:8.0.41 OS:Windows (Windows 11)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[9 Jun 2025 18:02] Amandi Shanuri
Description:
----[For better reports, please attach the log file after submitting. You can find it in C:\Users\Amandi Shanuri\AppData\Roaming\MySQL\Workbench\log\wb.log]

I’m experiencing a bug in MySQL Workbench where the query:

SELECT e.id, e.empcode, e.fname AS firstname FROM employee_management.employee e;

throws the error:
Error Code: 1054. Unknown column 'e.id' in 'field list'

even though the column id clearly exists in the table. I confirmed this using:
DESCRIBE employee_management.employee;

and it shows the column id is present.

I restarted Workbench

I selected the correct database with USE employee_management;

I even tried without aliasing

The same error persists inconsistently

How to repeat:

**How to repeat:**

1. Launch MySQL Workbench.
2. Create and use a schema named `employee_management`.
3. Create a table named `employee` with a column named `id` (INT), and other fields like `empcode`, `fname`, `lname`, etc.
4. Insert some test data (at least one row).
5. Run the following query:

```sql
SELECT e.id, e.empcode, e.fname AS firstname FROM employee_management.employee e;
```

6. Error occurs: `"Unknown column 'e.id' in 'field list'"`, even though the column `id` clearly exists in the table.

---

Let me know if you'd like help filling in the **“Suggested fix”** too.
[10 Jun 2025 12:35] MySQL Verification Team
Hello Amandi Shanuri,

Thank you for the bug report.
I tried to reproduce your issue on windows 11 with workbench 8.0.42 and followed exact steps but I am not seeing any issues at my end.
Please try with latest version.

Regards,
Ashwini Patil
[10 Jun 2025 12:37] MySQL Verification Team
8.0.42 test results

Attachment: 118404_test_results.png (image/png, text), 100.46 KiB.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.051 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.