Commit graph

175224 commits

Author SHA1 Message Date
Vicențiu Ciorbaru
14690c70c1 Enable almost all aggregate functions for window functions 2016-09-09 18:33:29 +03:00
Vicențiu Ciorbaru
dfd3be928d Make cursor implementation uniform
Cursors now report their current row number as the boundary of the
partition. This is used by Frame_scan_cursor to compute aggregate
functions that do not support removal.
2016-09-09 18:33:29 +03:00
Vicențiu Ciorbaru
ffed20c563 Extend Frame_cursor to report the current row it is pointing at
Added an extra virtual method to the Frame_cursor class to allow cursors
to report the row number to which they are pointing.
2016-09-09 18:32:35 +03:00
Vicențiu Ciorbaru
e174b13465 Add a method to disable the automatic adding of values from cursors
Currently cursors automatically add values to the sum functions they
manage. There are use cases when we just want to figure out the frame
boundaries, without actually adding/removing values from them.
2016-09-09 18:32:35 +03:00
Vicențiu Ciorbaru
3ba867be89 Convert Partition_read_cursor to inherit from Table_read_cursor
The 'IS A' relation is more appropriate for Partition_read_cursor. This
also helps with accessing methods available only to Table_read_cursor.
2016-09-09 18:32:35 +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
Vicențiu Ciorbaru
23e8b508a0 MDEV-10059: Compute window functions with same sorting criteria simultaneously
Perform only one table scan for each window function present. We do this
by keeping keeping cursors for each window function frame bound and
running them for each function for every row.
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
Oleksandr Byelkin
2c52493d14 Fixed condition 2016-09-09 13:13:27 +02:00
Alexander Kuleshov
077da07c94 no need to set net->vio to zero in mysql_real_connect
because it is zero always in this place as we have check for this above
which checks that net->vio isn't 0 and exit.
2016-09-09 16:35:31 +06: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
Oleksandr Byelkin
1f2ff25eba Fixed embedded server. 2016-09-08 22:41:50 +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
effb65bc86 Adjusted test results. 2016-09-07 19:34:11 -07: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
Alexander Barkov
dd283db6bc MDEV-8909 union parser cleanup
This is the final patch removing some old remainders that are
not needed anymore.

(Other clean-ups were done in earlier commits)
2016-09-07 11:36:22 +04:00
Daniel Black
5e20c61fcc MDEV-10707 Tokudb tokudb_parts test suites failing (#229) 2016-09-07 01:13:17 +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
dc9b0924d1 More cleanup. 2016-09-06 11:20:50 -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
Igor Babaev
2f83cc6388 Removed redefinitions of some newly introduced constants. 2016-09-06 09:11:34 -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
Sergei Golubchik
362ad94bb0 cleanup: don't copy-paste, don't current_thd 2016-09-05 09:11:42 +02:00
Alexander Barkov
9e89e117f9 MDEV-10742 LDML: make conf_to_src reuse common data between collations 2016-09-05 10:03:10 +04: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