Fix for
Bug#35335 funcs_1: Some tests fail within load_file during
pushbuild runs
Solution: 1. Move files with input data used in load_file,
load data etc.
from suite/funcs_1/<whatever>
to std_data
2. Use for testsuite funcs_1 the server option
--secure-file-priv=<MYSQLTEST_VARDIR>
3. Outfiles have to be stored under MYSQLTEST_VARDIR
+ changes according to WL#4304 Cleanup in funcs_1 tests
- backport of fixes/improvements made in 5.1 to 5.0
The differences between scripts in 5.0 and 5.1 cause
much additional and annoying work during any upmerge.
- replace error numbers with names
- improved comments
- improved formatting
- Unify storage engine names so that result files for
storage engine variants do not differ (some tests)
- remove a script no more used (tests are done in other scripts)
BUILD/Makefile.am:
Test case adjustments
mysql-test/Makefile.am:
Test case adjustments
mysql-test/mysql-test-run.pl:
Test case adjustments
mysql-test/suite/funcs_1/README.txt:
Test case adjustments
mysql-test/suite/funcs_1/datadict/datadict_bug_12777.inc:
Test case adjustments
mysql-test/suite/funcs_1/datadict/datadict_load.inc:
Test case adjustments
mysql-test/suite/funcs_1/include/innodb_tb1.inc:
Test case adjustments
mysql-test/suite/funcs_1/include/innodb_tb2.inc:
Test case adjustments
mysql-test/suite/funcs_1/include/innodb_tb3.inc:
Test case adjustments
mysql-test/suite/funcs_1/include/innodb_tb4.inc:
Test case adjustments
mysql-test/suite/funcs_1/include/memory_tb1.inc:
Test case adjustments
mysql-test/suite/funcs_1/include/memory_tb2.inc:
Test case adjustments
mysql-test/suite/funcs_1/include/memory_tb3.inc:
Test case adjustments
mysql-test/suite/funcs_1/include/memory_tb4.inc:
Test case adjustments
mysql-test/suite/funcs_1/include/myisam_tb1.inc:
Test case adjustments
mysql-test/suite/funcs_1/include/myisam_tb2.inc:
Test case adjustments
mysql-test/suite/funcs_1/include/myisam_tb3.inc:
Test case adjustments
mysql-test/suite/funcs_1/include/myisam_tb4.inc:
Test case adjustments
mysql-test/suite/funcs_1/include/sp_tb.inc:
Test case adjustments
mysql-test/suite/funcs_1/r/innodb_func_view.result:
Test case adjustments
mysql-test/suite/funcs_1/r/innodb_storedproc_02.result:
Test case adjustments
mysql-test/suite/funcs_1/r/innodb_storedproc_03.result:
Test case adjustments
mysql-test/suite/funcs_1/r/innodb_storedproc_06.result:
Test case adjustments
mysql-test/suite/funcs_1/r/innodb_storedproc_07.result:
Test case adjustments
mysql-test/suite/funcs_1/r/innodb_storedproc_08.result:
Test case adjustments
mysql-test/suite/funcs_1/r/innodb_storedproc_10.result:
Test case adjustments
mysql-test/suite/funcs_1/r/innodb_trig_0102.result:
Test case adjustments
mysql-test/suite/funcs_1/r/innodb_trig_03.result:
Test case adjustments
mysql-test/suite/funcs_1/r/innodb_trig_0407.result:
Test case adjustments
mysql-test/suite/funcs_1/r/innodb_trig_08.result:
Test case adjustments
mysql-test/suite/funcs_1/r/innodb_trig_09.result:
Test case adjustments
mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result:
Test case adjustments
mysql-test/suite/funcs_1/r/innodb_trig_frkey.result:
Test case adjustments
mysql-test/suite/funcs_1/r/innodb_views.result:
Test case adjustments
mysql-test/suite/funcs_1/r/is_columns_innodb.result:
Test case adjustments
mysql-test/suite/funcs_1/r/is_columns_memory.result:
Test case adjustments
mysql-test/suite/funcs_1/r/is_columns_myisam.result:
Test case adjustments
mysql-test/suite/funcs_1/r/is_columns_ndb.result:
Test case adjustments
mysql-test/suite/funcs_1/r/is_tables_innodb.result:
Test case adjustments
mysql-test/suite/funcs_1/r/is_tables_memory.result:
Test case adjustments
mysql-test/suite/funcs_1/r/is_tables_myisam.result:
Test case adjustments
mysql-test/suite/funcs_1/r/is_tables_ndb.result:
Test case adjustments
mysql-test/suite/funcs_1/r/memory_func_view.result:
Test case adjustments
mysql-test/suite/funcs_1/r/memory_storedproc_02.result:
Test case adjustments
mysql-test/suite/funcs_1/r/memory_storedproc_03.result:
Test case adjustments
mysql-test/suite/funcs_1/r/memory_storedproc_06.result:
Test case adjustments
mysql-test/suite/funcs_1/r/memory_storedproc_07.result:
Test case adjustments
mysql-test/suite/funcs_1/r/memory_storedproc_08.result:
Test case adjustments
mysql-test/suite/funcs_1/r/memory_storedproc_10.result:
Test case adjustments
mysql-test/suite/funcs_1/r/memory_trig_0102.result:
Test case adjustments
mysql-test/suite/funcs_1/r/memory_trig_03.result:
Test case adjustments
mysql-test/suite/funcs_1/r/memory_trig_0407.result:
Test case adjustments
mysql-test/suite/funcs_1/r/memory_trig_08.result:
Test case adjustments
mysql-test/suite/funcs_1/r/memory_trig_09.result:
Test case adjustments
mysql-test/suite/funcs_1/r/memory_trig_1011ext.result:
Test case adjustments
mysql-test/suite/funcs_1/r/memory_views.result:
Test case adjustments
mysql-test/suite/funcs_1/r/myisam_func_view.result:
Test case adjustments
mysql-test/suite/funcs_1/r/myisam_storedproc_02.result:
Test case adjustments
mysql-test/suite/funcs_1/r/myisam_storedproc_03.result:
Test case adjustments
mysql-test/suite/funcs_1/r/myisam_storedproc_06.result:
Test case adjustments
mysql-test/suite/funcs_1/r/myisam_storedproc_07.result:
Test case adjustments
mysql-test/suite/funcs_1/r/myisam_storedproc_08.result:
Test case adjustments
mysql-test/suite/funcs_1/r/myisam_storedproc_10.result:
Test case adjustments
mysql-test/suite/funcs_1/r/myisam_trig_0102.result:
Test case adjustments
mysql-test/suite/funcs_1/r/myisam_trig_03.result:
Test case adjustments
mysql-test/suite/funcs_1/r/myisam_trig_0407.result:
Test case adjustments
mysql-test/suite/funcs_1/r/myisam_trig_08.result:
Test case adjustments
mysql-test/suite/funcs_1/r/myisam_trig_09.result:
Test case adjustments
mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result:
Test case adjustments
mysql-test/suite/funcs_1/r/myisam_views.result:
Test case adjustments
mysql-test/suite/funcs_1/storedproc/cleanup_sp_tb.inc:
Test case adjustments
mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc:
Test case adjustments
mysql-test/suite/funcs_1/storedproc/storedproc_02.inc:
Test case adjustments
mysql-test/suite/funcs_1/storedproc/storedproc_03.inc:
Test case adjustments
mysql-test/suite/funcs_1/storedproc/storedproc_06.inc:
Test case adjustments
mysql-test/suite/funcs_1/storedproc/storedproc_10.inc:
Test case adjustments
mysql-test/suite/funcs_1/t/innodb_trig_0407.test:
Test case adjustments
mysql-test/suite/funcs_1/t/is_basics_mixed.test:
Test case adjustments
mysql-test/suite/funcs_1/t/memory_storedproc_02.test:
Test case adjustments
mysql-test/suite/funcs_1/t/memory_storedproc_03.test:
Test case adjustments
mysql-test/suite/funcs_1/t/memory_storedproc_06.test:
Test case adjustments
mysql-test/suite/funcs_1/t/memory_storedproc_07.test:
Test case adjustments
mysql-test/suite/funcs_1/t/memory_storedproc_08.test:
Test case adjustments
mysql-test/suite/funcs_1/t/memory_storedproc_10.test:
Test case adjustments
mysql-test/suite/funcs_1/t/myisam_storedproc_02.test:
Test case adjustments
mysql-test/suite/funcs_1/t/myisam_storedproc_03.test:
Test case adjustments
mysql-test/suite/funcs_1/t/myisam_storedproc_06.test:
Test case adjustments
mysql-test/suite/funcs_1/t/myisam_storedproc_07.test:
Test case adjustments
mysql-test/suite/funcs_1/t/myisam_storedproc_08.test:
Test case adjustments
mysql-test/suite/funcs_1/t/myisam_storedproc_10.test:
Test case adjustments
mysql-test/suite/funcs_1/triggers/trig_frkey2.inc:
Test case adjustments
mysql-test/suite/funcs_1/triggers/triggers_0102.inc:
Test case adjustments
mysql-test/suite/funcs_1/triggers/triggers_03.inc:
Test case adjustments
mysql-test/suite/funcs_1/triggers/triggers_0407.inc:
Test case adjustments
mysql-test/suite/funcs_1/triggers/triggers_08.inc:
Test case adjustments
mysql-test/suite/funcs_1/triggers/triggers_09.inc:
Test case adjustments
mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc:
Test case adjustments
mysql-test/suite/funcs_1/views/func_view.inc:
Test case adjustments
mysql-test/suite/funcs_1/views/views_master.inc:
Test case adjustments
into host.loc:/home/uchum/work/5.1-bugteam
mysql-test/r/subselect.result:
Merge with 5.0-bugteam (bug#36139).
mysql-test/t/subselect.test:
Merge with 5.0-bugteam (bug#36139).
Post-commit minor cleanup of testcase (bug#36139).
mysql-test/r/subselect.result:
Post-commit minor cleanup of testcase (bug#36139).
mysql-test/t/subselect.test:
Post-commit minor cleanup of testcase (bug#36139).
into host.loc:/home/uchum/work/5.1-bugteam
mysql-test/r/ctype_gbk.result:
Auto merged
mysql-test/r/subselect3.result:
Auto merged
mysql-test/t/subselect3.test:
Auto merged
sql/sql_select.cc:
Auto merged
strings/ctype-big5.c:
Merge with 5.0-bugteam (bug#35993).
strings/ctype-gbk.c:
Merge with 5.0-bugteam (bug#35993).
The function test_if_skip_sort_order ignored any covering index used for ref
access of a table in a query with ORDER BY if this index was incompatible
with the ORDER BY list and there was another covering index compatible with
this list.
As a result sub-optimal execution plans were chosen for some queries with
ORDER BY clause.
mysql-test/r/distinct.result:
Adjusted results after the fix for bug#35844.
mysql-test/r/order_by.result:
Added a test case for bug#35844.
mysql-test/t/order_by.test:
Added a test case for bug#35844.
impossible WHERE/HAVING clause
(subselect_single_select_engine::exec).
Allocation and initialization of joined table list t1, t2... of
subqueries like:
NOT IN (SELECT ... FROM t1,t2,... WHERE 0)
is optimized out, however server tries to traverse this list.
mysql-test/r/subselect3.result:
Added test case for bug#36005.
mysql-test/t/subselect3.test:
Added test case for bug#36005.
sql/sql_select.cc:
Fixed bug#36005.
1. JOIN::prepare initializes JOIN::table counter (actually a size
of the JOIN::join_tab array) and sets it to a number of joined tables.
2. The make_join_statistics function (when called from JOIN::optimize)
allocates and fills the JOIN::join_tab array.
However, when optimizing subselect has impossible (definite false)
WHERE or HAVING clause, optimizer skips call to make_join_statistics
and leaves JOIN::join_tab == NULL.
3. subselect_single_select_engine::exec does traversal of the JOIN::join_tab
array and the server dies because array is not allocated but array
counter is greater than 0.
The JOIN::optimize method has been modified to reset the JOIN::table
counter to 0 in cause of impossible WHERE/HAVING clause.
Grouping or ordering of long values in not indexed BLOB/TEXT columns
with GBK or BIG5 charsets crashes the server.
MySQL server uses sorting (the filesort procedure) in the temporary
table to evaluate the GROUP BY clause in case of lack of suitable index.
That procedure takes into account only first @max_sort_length bytes
(system variable, usually 1024) of TEXT/BLOB sorting key string.
The my_strnxfrm_gbk and my_strnxfrm_big5 fill temporary keys
with data of whole blob length instead of @max_sort_length bytes
length. That buffer overrun has been fixed.
mysql-test/r/ctype_gbk.result:
Added test case for bug #35993.
mysql-test/t/ctype_gbk.test:
Added test case for bug #35993.
strings/ctype-big5.c:
Fixed bug #35993: memory corruption and crash with multibyte conversion.
Buffer overrun has been fixed in the my_strnxfrm_big5 function.
strings/ctype-gbk.c:
Fixed bug #35993: memory corruption and crash with multibyte conversion.
Buffer overrun has been fixed in the my_strnxfrm_gbk function.
- Make convert_zerofill_number_to_string() take into account that the
constant it is converting may evaluate to NULL.
mysql-test/r/subselect.result:
BUG#36139 "float, zerofill, crash with subquery"
- Testcase
mysql-test/t/subselect.test:
BUG#36139 "float, zerofill, crash with subquery"
- Testcase
into bodhi.(none):/opt/local/work/mysql-5.1-27430
mysql-test/r/grant.result:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/grant.test:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
storage/myisam/mi_create.c:
Auto merged
into bodhi.(none):/opt/local/work/mysql-5.1-27430
include/my_global.h:
Auto merged
mysql-test/r/grant.result:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/grant.test:
Auto merged
sql/item.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
storage/myisam/mi_create.c:
Auto merged
tests/mysql_client_test.c:
Auto merged
sql/share/errmsg.txt:
Manual merge.
mysql-test/r/ps_ddl.result:
Updated results
mysql-test/t/ps_ddl.test:
- add missing subtests
- add comments + minor reformatting for better overview on content
mysql-test/r/ps_ddl1.result:
Expected results
mysql-test/t/ps_ddl1.test:
Script for tests which do not really fit into ps_ddl
Post-merge fix: Add those files which are new in version 5.1
This is the 5.1 version of the fix for
Bug #34291 compile-amd64-debug-max-no-ndb missing
BUILD/Makefile.am:
Post-merge fix: Add those files which are new in version 5.1
Include several "BUILD/compile-*" files in a source tarball ("make dist" target)
which might be useful to community users who want to build from source.
When merging this up, the "BUILD/compile-*" file list needs to be checked.
BUILD/Makefile.am:
Fix for Bug #34291 compile-amd64-debug-max-no-ndb missing
Include several "BUILD/compile-*" files in a source tarball ("make dist" target)
which might be useful to community users who want to build from source.
sql/sql_table.cc:
Fix create.test in --ps-protocol broken by the previous push,
that added prepared statement validation of CREATE TABLE LIKE:
move assignment of src_table->required_type to the parser.
sql/sql_yacc.yy:
Fix create.test in --ps-protocol broken by the previous push,
that added prepared statement validation of CREATE TABLE LIKE:
move assignment of src_table->required_type to the parser.
Add metadata validation to ~20 more SQL commands. Make sure that
these commands actually work in ps-protocol, since until now they
were enabled, but not carefully tested.
Fixes the ml003 bug found by Matthias during internal testing of the
patch.
mysql-test/r/ps_ddl.result:
Update test results (WL#4165)
mysql-test/t/ps_ddl.test:
Cover with tests metadata validation of 26 SQL statements.
sql/mysql_priv.h:
Fix the name in the comment.
sql/sp_head.cc:
Changed the way the observer is removed in case of stored procedures
to support validation prepare stmt from "call p1(<expr>)": whereas
tables used in the expression must be validated, substatements
of p1 must not.
The previous scheme used to silence the observer only in stored
functions and triggers.
sql/sql_class.cc:
Now the observer is silenced in sp_head::execute(). Remove it from
Sub_statement_state.
sql/sql_class.h:
Now the observer is silenced in sp_head::execute(). Remove it from
Sub_statement_state.
sql/sql_parse.cc:
Add CF_REEXECUTION_FRAGILE to 20 more SQLCOMs that need it.
sql/sql_prepare.cc:
Add metadata validation to ~20 new SQLCOMs that need it.
Fix memory leaks with expressions used in SHOW DATABASES and CALL
(and prepared statements).
We need to fix all expressions at prepare, since if these expressions
use subqueries, there are one-time transformations of the parse
tree that must be done at prepare.
List of fixed commands includes: SHOW TABLES, SHOW DATABASES,
SHOW TRIGGERS, SHOW EVENTS, SHOW OPEN TABLES,SHOW KEYS, SHOW FIELDS,
SHOW COLLATIONS, SHOW CHARSETS, SHOW VARIABLES, SHOW TATUS, SHOW TABLE
STATUS, SHOW PROCEDURE STATUS, SHOW FUNCTION STATUS, CALL.
Add comment to set_parameters().
sql/table.h:
Update comments.