datajoint-python icon indicating copy to clipboard operation
datajoint-python copied to clipboard

Error when the log table is missing and no `CREATE` privilege

Open dimitri-yatsenko opened this issue 5 years ago • 1 comments

When a schema is created from MATLAB, no ~log table is created (see #233). datajoint-python expects a ~log table. If the user has CREATE privilege, then it just creates it but without it, an error arises:

CREATE command denied to user 'TM_user'@'10.44.2.251' for table '~log'
Could not create the ~log table
Could not access table `TM`.`~log`

This can be fixed by ignoring this condition quietly.

dimitri-yatsenko avatar Jul 30 '19 15:07 dimitri-yatsenko

also would be nice to catch write exceptions or have some way to disable non-critical logging (see also: #737 r.e. log table growth )- the following came up in the course of trying to read-only query a read-only replica due to inserting basic log records:

pymysql.err.InternalError: (1290, 'The MySQL server is running with the --read-only option so it cannot execute this statement')

ixcat avatar Feb 29 '20 04:02 ixcat