Hi Davi,
thanks for working on this. The patch overall looks good.
There is only one thing I don't fully understand:
- you reset THD::sql_mode in db_find_routine(). Why do you need that?
If you do need that, what about the code for loading events?
Please ping me when you join IRC so that we can discuss this.
Also, could you please:
- change a test case in events_bugs.test in the way of a test case in
sp.test. I mean, set sql_mode to <all bits set value> and create an event
with such sql_mode.
- add a comment in events_bugs.test and sp.test explaining what you're
actually testing there (something like: the purpose of this test is to
ensure that when new SQL modes are introduced, they are also added to
mysql.proc and mysql.event tables).
- add a comment in events_bugs.test and sp.test explaining why do you need
replace() functions.
- change a comment for event_db_repository.cc -- it says "... store the
sql_mode field using the string representation", which is no more
relevant.
- add two comments to the CS-description telling that
- in this CS we're going to change event store semantics -- if an event
which is being created, can not be stored to mysql.event table, an error
will be raised. Please also point out that this is an incompatible
change.
- in this CS we're going to add test cases to ensure that new SQL modes
will be registered in mysql.proc and mysql.event tables.
--
Alexander Nozdrin, Software Developer
MySQL AB, Moscow, Russia, www.mysql.com