Commit graph

90319 commits

Author SHA1 Message Date
Sergei Petrunia
1e3f09f163 MDEV-7264: Assertion `0' failed in subselect_engine::get_identifier()
Switch EXPLAIN JSON from using subselect_engine::get_identifier()
to the number from Item_subselect::unit.

Remove subselect_union_engine::get_identifier() because it was added
only for EXPLAIN JSON code.
2014-12-06 04:02:30 +03:00
Sergei Petrunia
5ee1c25fa8 EXPLAIN FORMAT=JSON: Full scan on NULL key (join case) 2014-12-06 03:11:03 +03:00
Sergei Petrunia
a80a797686 EXPLAIN FORMAT=JSON: Support "range checked for each record" 2014-12-06 02:23:37 +03:00
Sergei Petrunia
9cac7649ea EXPLAIN FORMAT=JSON: Support range+MRR plans (when MRR is used but BKA is not) 2014-12-06 01:11:22 +03:00
Sergey Vojtovich
8fb2c80fdb Fixed valgrind warnings in delete_dynamic().
Join_plan_state performs out-of-API initialization of DYNAMIC_ARRAY. This is
done to postpone actual array initialization till first use, whilst retaining
the right to call delete_dynamic().

Since delete_dynamic() now checks DYNAMIC_ARRAY::malloc_flags it should be
initialized it as well.
2014-12-05 16:38:48 +04:00
Monty
78564373fe my_alloc.c
- Changed 0x%lx -> %p
array.c:
- Static (preallocated) buffer can now be anywhere
my_sys.h
- Define MY_INIT_BUFFER_USED
sql_delete.cc & sql_lex.cc
- Use memroot when allocating classes (avoids call to current_thd)
sql_explain.h:
- Use preallocated buffers
sql_explain.cc:
- Use preallocated buffers and memroot
sql_select.cc:
- Use multi_alloc_root() instead of many alloc_root()
- Update calls to Explain
2014-12-05 11:01:51 +04:00
Sergey Vojtovich
3392278c86 MDEV-7004 - Merge scalability fixes from 10.0-power
Preallocate dynamic array and bitmap on mem_root to avoid expensive malloc.
This reduces number of allocations from 39 to 31 per OLTP RO transaction.
2014-12-05 11:01:51 +04:00
Sergey Vojtovich
eaa8c154e8 MDEV-7004 - Merge scalability fixes from 10.0-power
Preallocate dynamic array on THD mem_root to avoid expensive malloc.
2014-12-05 11:01:50 +04:00
Monty
070a6e7a89 - Changed default values of query_prealloc_size and query_alloc_block_size
so that a simple query with one join would not have to call my_malloc.
- Allow lower limites for query_prealloc_size for testing.
- Fixed wrong initialization of trans_alloc_block_size
2014-12-05 11:01:50 +04:00
Sergey Vojtovich
9127784d5c Cherry pick dynamic array changes from commit:
commit 85fd3d901311688e18ffce92ffc78129e5625791
Author: Monty <monty@mariadb.org>
Date:   Fri Aug 29 14:07:43 2014 +0300

    my_alloc.c
    - Changed 0x%lx -> %p
    array.c:
    - Static (preallocated) buffer can now be anywhere
    my_sys.h
    - Define MY_INIT_BUFFER_USED
    sql_delete.cc & sql_lex.cc
    - Use memroot when allocating classes (avoids call to current_thd)
    sql_explain.h:
    - Use preallocated buffers
    sql_explain.cc:
    - Use preallocated buffers and memroot
    sql_select.cc:
    - Use multi_alloc_root() instead of many alloc_root()
    - Update calls to Explain
2014-12-05 11:01:50 +04:00
Sergey Vojtovich
974808772b MDEV-7004 - Merge scalability fixes from 10.0-power
All callers of open_cached_file() use 2 characters prefix. Allocating memory for
such short string is an overkill. Store it on IO_CACHE structure instead.

All callers of open_cached_file() use mysql_tmpdir as dir. No need to allocate
memory for it since it is constant and available till server shutdown.

This reduces number of allocations from 31 to 27 per OLTP RO transaction.
2014-12-05 11:01:50 +04:00
Sergey Vojtovich
9e9f1da0d2 MDEV-7004 - Merge scalability fixes from 10.0-power
Remove call to deprecated set_thread_state. It is noop anyway, but generates
function call independently of performance schema state. According to perf
this saves ~0.2% of execution time.
2014-12-05 11:01:49 +04:00
Sergey Vojtovich
b4ec230917 MDEV-7004 - Merge scalability fixes from 10.0-power
Preallocate locks on THD mem_root to avoid expensive malloc.
2014-12-05 11:01:49 +04:00
Sergey Vojtovich
9bc5cec0f1 MDEV-7004 - Merge scalability fixes from 10.0-power
Preallocate locks on THD mem_root to avoid expensive malloc.
2014-12-05 11:01:49 +04:00
Sergey Vojtovich
faf169d245 MDEV-6906 - Relaxed memory order for counters
Let some atomic counters use relaxed memory order.
2014-12-05 11:01:49 +04:00
Sergei Golubchik
732d2daf44 fix for 32-bit 2014-12-04 20:19:15 +01:00
Sergei Golubchik
6ea9036743 fix out-of-source builds 2014-12-04 20:17:26 +01:00
Sergei Golubchik
e1913ba15a fix set_statement test for windows
timestamp has a lower granularity on windows so it needs
more time to change.
2014-12-04 16:09:34 +01:00
Sergei Golubchik
7a47416259 compilation failure on windows 2014-12-04 16:09:34 +01:00
Alexey Botchkov
c4cb15e87b MDEV-60 Support for Spatial Reference systems for the GIS data.
The GEOMETRY field metadata is stored in the FRM file.
        SRID for a spatial column now can be stored, it was added to the CREATE TABLE syntax,
        so the AddGeometryData() stored procedure is now possible. Script adding the required Add/DropGeometryColumn sp-s added.
2014-12-04 16:09:34 +01:00
Sergei Golubchik
c4655cf862 cleanup: comments referring to non-extistent Item classes 2014-12-04 16:09:34 +01:00
Sergei Golubchik
65f0a8d487 cleanup: sort and reorder %union elements in sql_yacc.yy 2014-12-04 16:09:34 +01:00
Sergei Golubchik
227510e039 parser cleanup: don't store field properties in LEX, use Create_field directly
length/dec/charset are still in LEX, because they're also used
for CAST and dynamic columns.

also
1. fix "MDEV-7041 COLLATION(CAST('a' AS CHAR BINARY)) returns a wrong result"
2. allow BINARY modifier in stored function RETURN clause
3. allow "COLLATION without CHARSET" in SP/SF (parameters, RETURN, DECLARE)
4. print correct variable name in error messages for stored routine parameters
2014-12-04 16:09:34 +01:00
Sergei Golubchik
d1522af72d update 32-bit rdiff's 2014-12-04 13:06:57 +01:00
Jan Lindström
0fe39b6856 MDEV-7262: innodb.innodb-mdev7046 and innodb-page_compression* fail on BuildBot
If persistent trim is not used some OS require that we write full page.
2014-12-04 12:40:19 +02:00
Sergei Golubchik
8360e1a5b5 MDEV-6712 THD specifics for plugins
thd_specifics service
2014-12-04 10:41:55 +01:00
Sergei Golubchik
0c7d773fca test for two password validation plugins
when many plugins are active, all must approve the password
2014-12-04 10:41:55 +01:00
Sergei Golubchik
78cb6e34ad cracklib_password_check plugin 2014-12-04 10:41:55 +01:00
Sergei Golubchik
7516a3c7f4 strict_password_validation 2014-12-04 10:41:55 +01:00
Sergei Golubchik
b814046719 validate SET PASSWORD 2014-12-04 10:41:55 +01:00
Sergei Golubchik
dccd85e7c7 cleanup: s/(OLD_)?PASSWORD/&_SYM/g 2014-12-04 10:41:54 +01:00
Sergei Golubchik
8934794a70 password validation function in sql_acl.cc 2014-12-04 10:41:54 +01:00
Sergei Golubchik
c98b2b393d password validation plugin type and a simple plugin 2014-12-04 10:41:54 +01:00
Sergei Golubchik
b5357f025b GRANT: calculate pasword hash in sql_acl.cc
don't do it in the parser, one should not make run-time
decisions (like, checking thd->variables.old_passwords variable)
during parsing.
2014-12-04 10:41:54 +01:00
Sergei Golubchik
7bd9eb1f41 parser: store the password hash in LEX_USER::auth, not in ::password
* indeed, "username IDENTIFIED BY PASSWORD hash" is the same
  as "username IDENTIFIED VIA mysql_native_password USING hash"
* LEX_USER::password can now be used for plain-text passwords
2014-12-04 10:41:54 +01:00
Sergei Golubchik
91ad0cd580 sql_acl.cc: better recognize the context to tell the role from a user
REQUIRE and MAX_QUERIES_PER_HOUR can not possibly apply to a role
2014-12-04 10:41:54 +01:00
Sergei Golubchik
bc603c604d bugfix: IDENTIFIED BY clause was lost in some GRANT variants 2014-12-04 10:41:54 +01:00
Sergei Golubchik
61820bca9b cleanup: sql_acl.cc
* remove no-op check_password_policy() and references to it
* add 'static' to functions that need it
* remove unused function check_acl_user()
2014-12-04 10:41:53 +01:00
Sergei Golubchik
f5722f5851 cleanup: normalize LEX_USER to get rid of different representation of the same thing
username IDENTIFIED BY PASSWORD xxx
  username IDENTIFIED VIA mysql_native_password USING xxx
  etc

also check for valid strlen(xxx)
2014-12-04 10:41:53 +01:00
Sergei Golubchik
c1204da1c7 cleanup: bool_variable= -1; -> bool_variable= true; 2014-12-04 10:41:53 +01:00
Sergei Golubchik
7f856f0a82 remove unsupported service file 2014-12-04 10:41:53 +01:00
Sergei Golubchik
4027e3b885 don't load plugin of unsupported types 2014-12-04 10:41:53 +01:00
Sergei Golubchik
77e3cb7dc1 cleanup: sql_plugin.cc
* test for opt->name being non-NULL *before* dereferencing it
* remove unused argument in cleanup_variables()
* simplify
2014-12-04 10:41:53 +01:00
Sergei Golubchik
bdb222bcc4 update 32-bit rdiff's 2014-12-04 10:41:53 +01:00
Sergei Golubchik
23fa0a367b fix a comment 2014-12-04 10:41:53 +01:00
Sergei Golubchik
fc40f81eda a case of uninitialized variable 2014-12-04 10:41:53 +01:00
Sergei Golubchik
e4f973930c MDEV-6999 Remove or deprecate unused variables 2014-12-04 10:41:52 +01:00
Sergei Golubchik
6a2fbdf948 MDEV-6979 simplify trigger rules for RBR triggers
Rows_log_event::write_row - don't optimize DELETE+INSERT
into UPDATE if RBR triggers are used
2014-12-04 10:41:52 +01:00
Sergei Golubchik
1bd1c29ea0 MDEV-6895 switch to dynamic libjemalloc.so 2014-12-04 10:41:52 +01:00
Sergei Golubchik
0438f12540 MDEV-6980 OUT parameters in PREPARE
revert the patch for "out parameters in prepare"
2014-12-04 10:41:52 +01:00