[MDEV-26070] Unknown column in 'field list' when using mysql -e "query..." from bash Created: 2021-07-01 Updated: 2021-07-02 Resolved: 2021-07-02 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | N/A |
| Affects Version/s: | 10.4.19 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Mike Evans | Assignee: | Daniel Black |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
linux, Fedora32 |
||
| Description |
|
From bash: However if I am in the interactive mysql shell the query succeeds. Table created with: CREATE TABLE `rainfall` ( |
| Comments |
| Comment by Daniel Black [ 2021-07-02 ] | |
|
delimiter is defining the separation of the queries like DELIMITER. So with delimiter = `,` the first query becomes SELECT DATE(datatime) as dat; which is why the error occurs. In a script you'd want something like:
| |
| Comment by Mike Evans [ 2021-07-02 ] | |
|
Thank you. I apologise for the noise. | |
| Comment by Daniel Black [ 2021-07-02 ] | |
|
All good. I've done my far share of invalid bugs too. Keep learning. |