Scan error - Mysql query

Hello,

Get this error from mysql tables, where cols are empty.

{
“results”: {
“A”: {
“error”: “sql: Scan error on column index 3: unsupported Scan, storing driver.Value type into type *string”,
“refId”: “A”,
“meta”: {
“sql”: “show processlist;”
},
“series”: null,
“tables”: null
}
},
“message”: “sql: Scan error on column index 3: unsupported Scan, storing driver.Value type into type *string”
}

Also this query is returning error

{
“results”: {
“A”: {
“error”: “sql: Scan error on column index 5: unsupported Scan, storing driver.Value type into type *time.Time”,
“refId”: “A”,
“meta”: {
“sql”: “show events from udvikling;”
},
“series”: null,
“tables”: null
}
},
“message”: “sql: Scan error on column index 5: unsupported Scan, storing driver.Value type into type *time.Time”
}

What datatypes does your query return? Looks like the mysql driver is not prepared to handle them.

This is the output when i run it on the server.

The error comes, when it a select * and one of the fields is null (no value)

sql: Scan error on column index 7: unsupported Scan, storing driver.Value type into type *time.Time

This is because execute_at col is empty.

To get it to work, i have to do this fix on every col that possible would be empty

SELECT CASE WHEN execute_at IS NULL THEN “” ELSE execute_at END AS execute_at,event_name,event_schema,event_definition,event_type,interval_value,interval_field,status FROM information_schema.EVENTS;

Refers to this link : https://github.com/grafana/grafana/issues/9381