Commit graph

66475 commits

Author SHA1 Message Date
Vicențiu Ciorbaru
872c0b4225 Allow first/last value functions to have frame definitions
Add a test case to check this behavior.
2016-09-24 15:12:34 +02:00
Vicențiu Ciorbaru
74fa10645e Update features result to account for window functions counter 2016-09-24 15:12:34 +02:00
Vicențiu Ciorbaru
15b8a772cc Add results for first_value and last_value test case 2016-09-24 15:12:34 +02:00
Vicențiu Ciorbaru
e413c6e9e7 Add test case for STD function used as window function
The test case also checks correct functionality of Frame_scan_cursor, as
currently STD does not implement the remove() call.
2016-09-24 15:12:34 +02:00
Vicențiu Ciorbaru
2e7a585ddd Add test case for new window functions status var 2016-09-24 15:12:34 +02:00
Vicențiu Ciorbaru
5cb568786a MDEV-10669: Crash in SELECT with window function used
Make sure to call split_sum_func on all items that contain window
functions, so that all the column references are set up correctly.
2016-09-24 15:12:34 +02:00
Vicențiu Ciorbaru
2857ff3c98 MDEV-10815: Window Function Expressions Wrong Results
Fix window function expressions such as win_func() <operator> expr.
The problem was found in 2 places.
First, when we have complex expressions containing window functions, we
can only compute their final value _after_ we have computed the window
function's values. These values must be stored within the temporary
table that we are using, before sending them off.
This is done by performing an extra copy_funcs call before the final
end_send() call.

Second, such expressions need to have their inner arguments,
changed such that the references within those arguments point to fields within
the temporary table.
Ex: sum(t.a) over (order by t.b) + sum(t.a) over (order by t.b)
Before this fix, t.a pointed to the original table's a field. In order
to compute the sum function's value correctly, it needs to point to the
copy of this field inside the temp table.
This is done by calling split_sum_func for each argument in the
expression in turn.

The win.test results have also been updated as they contained wrong
values for such a use case.
2016-09-24 15:12:34 +02:00
Vicențiu Ciorbaru
1c72441364 Frame bounds using FOLLOWING or PRECEDING can have 0 as cardinal value
This makes them behave exactly like CURRENT ROW. Standard specifies
unsigned integer, which includes the value 0.

Expand the win_min_max test to include this kind of frame definitions.
2016-09-24 15:09:39 +02:00
Sergei Petrunia
a95e384d54 MDEV-10174: Make the fix for MDEV-8989 enabled by default in 10.2
- Change the default @@optimizer_switch value
- Adjust the testcases
2016-09-24 15:27:56 +03:00
Igor Babaev
457f3b9941 Added the test case for bug mdev-9941 that was fixed some time ago. 2016-09-23 14:42:12 -07:00
Igor Babaev
4872ec6177 Fixed bug mdev-10874.
In some cases the method Window_funcs_sort::setup() did
not build the sequence of sorting keys correctly.
2016-09-23 14:23:17 -07:00
Alexander Barkov
0f8a1a314d MDEV-10877 xxx_unicode_nopad_ci collations 2016-09-23 14:19:07 +04:00
Daniel Black
f05dfbebcc Merge 10.2
Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2016-09-23 09:24:22 +10:00
Daniel Black
8103f6f223 MDEV-10829: Enable Innodb NUMA interleave
Code was already existing within the innobase/xtradb storage engines
however without this cmake code it was never enabled.

num.cmake heavily based off work by Annamalai Gurusami <annamalai.gurusami@oracle.com>

Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2016-09-23 08:33:38 +10:00
Vladislav Vaintroub
f7a7c0c2fe MDEV-10297 Add priorization to threadpool
Also MDEV-10385 Threadpool refactoring
2016-09-22 17:01:28 +00:00
Sergei Golubchik
f32a511558 Merge branch '10.2' into bb-10.2-connector-c-integ-subm 2016-09-22 17:50:37 +02:00
Igor Babaev
48b4e33596 Allowed to use WITH clauses before SELECT in CREATE ... SELECT
and INSERT ... SELECT.
Added test cases.
2016-09-22 01:45:05 -07:00
Sergei Golubchik
d876f4bd5e disable session_track_schema for perfschema.socket_summary_by_instance_func
because it counts number of bytes sent and expects it to be independent
from the database name length
2016-09-21 13:20:24 +02:00
Sergei Golubchik
59d51f0c12 Merge branch '10.2' into bb-10.2-connector-c-integ-subm 2016-09-21 12:54:56 +02:00
Sergei Golubchik
e4f70789d5 fix sporadic innodb.auto_increment_dup failures
fix a race condition in the test
2016-09-21 10:03:16 +02:00
Sergei Golubchik
398d33ce9d fix main.index_intersect_innodb failure on trusty-amd64 2016-09-21 10:03:16 +02:00
Igor Babaev
10aa3936a7 Fixed bug mdev-10842.
In some cases the function compare_order_elements() erroneously
returned CMP_EQ for not equal elements.
2016-09-20 19:56:05 -07:00
Annamalai Gurusami
26e3117ca9 MDEV-10829: Port Innodb NUMA interleave test cases from MySQL 2016-09-20 09:51:22 +10:00
Sergei Golubchik
f9bdc7c01a Merge branch '10.2' into bb-10.2-jan 2016-09-19 09:47:08 +02:00
Sergei Golubchik
f566a4f83c maria.encrypt-wrong-key - cleanup properly 2016-09-17 21:55:51 +02:00
Sergey Vojtovich
85358ddf88 MDEV-10296 - Multi-instance table cache
Updated mysqld--help,win.rdiff.
2016-09-17 11:01:27 +04:00
Sergei Golubchik
f7be8cf285 update test results 2016-09-16 17:51:48 +02:00
Sergey Vojtovich
a2b1c58c19 MDEV-10296 - Multi-instance table cache
Fixed sysvars_server_[not]embedded failure: changed type of
table_open_cache_instances from ulong to uint.

Added casts foratomic operations around tc_active_instances and
tc_contention_warning_reported: needed on some platforms.
2016-09-16 18:41:21 +04:00
Sergey Vojtovich
8613633f26 MDEV-10296 - Multi-instance table cache
Table cache instances autosizing.
2016-09-16 15:46:15 +04:00
Sergey Vojtovich
7e9ac7b8ac MDEV-10296 - Multi-instance table cache
Improve scalability by implementing multi-instance table cache.
2016-09-16 15:46:15 +04:00
Sergei Golubchik
4572dca4bd increase I_S.FILES.FILE_NANE column length
because InnoDB 5.7 tdecided to store a full path there
2016-09-16 09:54:31 +02:00
Sergei Golubchik
15b174a3cb debug-only test, use have_debug.inc 2016-09-16 09:54:31 +02:00
Sergei Golubchik
c8b3244703 fix some quoting in error messages
add_identifier change comes from 5.7, everything else is a follow-up
2016-09-16 09:54:30 +02:00
Monty
6c1c27ea11 Don't increment 'Empty_queries' for queries with errors. 2016-09-15 22:02:32 +03:00
Monty
7ca60dd842 Test case for fix assertion/hang in read_init_file() 2016-09-15 21:56:01 +03:00
Sergei Golubchik
b1384143e2 fix many rpl test failures
* wait_until_connected_again.inc should expect ER_CONNECTION_KILLED now
* also fix MySQL BUG#36228
2016-09-15 15:31:28 +02:00
Sergei Golubchik
ea3262dc71 Fix innodb_fts suite
* update (some) tests from 5.7
* update results (e.g. cardinality is no longer reported)
* uncomment MYSQL_PLUGIN_FULLTEXT_PARSER/MYSQL_FTS_PARSER code
* initialize m_prebuilt->m_fts_limit manually,
   as we do not use ft_init_ext_with_hints()
2016-09-14 15:10:47 +02:00
Jan Lindström
62ed88017c Fix test failure on tc_partition_list_directory because
innodb-strict-mode by default is now ON, disabling it for
this test because test uses INDEX DICECTORY that is not
really supported by InnoDB.
2016-09-14 13:53:32 +03:00
Jan Lindström
a729656006 MDEV-10548: Some of the debug sync waits do not work with InnoDB 5.7 (branch bb-10.2-jan)
Fixed auto_increment_dup test. Current behavior is correct for repeatable read (and
serializable) isolation levels. Old behavior is correct for read committed
isolation level.
2016-09-14 11:28:40 +03:00
Igor Babaev
c22d307afa Fixed bug mdev-10785.
The condition pushed into WHERE/HAVING of a materialized
view/derived table may differ for different executions of
the same prepared statement. That's why the should be
ANDed with the existing WHERE/HAVING conditions only after all
permanent transformations of these conditions has been
performed.
2016-09-14 01:06:45 -07:00
Jan Lindström
da168b3405 MDEV-10200: IS tables are not found on 10.2 InnoDB 5.7 (branch bb-10.2-jan)
information_schema.innodb_changed_pages IS table available only on
xtradb, add possible error for now.
2016-09-14 08:27:22 +03:00
Igor Babaev
61d46e0423 Merge branch '10.2' of github.com:MariaDB/server into 10.2 2016-09-13 12:10:53 -07:00
Igor Babaev
08ba474174 Fixed bug mdev-10783.
Do not push conditions into materialized views/derived tables
marked with the flag 'fill_me'.
2016-09-13 11:58:35 -07:00
Vladislav Vaintroub
bc526a5574 avoid warnings about mtr.test_suppressions not being closed before the
crash
2016-09-13 17:21:24 +00:00
Alexander Barkov
a0db19bed9 MDEV-10779 Failing assertion lex->proc_list.elements == 0 or syntax error on PROCEDURE ANALYSE in UNION
Reverting a part of the patch for "MDEV-8909union parser cleanup",
as a parenthesized SELECT with PROCEDURE followed by UNION is not
disallowed by the grammar (only a non-parenthesized SELECT with PROCEDURE
followed by a UNION is disallowed grammatically).
2016-09-13 20:28:58 +04:00
Jan Lindström
6ee37fa9b4 Fix test failure. 2016-09-13 08:55:10 +03:00
Sergei Golubchik
10e1ff83ec better identify C/C unit tests in mysql-test 2016-09-12 17:51:50 +02:00
Sergei Golubchik
365f199d2f fix the plugin suite to pass 2016-09-12 17:51:48 +02:00
Elena Stepanova
025c4ec191 Fix sysvars_server_notembedded rdiff for 32-bit 2016-09-12 14:29:01 +03:00
Igor Babaev
3630a00e25 Fixed bug mdev-10782.
This bug in the code of Item_ref::build_clone could
cause corruption of items in where conditions.
Also made sure that equality predicates extracted
from multiple equality items to be pushed into
materialized views were cloned.
2016-09-12 00:07:02 -07:00
Sergei Golubchik
dc900cc846 Remove a bunch of TODO's, fix perfschema.threads_innodb test 2016-09-11 10:57:05 +02:00
Sergei Golubchik
d019af402c misc after-merge changes:
* remove new InnoDB-specific ER_ and HA_ERR_ codes
* renamed few old ER_ and HA_ERR_ error messages to be less MyISAM-specific
* remove duplicate enum definitions (durability_properties, icp_result)
* move new mysql-test include files to their owner suite
* rename xtradb.rdiff files to *-disabled
* remove mistakenly committed helper perl module
* remove long obsolete handler::ha_statistic_increment() method
* restore the standard C xid_t structure to not have setters and getters
* remove xid_t::reset that was cleaning too much
* move MySQL-5.7 ER_ codes where they belong
* fir innodb to include service_wsrep.h not internal wsrep headers
* update tests and results
2016-09-10 16:04:44 +02:00
Igor Babaev
1168e2fa54 Merge branch '10.2' of github.com:MariaDB/server into 10.2 2016-09-09 13:25:45 -07:00
Igor Babaev
5c7d829346 Another attempt to fix bug mdev-10736. 2016-09-09 13:25:02 -07:00
Vicențiu Ciorbaru
be2b833c42 It is now possible to remove values multiple times from window functions
This can happen with degenerate frame definitions that are always empty.
2016-09-09 18:53:01 +03:00
Vicențiu Ciorbaru
a37f24b903 Add min/max test cases for window functions 2016-09-09 18:33:29 +03:00
Vicențiu Ciorbaru
1adc3fab23 MDEV-10097: Assertion `count > 0' failed in Item_sum_sum::add_helper(bool)
When specifying a RANGE type frame that exceeds the partition size, both
for the top and bottom cursors we end up removing more rows than added
to the aggregate function. This happens because our TOP range cursor,
which removes values from the aggregate function, would be allowed to breach
partition boundaries, while the BOTTOM range cursor would not.

To prevent this from happening, force the TOP range cursor to only move
within the current partition, as does the BOTTOM range cursor.
2016-09-09 18:32:35 +03:00
Oleksandr Byelkin
19d24f011c MDEV-10763: Wrong result - server does not return NULL values from default list partition after ALTER table
Fixed partition pruning for NULL value.
2016-09-09 15:58:01 +02:00
Jan Lindström
d8cbad069a More test case fixes. 2016-09-09 16:45:05 +03:00
Oleksandr Byelkin
b22ed66c6b MDEV-10765: Wrong result - query does not retrieve values from default partition on a table partitioned by list columns
Partial matches should be treat as not exact one.
2016-09-09 13:50:17 +02:00
Kristian Nielsen
ec47beaba6 Merge parallel replication async deadlock kill into 10.2.
Conflicts:
	sql/mysqld.cc
	sql/slave.cc
2016-09-09 12:15:53 +02:00
Jan Lindström
d3708f789d Fix bunch of test failures and solaris build missing include. 2016-09-09 10:01:18 +03:00
Sergei Golubchik
06b7fce9f2 Merge branch '10.1' into 10.2 2016-09-09 08:33:08 +02:00
Sergei Golubchik
11ae60d2c5 MDEV-10551 Test innodb.defrag_mdl-9155 hangs on InnoDB 5.7
restore a table_flag lost in a merge
2016-09-08 18:09:47 +02:00
Kristian Nielsen
7e0c9de864 Parallel replication async deadlock kill
When a deadlock kill is detected inside the storage engine, the kill
is not done immediately, to avoid calling back into the storage engine
kill_query method with various lock subsystem mutexes held. Instead the
kill is queued and done later by a slave background thread.

This patch in preparation for fixing TokuDB optimistic parallel
replication, as well as for removing locking hacks in InnoDB/XtraDB in
10.2.

Signed-off-by: Kristian Nielsen <knielsen at knielsen-hq.org>
2016-09-08 15:25:40 +02:00
Jan Lindström
fec844aca8 Merge InnoDB 5.7 from mysql-5.7.14.
Contains also:
       MDEV-10549 mysqld: sql/handler.cc:2692: int handler::ha_index_first(uchar*): Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2' failed. (branch bb-10.2-jan)
       Unlike MySQL, InnoDB still uses THR_LOCK in MariaDB

       MDEV-10548 Some of the debug sync waits do not work with InnoDB 5.7 (branch bb-10.2-jan)
       enable tests that were fixed in MDEV-10549

       MDEV-10548 Some of the debug sync waits do not work with InnoDB 5.7 (branch bb-10.2-jan)
       fix main.innodb_mysql_sync - re-enable online alter for partitioned innodb tables
2016-09-08 15:49:03 +03:00
Igor Babaev
a2b8bdfbb9 Merge branch '10.2' into bb-10.2-mdev9864 2016-09-07 15:49:56 -07:00
Igor Babaev
82626d7879 Adjusted test results. 2016-09-07 08:51:18 -07:00
Oleksandr Byelkin
4ec088f2e7 MDEV-8348: Add catchall to all table partitioning for list partitions
DEFAULT partition support added to LIST and LIST COLUMN partitioning.
Partitions Prunning added for DEFAULT partititon.
2016-09-07 17:26:36 +02:00
Sergei Petrunia
95b8dcbd43 MDEV-10729: Server crashes in st_select_lex::set_explain_type
Make the new (CTE-related) code in set_explain_type to take into
account that some JOIN_TABs are non-merged semi-joins, and do not
have a TABLE object.
2016-09-07 17:14:30 +03:00
Alexander Barkov
a032fd5c1c MDEV-10758 engines/funcs.db_alter_collate_ascii and engines/funcs.db_alter_collate_utf8 fail with wrong results 2016-09-07 16:43:45 +04:00
Sergei Petrunia
e305054f31 MDEV-10058: Suspicious EXPLAIN output for a derived table + WITH + joined tabl
Add a testcase
2016-09-07 12:22:41 +03:00
Sergei Petrunia
4c39f75c73 MDEV-10057: Crash with EXPLAIN + WITH + constant query
Add the testcase
2016-09-07 11:35:06 +03:00
Sergei Petrunia
06ba09d604 Merge branch '10.2' of github.com:MariaDB/server into 10.2 2016-09-07 11:17:41 +03:00
Igor Babaev
5684f9d2d1 Merge branch '10.2' into bb-10.2-mdev9864 2016-09-06 14:43:05 -07:00
Igor Babaev
d6f87e68f1 For some unclear reasons the test case for bug mdev-10736
does not work in non-debug modes.
2016-09-06 14:36:59 -07:00
Igor Babaev
2c6d620019 Merge branch '10.2' into bb-10.2-mdev9864 2016-09-06 10:57:14 -07:00
Igor Babaev
2d36e5aa38 Fixed bug mdev-10736 that caused crashes.
The bug manifested itself for recursive definitions that
used anchors over tables with blobs.
2016-09-06 10:05:36 -07:00
Sergei Golubchik
8494039757 fix the test to work
without preceding sys_vars.wsrep_provider_basic
2016-09-06 16:34:25 +02:00
Alexey Botchkov
225440047d MDEV-10421 duplicate CHECK CONSTRAINTs.
mysql_prepare_create_table fixed so it doesn't let duplicating
        constraint names. Syntax for CONSTRAINT IF NOT EXISTS added
        and handled in mysql_alter_table.
2016-09-06 14:42:33 +04:00
Alexander Barkov
00dfe27f7c Recording information_schema.result (forgotten in the patch for MDEV-9711) 2016-09-06 14:42:54 +04:00
Alexander Barkov
ee19806b8e MDEV-9711 NO PAD collations
Based on the patch from Daniil Medvedev (a Google Summer of Code task)
2016-09-06 12:50:02 +04:00
Alexander Barkov
e4f6fd5e12 MDEV-10743 LDML: a new syntax to reuse sort order from another 8bit simple collation 2016-09-06 12:37:11 +04:00
Igor Babaev
8ae65920fa Fixed bug mdev-10737.
This bug in st_select_lex_node::move_node could result
in invalid select lists in recursive units that could
cause falling into infinite loops when iterating over
selects in such units.
2016-09-05 23:07:31 -07:00
Igor Babaev
9fc2358684 Merge branch '10.2' into bb-10.2-mdev9864 2016-09-05 22:13:01 -07:00
Igor Babaev
de02bfd373 The code that pushed conditions into derived did not
take into account that the list of equal items in
an Item_equal object may contain items with type() == REF_ITEM.
2016-09-05 22:10:50 -07:00
Sergei Golubchik
61fd38a1de update plugin maturities 2016-09-05 17:11:14 +02:00
Elena Stepanova
aaedb63ee0 MDEV-10741 sys_vars.sysvars_server_embedded 32-bit fails in buildbot
The rdiff file needed to be adjusted after changes made in scope of MDEV-9864
2016-09-05 16:01:44 +03:00
Igor Babaev
7faff4de82 Merge branch '10.2' into 10.2-mdev9197 2016-09-04 20:42:07 -07:00
Igor Babaev
3b40f78ede Fixed a flaw in the implementation of condition push-down
for materialized views and derived tables: there were no
push-down if the view was defined as union of selects
without aggregation. Added test cases with such unions.

Adjusted result files after the merge of the code for mdev-9197.
2016-09-04 20:11:58 -07:00
Oleksandr Byelkin
1da21cd4a5 MDEV-10035: DBUG_ASSERT on CREATE VIEW v1 AS SELECT * FROM t1 FOR UPDATE
Ability to print lock type added.
Restoring correct lock type for CREATE VIEW added.
2016-09-04 14:15:21 +02:00
Alexander Barkov
3dcca1b724 A fix for 1ca595fbf7 (LDML refactoring)
Modifying innodb_ctype_ldml.test related files to take into account
the previous commit changes.
2016-09-03 14:25:04 +04:00
Alexander Barkov
1ca595fbf7 LDML refactoring for "MDEV-9711 NO PAD collations"
- Moving detection of the MY_CS_CSSORT, MY_CS_PUREASCII, MY_CS_NONASCII
  flags of loadable collations from add_collation() in mysys.c
  to my_cset_init_8bit() and my_coll_init_simple() in ctype-simple.c.

- Adding tests that these flags are set properly for loadable collations

- Moving LDML test related *.xml files from mysql-test/std_data/
  to mysql-test/std_data/ldml/, as there will be more *.xml test files
2016-09-03 09:05:56 +04:00
Nirbhay Choubey
747893a854 MDEV-10545: Update perfschema.nesting result 2016-09-02 14:40:09 -04:00
Oleksandr Byelkin
a6fb6473cf MDEV-10419: crash in mariadb 10.1.16-MariaDB-1~trusty
Fixed initialization and usage of THD reference in subselect engines.
2016-09-02 16:20:38 +03:00
Jan Lindström
2e814d4702 Merge InnoDB 5.7 from mysql-5.7.9.
Contains also

MDEV-10547: Test multi_update_innodb fails with InnoDB 5.7

	The failure happened because 5.7 has changed the signature of
	the bool handler::primary_key_is_clustered() const
	virtual function ("const" was added). InnoDB was using the old
	signature which caused the function not to be used.

MDEV-10550: Parallel replication lock waits/deadlock handling does not work with InnoDB 5.7

	Fixed mutexing problem on lock_trx_handle_wait. Note that
	rpl_parallel and rpl_optimistic_parallel tests still
	fail.

MDEV-10156 : Group commit tests fail on 10.2 InnoDB (branch bb-10.2-jan)
  Reason: incorrect merge

MDEV-10550: Parallel replication can't sync with master in InnoDB 5.7 (branch bb-10.2-jan)
  Reason: incorrect merge
2016-09-02 13:22:28 +03:00
Igor Babaev
4de75afb45 Fixed the previous merge to be able to build mysqld.
Adjusted one result file.
2016-09-01 23:37:27 -07:00
Igor Babaev
17622bc088 Merge branch '10.2' into 10.2-mdev9197 2016-09-01 15:07:10 -07:00
Monty
b6e436278f Split rpl_parallel into two tests to make it easier
to know what goes wrong.
rpl_parallel_conflicts now contains the tests that
can cause row conflicts in replication.
2016-09-01 21:11:47 +03:00
Sergei Petrunia
e19ca69191 Update test results, mysql-test/r/mysqld--help,win.rdiff 2016-09-01 19:52:04 +03:00
Igor Babaev
3fb4f9bb93 Merge branch '10.2-mdev9197-cons' of github.com:shagalla/server
into branch 10.2-mdev9197.
2016-08-31 16:16:54 -07:00
Igor Babaev
670760d504 Adjusted test results after the previous merge. 2016-08-31 10:51:31 -07:00
Igor Babaev
080f16a877 Merge branch '10.2' of github.com:MariaDB/server into bb-10.2-mdev9864 2016-08-31 10:49:36 -07:00
Sergei Petrunia
d8ad96eac0 Update sys_vars.sysvars_server_embedded after recent pushes 2016-08-31 20:50:19 +03:00
Igor Babaev
f11e892b57 Merge branch '10.2' of github.com:MariaDB/server into bb-10.2-mdev9864 2016-08-31 10:34:21 -07:00
Sergei Petrunia
1eb58ff3b8 Update mysql-test/r/mysqld--help,win.rdiff
Recent commits has added new variables and changed the default
for server-id, which caused the patch in rdiff to no longer apply.
2016-08-31 20:33:28 +03:00
Oleksandr Byelkin
a322651b8a MDEV-10017: Get unexpected Empty Set for correlated subquery with aggregate functions
take into account all arguments of aggregate function
2016-08-31 19:12:35 +02:00
Oleksandr Byelkin
6dfa1d374e MDEV-8931: (server part of) session state tracking
Postreview fixes.
New MySQL tests fixes.
2016-08-31 17:17:46 +02:00
Oleksandr Byelkin
0ee3e64c55 MDEV-8931: (server part of) session state tracking
Transaction tracker
2016-08-31 17:17:46 +02:00
Oleksandr Byelkin
c8948b0d0d MDEV-8931: (server part of) session state tracking
System variables tracking
2016-08-31 17:17:46 +02:00
Oleksandr Byelkin
e7608a78ef MDEV-8931: (server part of) session state tracking
initial commit to test
2016-08-31 17:17:46 +02:00
Igor Babaev
2250e9ea26 Merge 10.2 into 10.2-mdev9864. 2016-08-30 16:14:51 -07:00
Igor Babaev
cb1e44219b Adjusted test results. 2016-08-30 11:13:25 -07:00
Igor Babaev
501fc1a9e2 Returned the test case that was removed by mistake. 2016-08-29 22:58:01 -07:00
Igor Babaev
9ac235ab7d mdev-9864: cleanup, re-factoring.
Added comments.
Added reaction for exceeding maximum number of elements in with clause.
Added a test case to check this reaction.
Added a test case where the specification of a recursive table
uses two non-recursive with tables.
2016-08-29 22:45:17 -07:00
Monty
bbfb5d7c74 Fixed failures for privilege_table_io and wsrep_cluster_address_basic
- Sometimes privilege_table_io printed double rows of roles_mapping
  - Fixed by forcing restart of server when running test
- Wsrep_cluster_address_basic failed in some combinations because
  wsrep_cluster_address was set to NULL
  - Fixed by ensuring it's never set to NULL, only empty string
2016-08-29 20:33:25 +03:00
Monty
1c91569274 Set server_id to 1 by default and disallow to set it to 0
This makes it easier to setup master as on only have to set --log-bin.
Before this patch if one did set up the master with just --log-bin, slaves
could not connect until server_id was set on the master, which could be
both confusing and hard to do.
2016-08-29 20:28:06 +03:00
Oleksandr Byelkin
a02642b66e MDEV-10017: Get unexpected Empty Set for correlated subquery with aggregate functions (part 1)
Make aggregate function dependency visible.
2016-08-29 16:17:46 +02:00
Monty
e139d971ec Fixed compiler warning and failing test suite because system dependency 2016-08-29 13:11:34 +03:00
Elena Stepanova
7d115e73b8 MDEV-10604 Create a list of unstable MTR tests to be disabled in distribution builds
List of unstable tests for 10.1
2016-08-27 19:50:42 +03:00
Sergei Golubchik
eac7e57529 Feature_check_constraint status variable 2016-08-27 16:59:13 +02:00
Sergei Golubchik
12d2c4fcd0 optimize constant default expressions
to be calculated at the CREATE TABLE time and stored in
the default row image.
2016-08-27 16:59:12 +02:00
Sergei Golubchik
4070d55735 fix: CHECK and DEFAULT after CREATE ... SELECT
expression defaults and check constraints should behave as
constant default values - copied from fields, not copied from expressions
2016-08-27 16:59:12 +02:00
Sergei Golubchik
6e5048e85f clarify the error message for frm size overflow 2016-08-27 16:59:12 +02:00
Sergei Golubchik
266563ad77 fix: CREATE TABLE (col TIMESTAMP(6) DEFAULT NOW(2))
That is, when the precision of DEFAULT NOW() is less than
the precision of the column, do not convert it to unireg_check,
use the new approach where DEFAULT is tryly an expression.
2016-08-27 16:59:12 +02:00
Sergei Golubchik
73a220aac3 session-state dependent functions in DEFAULT/CHECK/vcols
* revert part of the db7edfe that moved calculations from
  fix_fields to val_str for Item_func_sysconst and descendants
* mark session state dependent functions in check_vcol_func_processor()
* re-run fix_fields for all such functions for every statement
* fix CURRENT_USER/CURRENT_ROLE not to use Name_resolution_context
  (that is allocated on the stack in unpack_vcol_info_from_frm())

Note that NOW(), CURDATE(), etc use lazy initialization and do *not*
force fix_fields to be re-run. The rule is:
* lazy initialization is *not* allowed, if it changes metadata (so,
   e.g. DAYNAME() cannot use it)
* lazy initialization is *preferrable* if it has side effects (e.g.
  NOW() sets thd->time_zone_used=1, so it's better to do it when
  the value of NOW is actually needed, not when NOW is simply prepared)
2016-08-27 16:59:12 +02:00
Sergei Golubchik
2013a7fc29 fix: CURRENT_ROLE() inside SECURITY DEFINER views 2016-08-27 16:59:11 +02:00
Sergei Golubchik
6820bf9ca9 do not quote numbers in the DEFAULT clause in SHOW CREATE 2016-08-27 16:59:11 +02:00
Sergei Golubchik
a66092f2eb Merge branch 'bb-10.1-serg' into 10.1 2016-08-26 10:12:47 +02:00
Nirbhay Choubey
3575618237 Post merge fixes. 2016-08-25 21:28:26 -04:00
Nirbhay Choubey
90266e8a0e Merge branch '10.0-galera' into bb-10.1-serg 2016-08-25 15:39:39 -04:00
Vladislav Vaintroub
56c4cfe0be MDEV-9293 - Use MariaDB's Connector/C in server 2016-08-25 16:27:57 +02:00
Sergei Golubchik
dfa3046db4 fix a test for windows 2016-08-25 15:11:21 +02:00
Sergei Golubchik
6b1863b830 Merge branch '10.0' into 10.1 2016-08-25 12:40:09 +02:00
Nirbhay Choubey
c309e99ff9 Merge branch '10.0' into 10.0-galera 2016-08-24 19:30:32 -04:00
Nirbhay Choubey
8b09db8bfb Fixes/improvements in galera test suite 2016-08-24 17:13:20 -04:00
Nirbhay Choubey
1b7c5dedf7 MDEV-10566: Create role statement replicated inconsistently in Galera Cluster
In galera cluster, the definer (and thus binlog invoker) must be set
for CREATE ROLE before Query_log_event is created during TOI on the
originating node.
2016-08-24 15:32:48 -04:00
Sergei Golubchik
ea91bb6801 MDEV-10361 Crash in pam_securid.so with auth_pam connecting from SQLyog
auth_pam: debug output
2016-08-24 20:41:26 +02:00
Elena Stepanova
5bbe929d70 MDEV-10604 Create a list of unstable MTR tests to be disabled in distribution builds
- mysql-test/unstable-tests list is created, it includes
  = tests identified as unstable by Debian;
  = tests which failed in buildbot on 10.0 over the last ~6 months and were not fixed;
  = tests which have been recently modified or newly added
- '*' wildcard is now supported in skip lists
2016-08-24 17:39:57 +03:00
Nirbhay Choubey
2024cddaa4 MDEV-10518: Large wsrep_gtid_domain_id may break IST
wsrep_gtid_domain_id was incorrectly being parsed and stored
as a signed long number on the joiner node.
2016-08-22 21:27:20 -04:00
Galina Shalygina
eb2c147475 The consolidated patch for mdev-9197. 2016-08-23 00:39:12 +03:00
Monty
b51109693e MDEV-10630 rpl.rpl_mdev6020 fails in buildbot with timeout
The issue was that when running with valgrind the wait for master_pos_Wait()
was not long enough.

This patch also fixes two other failures that could affect rpl_mdev6020:
- check_if_conflicting_replication_locks() didn't properly check domains
- 'did_mark_start_commit' was after signals to other threads was sent which could
  get the variable read too early.
2016-08-22 10:16:00 +03:00
Nirbhay Choubey
3f481e52e4 Fixes for failing tests (post-merge). 2016-08-21 20:09:05 -04:00
Philip Stoev
f01a16b541 Galera MTR Tests: fortify galera_bf_abort_flush_for_export against sporadic failures. 2016-08-21 16:20:07 -04:00
Philip Stoev
30c6ac3cd1 Galera MTR Tests: Attempt to fortify galera_kill_ddl.test against sporadic failures 2016-08-21 16:20:07 -04:00
Philip Stoev
0656453135 Galera MTR Tests: increase timeouts and adjust some sporadically-failing tests so that the Galera suites can be run with --parallel=4 2016-08-21 16:17:18 -04:00
Philip Stoev
85b9718b22 Galera MTR Tests: Test case for galera#414 - crash on shutdown with gcs.max_packet_size=2 2016-08-21 16:17:18 -04:00
Daniele Sciascia
dfa9012abb MW-285 MTR test case for broken foreign key constraints 2016-08-21 16:17:16 -04:00
Daniele Sciascia
88a1592b0a MW-286 Avoid spurious deadlock errors when wsrep_on is disabled
If a conflict happens under wsrep_on, the THD's wsrep_conflict_state
is typically set to MUST_ABORT and cleared later, when transaction is
aborted. However, when wsrep_on is disabled, no check is performed to
see whether wsrep_conflict_state is set. So this potentially creates
spurious deadlock errors on the subsequent statement that runs with
wsrep_on enabled.
To avoid this problem wsrep_thd_set_conflict_state() sets the conflict
state only if wsrep_on is enabled.
2016-08-21 16:17:15 -04:00
Philip Stoev
a12fa57d35 Galera MTR Tests: Run galera_pc_weight on freshly started servers in order to prevent interaction with other tests 2016-08-21 16:17:15 -04:00
Philip Stoev
0e83726edb Galera MTR Tests: force galera_3nodes.galera_pc_bootstrap.test to run on a fresh cluster in order to avoid interaction with galera_3nodes.galera_innobackupex_backup.test 2016-08-21 16:17:14 -04:00
Philip Stoev
5609020c71 Galera MTR Tests: fortify galera_parallel_simple.test against sporadic failures 2016-08-21 16:17:14 -04:00
Philip Stoev
1cb01fe7d2 Galera MTR Tests: Fortify galera_restart_nochanges.test against sporadic failures due to node not being ready immediately after restart 2016-08-21 16:17:13 -04:00
Daniele Sciascia
92162e6d87 MW-175 Fix definitively lost memory in wsrep_get_params 2016-08-21 16:17:13 -04:00
Philip Stoev
137af55ca1 Galera MTR Tests: stability fixes 2016-08-21 16:17:12 -04:00
Philip Stoev
db837fde87 Galera MTR Tests: Adjust tests for xtrabackup 2.4.2 2016-08-21 16:17:12 -04:00
Nirbhay Choubey
81174c9ab1 Fix galera/MW-44 test post-merge. 2016-08-21 16:17:11 -04:00
Philip Stoev
182787f39e Galera MTR Tests: Adjust galera_log_output_csv.test to account for the fix for MW-44 2016-08-21 16:17:11 -04:00
Philip Stoev
675bcf3b6d Galera MTR Tests: A test for MW-44 - Disable general log for applier threads 2016-08-21 16:17:11 -04:00
Nirbhay Choubey
3f22e743c5 Fix galera/GAL-382 test post-merge. 2016-08-21 16:17:10 -04:00
Philip Stoev
9b42f09902 Galera MTR Tests: Add test for GAL-382, codership/galera#382 - InnoDB: Failing assertion: xid_seqno > trx_sys_cur_xid_seqno in trx0sys.cc line 356 2016-08-21 16:17:09 -04:00
Philip Stoev
fce9217c21 Galera MTR Test: Fix for MW-258.test - do not use SHOW PROCESSLIST 2016-08-21 16:17:09 -04:00
Philip Stoev
dda114461e Galera MTR Tests: Fixed tests to account for GAL-391 , GAL-374 2016-08-21 16:17:08 -04:00
Alexey Yurchenko
d45b58263d MW-259 - moved wsrep desync/resync calls from wsrep_desync_update() to wsrep_desync_check() method which does not hold the lock and is arguably a more fitting place to change provider state - before changing the actual variable value. 2016-08-21 16:17:08 -04:00
Nirbhay Choubey
4582a4bccf Fix galera_ist_recv_bind.test. 2016-08-21 16:17:07 -04:00
Alexey Yurchenko
90d92d2b49 MW-258 - RSU DDL should not rely on the global wsrep_desync variable value and should always try to desync on its own. 2016-08-21 16:17:07 -04:00
Philip Stoev
a00f4b29b5 Refs codership/galera#105 An MTR test for ist.recv_bind 2016-08-21 16:17:06 -04:00
Nirbhay Choubey
b758e9238a Fix galera_transaction_replay.test. 2016-08-21 16:17:06 -04:00
sjaakola
4e4ad17163 Refs MW-255
- popping PS reprepare observer before BF aborted PS replaying begins
  dangling observer will cause failure in open_table() ater on
- test case for this anomaly
2016-08-21 16:17:05 -04:00
Nirbhay Choubey
8b998a48cc Update galera version-dependent tests. 2016-08-21 16:17:04 -04:00
Nirbhay Choubey
65cf1d354a Refs: MW-252 Test fix post-merge 2016-08-21 16:17:04 -04:00
Philip Stoev
fe6ebb657e Refs: MW-252 MTR tests for FTWRL and desync 2016-08-21 16:17:03 -04:00
sjaakola
ae0fec9c36 refs: MW-248
- removed the off topic mtr test
2016-08-21 16:17:00 -04:00
sjaakola
5edf55be63 Refs: MW-248
- fixed the test case and extended with autoinc modification is master side
2016-08-21 16:16:59 -04:00
sjaakola
df96eb5d04 Refs: MW-248
- test cases from PXC for reproducing the issue
- initial fix
2016-08-21 16:16:59 -04:00
Monty
5932fa7890 Fixed "Packets out of order" warning message on stdout in clients,
compiled for debugging, when the server goes down

This happens in the following scenario:
- Server gets a shutdown message
- Servers sends error ER_CONNECTION_KILLED to the clients connection
- The client sends a query to the server, before the server has time to
  close the connection to the client
- Client reads the ER_CONNECTION_KILLED error message

In the above case, the packet number for the reply is one less than
what the client expected and the client prints "Packets out of order".

Fixed the following way:
- The client accepts now error packages with a packet number
  one less than expected.
- To ensure that this issue can be detected early in my_real_read(), error
  messages sent to the client are not compressed, even when compressed protocol is used.
2016-08-21 20:38:47 +03:00
Monty
6f31dd093a Added new status variables to make it easier to debug certain problems:
- Handler_read_retry
- Update_scan
- Delete_scan
2016-08-21 20:18:39 +03:00
Monty
8d5a0d650b Cleanups and minor fixes
- Fixed typos
- Added --core-on-failure to mysql-test-run
- More DBUG_PRINT in viosocket.c
- Don't forget CLIENT_REMEMBER_OPTIONS for compressed slave protocol
- Removed not used stage variables
2016-08-21 20:14:13 +03:00
Vladislav Vaintroub
31a8cf54c8 Revert "MDEV-9293 Connector/C integration"
This reverts commit 7b89b9f510.
2016-08-19 15:46:27 +00:00
Vladislav Vaintroub
7b89b9f510 MDEV-9293 Connector/C integration 2016-08-19 15:27:37 +00:00
Sergei Golubchik
47a1087ff6 Merge branch 'bb-10.0-serg' into 10.0 2016-08-14 09:16:07 +02:00
Jan Lindström
9b23f8054d MDEV-10535: ALTER TABLE causes standalone/wsrep cluster crash
When checking is any of the renamed columns part of the
columns for new indexes we accessed NULL pointer if checked
column used on index was added on same statement. Additionally,
we tried to check too many indexes, added_index_count
is enough here.
2016-08-13 09:27:50 +03:00
Jan Lindström
b3df257cfd MDEV-10469: innodb.innodb-alter-tempfile fails in buildbot: InnoDB: Warning: database page corruption or a failed
Test case intentionally crashes the server and that could lead partially
written pages that are then restored from doublewrite buffer.
2016-08-13 09:27:50 +03:00
Igor Babaev
f33c35240d Adjusted test result. 2016-08-11 14:39:26 -07:00
Igor Babaev
2f9555c40f Removed the parameter from st_select_lex_unit::exec_recursive.
Moved checking whether the limit set for the number of iterations
when executing a recursive query has been reached from
st_select_lex_unit::exec_recursive to TABLE_LIST::fill_recursive.
Changed the name of the system variable max_recursion_level for
max_recursive_iterations.
Adjusted test cases.
2016-08-10 15:51:40 -07:00
Sergei Golubchik
191f7b0fc1 after merge fixes 2016-08-10 21:15:51 +02:00
Sergei Golubchik
309c08c17c Merge branch '5.5' into 10.0 2016-08-10 19:19:05 +02:00
Sergei Golubchik
0098d789c9 MDEV-10465 general_log_file can be abused
Windows!
2016-08-09 13:25:40 +02:00
Nirbhay Choubey
69052ed022 MDEV-10320: NO-OP ALTER TABLE on temporary tables getting
.. logged under row binlog format

In the early stages of ALTER TABLE execution, the implementation
checks whether its a NOOP (alter_info->flags == 0), and if so,
it returns after logging the command to binary log. The logging,
however, was done unconditionally.

Fixed by skipping the logging for temporary tables when under row
based replication.
2016-08-08 17:29:22 -04:00
Nirbhay Choubey
df9b4554b7 MDEV-10216: Assertion `strcmp(share->unique_file_name,filename) ||
.. share->last_version' failed in myisam/mi_open.c:67: test_if_reopen

During the RENAME operation since the renamed temporary table is also
opened and added to myisam_open_list/maria_open_list, resetting the
last_version at the end of operation (HA_EXTRA_PREPARE_FOR_RENAME)
will cause an assertion failure when a subsequent query tries to open
an additional temporary table instance and thus attempts to reuse it
from the open table list.

This commit fixes the issue by skipping flush/close operations executed
toward the end of ALTER for temporary tables. It also enables a shortcut
for simple ALTERs (like rename, disable/enable keys) on temporary
tables.

As safety checks, added some assertions at code points that should not
be hit for temporary tables.
2016-08-08 17:26:06 -04:00
Sergei Petrunia
a2f245e49f MDEV-10372: EXPLAIN fixes for recursive CTEs, including FORMAT=JSON
- Tabular EXPLAIN now prints "RECURSIVE UNION".
- There is a basic implementation of EXPLAIN FORMAT=JSON.
- it produces "recursive_union" JSON struct
- No other details or ANALYZE support, yet.
2016-08-08 23:02:52 +03:00
Sergei Golubchik
a3f642415a MDEV-6128:[PATCH] mysqlcheck wrongly escapes '.' in table names
a correct fix:
* store properly quoted table names in tables4repair/etc lists
* tell handle_request_for_tables whether the name is aalready properly quoted
* test cases for all uses of fix_table_name()
2016-08-08 21:27:30 +02:00
Sergei Golubchik
2a54a530a9 MDEV-10465 general_log_file can be abused
followup
2016-08-08 21:27:30 +02:00
Alexander Barkov
5269d378df MDEV-10468 Assertion `nr >= 0.0' failed in Item_sum_std::val_real() 2016-08-08 18:37:02 +04:00
Alexander Barkov
1b3430a5ae MDEV-10500 CASE/IF Statement returns multiple values and shifts further result values to the next column
We assume all around the code that null_value==true is in sync
with NULL value returned by val_str()/val_decimal().
Item_sum_sum::val_decimal() erroneously returned a non-NULL value together
with null_value set to true. Fixing to return NULL instead.
2016-08-08 16:04:40 +04:00
Sergei Golubchik
5e23b6344f MDEV-10506 Protocol::end_statement(): Assertion `0' failed upon ALTER TABLE
thd->clear_error() destroyed already existing error status
2016-08-07 11:02:42 +02:00
Igor Babaev
e1c92a6ca9 Fixed a problem with unreferenced CTE:
explain for the query containing WITH clause
with an unreferenced CTE caused a crash.
Added a test covered this case.

Also added a test for usage CTE in different parts of union.
2016-08-05 14:12:01 -07:00
Daniel Black
e7e313f46f test case for CRC32() SQL function 2016-08-05 10:34:26 +04:00
Sergei Petrunia
93d5cdf03f MDEV-9946: main.xtradb_mrr fails sporadically
Make the testcase stable by adding FORCE INDEX
2016-08-04 13:14:45 +03:00
Oleksandr Byelkin
86975e0492 MDEV-7901: re-implement analyze table for low impact
Table before collecting engine independent statistics now is reopened in read mode,
InnoDB allow write operations in this case.
2016-08-03 21:37:19 +02:00