This bug is a side-effect of bug fix#16377. NOW() is optimized in
BETWEEN to integer constants to speed up query execution. When view is being
created it saves already modified query and thus becomes wrong.
The agg_cmp_type() function now substitutes constant result DATE/TIME functions
for their results only if the current query isn't CREATE VIEW or SHOW CREATE
VIEW.
mysql-test/t/view.test:
Added a test case for bug#15950: NOW() optimized away in VIEWs
mysql-test/r/view.result:
Added a test case for bug#15950: NOW() optimized away in VIEWs
sql/item_cmpfunc.cc:
Fixed bug#15950: NOW() optimized away in VIEWs
The agg_cmp_type() function now substitutes constant result DATE/TIME functions
for their results only if the current query isn't CREATE VIEW or SHOW CREATE
VIEW.
mysql-test/r/grant2.result:
Merge update: Change between versions, it appears.
mysql-test/r/heap_btree.result:
Merge update: Add deterministic ordering of data, as the order is different
between versions.
mysql-test/r/mysql_client.result:
Merge update: Help options changed between versions.
mysql-test/t/heap_btree.test:
Merge update: Add deterministic ordering of data, as the order is different
between versions.
BitKeeper/deleted/.del-bug20328.test~c76d766fe3e1eb5:
Delete: mysql-test/t/bug20328.test
BitKeeper/deleted/.del-bug20328.result~4fee68989442c2a3:
Delete: mysql-test/r/bug20328.result
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
client/mysql.cc:
Auto merged
client/mysqldump.c:
Auto merged
configure.in:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
client/mysqldump.c:
Remove double error printout, mysql_query_with_error_report will do that. And set the exit code for us.
mysql-test/r/mysqldump.result:
Update test result after merge
into neptunus.(none):/home/msvensson/mysql/mysql-5.0
client/mysql.cc:
Auto merged
configure.in:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
client/mysqldump.c:
Manual merge
mysql-test/r/mysqldump.result:
Manual merge
mysql-test/t/mysqldump.test:
Manual merge
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
client/mysql.cc:
Auto merged
client/mysqltest.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/union.result:
Auto merged
mysql-test/t/union.test:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/func_group.result:
Merge manually
mysql-test/t/func_group.test:
Merge manually
into rama.(none):/home/jimw/my/mysql-5.0-16502
client/mysql.cc:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/mysql.result:
Auto merged
mysql-test/r/type_ranges.result:
Auto merged
mysql-test/t/mysql.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
into bodhi.local:/opt/local/work/mysql-5.0-runtime-merge
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
mysql-test/r/sp.result:
Manual merge.
mysql-test/r/udf.result:
Manual merge.
mysql-test/t/sp.test:
Manual merge.
mysql-test/t/udf.test:
Manual merge.
set.
(Ramil's patch, recreated.)
heap/hp_delete.c:
Reset info->lastkey_len for further heap_rnext/heap_rprev calls.
mysql-test/r/heap_btree.result:
Test for bug #9719: DELETE with WHERE on HEAP table just deletes first
row of matched set.
mysql-test/t/heap_btree.test:
Test for bug #9719: DELETE with WHERE on HEAP table just deletes first
row of matched set.
into moonbone.local:/work/tmp_merge-5.0-opt-mysql
mysql-test/Makefile.am:
Auto merged
scripts/make_win_src_distribution.sh:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
client/mysqltest.c:
Manual merge
into moonbone.local:/work/tmp_merge-5.0-opt-mysql
client/mysql.cc:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/time.cc:
Auto merged
mysql-test/r/sp.result:
Manual merge
mysql-test/t/sp.test:
Manual merge
into moonbone.local:/work/tmp_merge-4.1-opt-mysql
sql/item_strfunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
into bodhi.local:/opt/local/work/mysql-5.0-runtime-merge
include/mysql.h:
Auto merged
include/sql_common.h:
Auto merged
libmysql/libmysql.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/mysqldump.result:
Auto merged
mysql-test/t/udf.test:
Auto merged
ndb/src/mgmsrv/ConfigInfo.cpp:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/slave.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql-common/client.c:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
mysql-test/r/ps.result:
Manual merge.
mysql-test/r/sp.result:
Manual merge.
mysql-test/t/ps.test:
Manual merge.
mysql-test/t/sp.test:
Manual merge.
sql/sql_prepare.cc:
Manual merge.
sql/table.cc:
Manual merge.
tests/mysql_client_test.c:
Manual merge.
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
configure.in:
Auto merged
client/mysql.cc:
Auto merged
client/mysqldump.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/federated.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/mysql.result:
Auto merged
mysql-test/r/type_ranges.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/mysql.test:
Auto merged
sql/field.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
- make the client to respect the server-side
no_backslash_escapes option and disable the
special meaning of backslash also at client side.
mysql-test/r/mysql_client.result:
Bug #20103: Escaping with backslash does not work
- test case
mysql-test/t/mysql_client.test:
Bug #20103: Escaping with backslash does not work
- test case
The problem was that the grammar allows to create a function with an optional
definer clause, and define it as a UDF with the SONAME keyword.
Such combination should be reported as an error.
The solution is to not change the grammar itself, and to introduce a
specific check in the yacc actions in 'create_function_tail' for UDF,
that now reports ER_WRONG_USAGE when using both DEFINER and SONAME.
mysql-test/r/udf.result:
Added tests for Bug#21269 (DEFINER-clause is allowed for UDF-functions)
mysql-test/t/udf.test:
Added tests for Bug#21269 (DEFINER-clause is allowed for UDF-functions)
sql/sql_yacc.yy:
Creating a UDF function with a DEFINER clause is now a syntax error.
into rakia.(none):/home/kgeorge/mysql/autopush/B11551-5.0-opt
mysql-test/r/view.result:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/sql_view.cc:
Auto merged
made DROP VIEW to continue on error and report an aggregated error
at its end. This makes it similar to DROP TABLE.
mysql-test/r/view.result:
Bug #11551: Asymmetric + undocumented behaviour of DROP VIEW and DROP TABLE
- test case
- changed error message
mysql-test/t/view.test:
Bug #11551: Asymmetric + undocumented behaviour of DROP VIEW and DROP TABLE
- test case
sql/sql_view.cc:
Bug #11551: Asymmetric + undocumented behaviour of DROP VIEW and DROP TABLE
- made DROP VIEW to continue on error and report an aggregated error
When executing ALTER TABLE all the attributes of the view were overwritten.
This is contrary to the user's expectations.
So some of the view attributes are preserved now : namely security and
algorithm. This means that if they are not specified in ALTER VIEW
their values are preserved from CREATE VIEW instead of being defaulted.
mysql-test/r/view.result:
Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
- test suite
mysql-test/t/view.test:
Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
- test suite
sql/sql_lex.h:
Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
- must make create_view_suid a tristate : on/off/unspecified
sql/sql_view.cc:
Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
- open the view to get it's attributes and put then as defaults
for ALTER VIEW
sql/sql_yacc.yy:
Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
- must make create_view_suid a tristate : on/off/unspecified
sql/table.h:
Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
- must make create_view_suid a tristate : on/off/unspecified