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.
mysql-test/r/mysqldump.result:
Fix of result file (adding the echo's)
mysql-test/r/rpl_view.result:
Added end of 5.0 echo
mysql-test/t/rpl_view.test:
Added end of 5.0 echo
by master and slave is made.
mysql-test/r/rpl_view.result:
BUG#19419: VIEW: View that the column name is different
by master and slave is made.
Fixed result for the added test case.
mysql-test/t/rpl_view.test:
BUG#19419: VIEW: View that the column name is different
by master and slave is made.
Added test case.
sql/sql_parse.cc:
BUG#19419: VIEW: View that the column name is different
by master and slave is made.
Fixed: Add column_list to to the view creation statement
which is written to binlog.
can be not replicable.
Now CREATE statements for writing in the binlog are created as follows:
- the beginning of the statement is re-created;
- the rest of the statement is copied from the original query.
The problem appears when there is a version-specific comment (produced by
mysqldump), started in the re-created part of the statement and closed in the
copied part -- there is closing comment-parenthesis, but there is no opening
one.
The proper fix could be to re-create original statement, but we can not
implement it in 5.0. So, for 5.0 the fix is just to cut closing
comment-parenthesis. This technique is also used for SHOW CREATE PROCEDURE
statement (so we are able to reuse existing code).
mysql-test/r/rpl_sp.result:
Updated result file.
mysql-test/r/rpl_trigger.result:
Updated result file.
mysql-test/r/rpl_view.result:
Updated result file.
mysql-test/t/rpl_sp.test:
Added test case for BUG#20438.
mysql-test/t/rpl_trigger.test:
Added test case for BUG#20438.
mysql-test/t/rpl_view.test:
Added test case for BUG#20438.
sql/sp.cc:
Trim comments at the end.
sql/sp_head.cc:
Moved this code to the separate function to be re-used.
sql/sql_lex.cc:
Added a new function.
sql/sql_lex.h:
Added a new function.
sql/sql_trigger.cc:
Trim comments at the end.
sql/sql_view.cc:
Trim comments at the end.
view definer information syntax/storage/replication
fixed SOURCE field of .frm
mysql-test/r/func_in.result:
definer information added to CREATE VIEW
mysql-test/r/lowercase_view.result:
definer information added to CREATE VIEW
mysql-test/r/mysqldump.result:
definer information added to CREATE VIEW
mysql-test/r/rpl_view.result:
check log of queries
mysql-test/r/skip_grants.result:
--skip-grants do not allow use user information
mysql-test/r/sql_mode.result:
definer information added to CREATE VIEW
mysql-test/r/temp_table.result:
definer information added to CREATE VIEW
mysql-test/r/view.result:
definer information added to CREATE VIEW
test of storing/restoring definer information
mysql-test/r/view_grant.result:
test of grant check of definer information
definer information added to CREATE VIEW
mysql-test/t/rpl_view.test:
check log of queries
mysql-test/t/skip_grants.test:
--skip-grants do not allow use user information
mysql-test/t/view.test:
test of storing/restoring definer information
mysql-test/t/view_grant.test:
test of grant check of definer information
sql/mysql_priv.h:
CREATE/ALTER VIEW print support
set current user as definer procedure
sql/share/errmsg.txt:
new errors/warnings
sql/sql_acl.cc:
make find_acl_user public to allow to check user
sql/sql_acl.h:
make find_acl_user public to allow to check user
sql/sql_lex.h:
storing definer information
sql/sql_parse.cc:
send CREATE/ALTER VIEW for replication with full list of options
set current user as definer procedure
sql/sql_show.cc:
new CREATE VIEW options printed
sql/sql_view.cc:
check of definer clause
changes in .frm file
definer information storage support
now we store only original SELECT in SOURCE field of .frm
sql/sql_yacc.yy:
definer information sintax support
getting SOURCE field information for .frm
sql/table.h:
definer information storage