Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insufficient table checking on startup #18

Open
AGSPhoenix opened this issue Jan 16, 2019 · 1 comment
Open

Insufficient table checking on startup #18

AGSPhoenix opened this issue Jan 16, 2019 · 1 comment

Comments

@AGSPhoenix
Copy link
Collaborator

Simply checking for the presence of the board name table is insufficient. The triggers for handling media and such can sometimes not be created if binlogging is on and log_bin_trust_function_creators isn't on.

Check for the full set of tables and triggers on startup.

@AGSPhoenix
Copy link
Collaborator Author

2019-06-11 02:58:46,640 ERROR:Traceback (most recent call last):
  File "C:\Program Files\Python3\lib\site-packages\eventlet\hubs\hub.py", line 458, in fire_timers
    timer()
  File "C:\Program Files\Python3\lib\site-packages\eventlet\hubs\timer.py", line 58, in __call__
    cb(*args, **kw)
  File "C:\Program Files\Python3\lib\site-packages\eventlet\event.py", line 168, in _do_send
    waiter.switch(result)
  File "C:\Program Files\Python3\lib\site-packages\eventlet\greenthread.py", line 218, in main
    result = function(*args, **kwargs)
  File "C:\Users\Bakugo\Desktop\eve-master\eve.py", line 244, in inserter
    post['no'], #post number
  File "C:\Program Files\Python3\lib\site-packages\eventlet\tpool.py", line 186, in doit
    result = proxy_call(self._autowrap, f, *args, **kwargs)
  File "C:\Program Files\Python3\lib\site-packages\eventlet\tpool.py", line 144, in proxy_call
    rv = execute(f, *args, **kwargs)
  File "C:\Program Files\Python3\lib\site-packages\eventlet\tpool.py", line 125, in execute
    six.reraise(c, e, tb)
  File "C:\Program Files\Python3\lib\site-packages\eventlet\support\six.py", line 689, in reraise
    raise value
  File "C:\Program Files\Python3\lib\site-packages\eventlet\tpool.py", line 83, in tworker
    rv = meth(*args, **kwargs)
  File "C:\Program Files\Python3\lib\site-packages\MySQLdb\cursors.py", line 255, in execute
    self.errorhandler(self, exc, value)
  File "C:\Program Files\Python3\lib\site-packages\MySQLdb\connections.py", line 50, in defaulterrorhandler
    raise errorvalue
  File "C:\Program Files\Python3\lib\site-packages\MySQLdb\cursors.py", line 252, in execute
    res = self._query(query)
  File "C:\Program Files\Python3\lib\site-packages\MySQLdb\cursors.py", line 378, in _query
    db.query(q)
  File "C:\Program Files\Python3\lib\site-packages\MySQLdb\connections.py", line 280, in query
    _mysql.connection.query(self, query)
_mysql_exceptions.OperationalError: (1267, "Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation '='")

Bakugo: also something of note: if an error happens when inserting, the inserter dies forever. might not be desirable
Bakugo: basically, since the database was utf8mb4_unicode_ci, the procedures were being created with utf8mb4_unicode_ci
Bakugo: but the tables were forced to utf8mb4_general_ci
phoen1x: What I really need is a thing that checks that the server, database, tables, and connection, are all using the same charset and collation
And possibly other things
Bakugo: yeah that's important

Bakugo: I think you may need to specify the charset+collate for each parameter of the procedure
https://mariadb.com/kb/en/library/create-procedure/#character-sets-and-collations
the examples here show it

I don't even really know what set of charsets and collations will cause problems. Is it reasonable to just set everything to utf8mb4?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant