• unknown's avatar
    Fixed bug #28244. · d22c3399
    unknown authored
    When the same VIEW was created at the master side twice,
    malformed (truncated after the word 'AS') query string 
    was forwarded to client side, so error messages on the
    master and client was different, and replication was
    broken.
    
    The mysql_register_view function call failed
    too early: fields of `view' output argument of this 
    function was not filled yet with correct data required
    for query replication.
    The mysql_register_view function also copied pointers to 
    local buffers into a memory allocated by the caller.
    
    
    sql/sql_view.cc:
      Fixed bug #28244.
      Checking of existence of VIEW .frm file has been
      moved down to the place, when `view' argument is
      completely filled with proper data.
      view->query.str and view->query.md5 pointers has been
      set to the NULL before return from the mysql_register_view
      function.
    mysql-test/t/rpl_view.test:
      Updated test case for bug #28244.
    mysql-test/r/rpl_view.result:
      Updated test case for bug #28244.
    d22c3399
rpl_view.test 3.04 KB