Commit graph

179826 commits

Author SHA1 Message Date
Marko Mäkelä
72817cafe2 Remove a type cast 2017-11-02 12:07:44 +02:00
Marko Mäkelä
a9faad5f78 Remove an unused variable 2017-11-02 12:07:44 +02:00
Daniel Black
1103abdae1 keycache: restructure functions that are controlled by arguements
finish_resize_simple_key_cache removed argument acquire for acquiring
locks.

resize_simple_key_cache enforces assertion that the cache is inited.

read_block was really two functions, primary and secondary so separated
as such. Make the callers of read_block explictly use the required function.

Signed-off-by: Daniel Black <daniel@linux.vnet.ibm.com>
2017-11-02 13:31:15 +04:00
Monty
0750b5f825 Fixed compilation failures
- Also added missing copyright notices
2017-11-02 11:06:02 +02:00
Sergei Golubchik
c4c48e9740 MDEV-11965 -Werror should not appear in released tarballs 2017-11-02 06:32:20 +00:00
Igor Babaev
914e2c9ba8 Merge branch '10.3' of github.com:MariaDB/server into 10.3 2017-11-01 21:48:03 -07:00
Igor Babaev
6f1b6061d8 Merge remote-tracking branch 'shagalla/10.3-mdev12172' into 10.3
As a result of this merge the code for the following tasks appears in 10.3:
- MDEV-12172 Implement tables specified by table value constructors
- MDEV-12176 Transform [NOT] IN predicate with long list of values INTO
             [NOT] IN subquery.
2017-11-01 21:42:26 -07:00
Varun Gupta
a607e4e7aa Added the syntax for percentile functions and median function to the sql_yacc_ora.yy file 2017-11-01 23:17:15 +05:30
Varun Gupta
ab5503c8c5 Updates the tests for the percentile functions 2017-11-01 23:17:15 +05:30
Varun Gupta
40887913ff Update the error messages involving percentile functions 2017-11-01 23:17:15 +05:30
Varun Gupta
0ef6127c29 Date-time fields are disabled currently for the result type of percentile function 2017-11-01 23:17:15 +05:30
Varun Gupta
58a6e43513 Tests added for percentile and median functions 2017-11-01 23:17:14 +05:30
Varun Gupta
b77105cab6 Only single element order-by list is allowed for percentile functions 2017-11-01 23:17:14 +05:30
Varun Gupta
4f4f8f3fb1 Added the median function to the parser , it should behave as a percentile_cont function with its argument fixed to 0.5 2017-11-01 23:17:14 +05:30
Varun Gupta
02a4a4b512 Added fix_fields for percentile function to check the type of argument and to ensure that only numeric arguments are allowed 2017-11-01 23:17:14 +05:30
Varun Gupta
b5c104d00a Changes made according to the review given, mostly fixing coding style errors 2017-11-01 23:16:59 +05:30
Vicențiu Ciorbaru
24e219b179 Remove has_error as a member from Item_sum and use THD::is_error() instead
Additionally, allow a query with window functions to be killed by the user during
its execution.
2017-11-01 23:13:02 +05:30
Varun Gupta
f4ba298abd Fixed indentation in the syntax rules for the sql_yacc.yy , also added the rules of the percentile functions to
the sql_yacc_ora.yy
2017-11-01 23:13:02 +05:30
Varun Gupta
f8e135c7df made changes according to the review, mostly removing unused code and fixing code to follow the coding conventions 2017-11-01 23:13:02 +05:30
Varun Gupta
f04426f727 Added more tests for the percentile functions 2017-11-01 23:13:01 +05:30
Varun Gupta
03ed22326a Added the error
1)ER_ARGUMENT_OUT_OF_RANGE: This error is thrown if the argument of the percentile function is not in the range [0,1]
  2)ER_ARGUMENT_NOT_CONSTANT: This error is thrown if the argument of the percnetile function is not constant in the
    entire partition of the window function
2017-11-01 23:13:01 +05:30
Varun Gupta
6511069e7f Added the error ER_WRONG_TYPE_FOR_PERCENTILE_CONT, which ensures that the result type for percentile_cont is always numerical 2017-11-01 23:13:01 +05:30
Varun Gupta
947ce922c9 Added the error ER_NOT_SINGLE_ELEMENT_ORDER_LIST for th percentile functions, these ensure that for the percentile
function we have the order list with exactly one element
2017-11-01 23:13:01 +05:30
Varun Gupta
96565ac311 Added the function setting_handler_for_percentile_function() for the percentile_disc function that would
set the type of the result field for percentile_disc. Percentile_cont would habe double precision result type
2017-11-01 23:13:01 +05:30
Varun Gupta
330577988f has_error field added to the item_sum class. This field ensures that query is terminated
if we get any error during the add function call. This is currently used only for the
percentile functions
2017-11-01 23:13:01 +05:30
Varun Gupta
64a2a30295 Error codes added for the percentile functions, the errors are
-ER_NOT_SINGLE_ELEMENT_ORDER_LIST
  -ER_WRONG_TYPE_FOR_PERCENTILE_CONT
  -ER_ARGUMENT_NOT_CONSTANT
  -ER_ARGUMENT_OUT_OF_RANGE
2017-11-01 23:13:01 +05:30
Varun Gupta
eb2187a24f Val_str function added for the percentile_disc function, as it can have result type as STRING_RESULT 2017-11-01 23:13:01 +05:30
Varun Gupta
3393005e95 Ensured that the the element in the order by clause should have a numerical time, if not throw an error 2017-11-01 23:13:01 +05:30
Varun Gupta
275ce39f05 Percentile class implemented, most of the functions have the same functionalite as the percentile cont class 2017-11-01 23:13:01 +05:30
Varun Gupta
01d2b6e9d9 Implemented the implementation of percentile functions using Item_cache instead of Cache_Item 2017-11-01 23:13:01 +05:30
Varun Gupta
d2214da4d0 Test case added for the percentile disc function 2017-11-01 23:13:01 +05:30
Varun Gupta
ba9fbc6a83 implementation of add() function added to the Item_sum_percentile_disc class 2017-11-01 23:13:01 +05:30
Varun Gupta
c85552f42b Added a class Frame_unbounded_following_set_count_special, which is required to ignore
all the null values while calculating the number of rows in the partition
2017-11-01 23:13:01 +05:30
Varun Gupta
31f1541f1e Setting handler to have the return type as that of the element by which we are ordering the partition 2017-11-01 23:13:01 +05:30
Varun Gupta
cc046fa92c A basic implementation of the add function is added 2017-11-01 23:13:01 +05:30
Varun Gupta
18747a4baa Added value field to Item_sum_percentile_disc
Check for single element in the order_list is added
2017-11-01 23:13:01 +05:30
Varun Gupta
129626f171 Added get_item() to Cached_item_item and get_value to the Cached_item 2017-11-01 23:13:01 +05:30
Varun Gupta
280945bf29 MDEV-12985: support percentile and median window functions
Finalised the synatax and have started implementing the class for the PERCENTILE_DISC
2017-11-01 23:13:01 +05:30
Varun Gupta
fadfe447e8 MDEV-12985: syntax added for the percentile_cont and percentile_disc functions 2017-11-01 23:13:01 +05:30
Vladislav Vaintroub
29c4bd9d27 SOURCE_REVISION should always be defined in source_revision.h
#cmakedefine in template file might not create a #define in configured
header file.
2017-11-01 13:20:32 +00:00
Marko Mäkelä
2ec7b87053 Merge 10.2 into bb-10.2-ext 2017-11-01 14:37:31 +02:00
Monty
6b7918d524 Fixed that --malloc-lib works properly
- Expand paths also for jemalloc
- Test also if tcmalloc or jemalloc is in /usr/lib64
- Take into account that .so has a version
- Remove automatic adding of flavors ( _minial, _debug). Better to
  have user specify these directly
- Changed documentation link to MariaDB
- Don't give extra error if mysqld_safe_helper doesn't exist
2017-11-01 12:21:46 +02:00
Marko Mäkelä
6692b5f74a Merge 10.1 into 10.2 2017-11-01 09:55:00 +02:00
Daniel Bartholomew
c3b641ee20 bump the VERSION 2017-10-31 19:56:44 -04:00
Olivier Bertrand
332d9f7b02 - Change inihandl from c to c++.
Because it now includes global.h that contains a bool function definition
  that make compile to fail on Linux.
  modified:   storage/connect/CMakeLists.txt
  removed:    storage/connect/inihandl.c
  added:      storage/connect/inihandl.cpp
2017-10-31 18:53:15 +01:00
Olivier Bertrand
646ecb8970 Change inihandl from c to cpp (to accept bool) 2017-10-31 17:51:25 +01:00
Sergey Vojtovich
613dd62a76 MDEV-11153 - Introduce status variables for table cache monitoring and tuning
Status variables added: Table_open_cache_hits, Table_open_cache_misses,
Table_open_cache_overflows, Table_open_cache_active_instances.
2017-10-31 19:13:20 +04:00
Olivier Bertrand
3db76c99cc - Fix MDEV-13925: Actually this fixes SELECT queries when
the WHERE clause have single quote.
  modified:   storage/connect/ha_connect.cc

- Use Windows VirtualAlloc and VirtualFree for the Sarea workspace
  modified:   storage/connect/global.h
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/plgdbutl.cpp
  modified:   storage/connect/plugutil.cpp
  modified:   storage/connect/user_connect.cc
2017-10-31 14:44:50 +01:00
Monty
bd20fb87ec Write error message ebfore aborting if not all memory is released
Also don't abort if global_status_var.global_memory_used != 0 on not
normal exit as then it's likely that not all memory is released.
2017-10-31 13:44:25 +02:00
Monty
157f2b2551 Updated help message for long_query_time 2017-10-31 13:42:57 +02:00