• guilhem@mysql.com's avatar
    Implementation of WL#1824 "Add replication of character set variables in 4.1", · 86e8ecc9
    guilhem@mysql.com authored
    by binlogging some SET ONE_SHOT CHARACTER_SETetc,
    which will be enough until we have it more compact and more complete in 5.0. With the present patch,
    replication will work ok between 4.1.3 master and slaves, as long as:
    - master and slave have the same GLOBAL.COLLATION_SERVER
    - COLLATION_DATABASE and CHARACTER_SET_DATABASE are not used
    - application does not use the fact that table is created with charset of the USEd db (BUG#2326).
    all of which are not too hard to fulfill. 
    ONE_SHOT is reserved for internal use of mysqlbinlog|mysql and works only for charsets,
    so we give error if used for non-charset vars.
    Fix for BUG#3875 "mysqlbinlog produces wrong ouput  if query uses
     variables containing quotes" and BUG#3943 "Queries with non-ASCII literals are not replicated
     properly after SET NAMES".
    Detecting that master and slave have different global charsets or server ids.
    86e8ecc9
sql_yacc.yy 145 KB