Commit graph

63526 commits

Author SHA1 Message Date
Sergei Petrunia
664ce4c507 Fix linking: move the inline functions 2015-03-24 17:35:29 +03:00
Sergei Petrunia
4106dfe89b Merge branch 'bb-10.1-explain-analyze' into 10.1 2015-03-24 16:26:42 +03:00
Sergei Petrunia
77e16ce7d6 MDEV-7648: Extra data in ANALYZE FORMAT=JSON $stmt
Switch from relying on PERFORMANCE_SCHEMA to using our
own hooks for counting the time spent reading rows from
tables.
2015-03-24 16:17:41 +03:00
Sergei Petrunia
b273e4a5c0 Better comments 2015-03-24 13:22:03 +03:00
Alexander Barkov
0c26c0032c A preparatory patch for MDEV-7284 INDEX: CREATE OR REPLACE.
Removing "bool Key::create_if_not_exists" and deriving Key from
DDL_options instead.
2015-03-20 13:51:41 +04:00
Alexander Barkov
2a2cc16478 Refactoring in sql_yacc.yy. A pre-requirement patch for
MDEV-7801 Unexpected syntax error in ALTER TABLE t1 ADD INDEX TYPE BTREE
MDEV-7284 INDEX: CREATE OR REPLACE
2015-03-20 11:46:44 +04:00
Vicențiu Ciorbaru
1a32993537 MDEV-5214 Status variables for number of global/db/table/column/role grants
Implemented the status variables for use with the feedback plugin.
2015-03-19 22:41:43 +02:00
Alexander Barkov
e28a241907 MDEV-7661 Unexpected result for: CAST(0xHHHH AS CHAR CHARACTER SET xxx)
for incorrect byte sequences
2015-03-18 17:10:48 +04:00
Kristian Nielsen
4ba16ea4bc Merge MDEV-6981 and MDEV-6981 (from danblack) into MariaDB 10.1 2015-03-17 09:24:22 +01:00
Sergey Vojtovich
fec94a6b44 MDEV-7728 - Improve xid cache scalability by using lock-free hash
This is an addition to original patch. Some platforms are strict about atomic
op argument signedness.
2015-03-16 22:54:43 +04:00
Alexander Barkov
e6f67c64cd MDEV-6572 "USE dbname" with a bad sequence erroneously connects to a wrong database 2015-03-16 21:55:10 +04:00
Sergey Vojtovich
6bd24deab4 MDEV-7728 - Improve xid cache scalability by using lock-free hash
XID cache is now based on lock-free hash.
Also fixed lf_hash_destroy() to call alloc destructor.

Note that previous implementation had race condition when thread was accessing
XA owned by different thread. This new implementation doesn't fix it either.
2015-03-16 19:07:51 +04:00
Kristian Nielsen
1f8efee584 Merge MDEV-7198: status variable for Slave_skipped_errors 2015-03-16 14:54:16 +01:00
Kristian Nielsen
ef4d8db5ec MDEV-6981: feature request MASTER_GTID_WAIT status variables
Review fixes:
 - Coding style
 - Fix bad .result file
 - Fix test to be tolerant of different timing.
 - Fix test to give better info in case of unexpected timing.
2015-03-16 14:40:29 +01:00
Kristian Nielsen
0e717c5bf4 Merge branch 'mdev-6981-master_gtid_wait-status-variables' of https://github.com/openquery/mariadb-server into danblack
Conflicts:
	sql/mysqld.cc
2015-03-16 13:41:11 +01:00
Sergey Vojtovich
18e9c314e4 MDEV-6650 - LINT_INIT emits code in non-debug builds
Replaced all references to LINT_INIT with UNINIT_VAR and LINT_INIT_STRUCT.
Removed LINT_INIT macro.
2015-03-16 14:48:22 +04:00
Alexander Barkov
f48dc5ccc7 Moving the conversion code from String::well_formed_copy()
to my_convert_fix() - a new function in /strings.
2015-03-16 12:14:31 +04:00
Alexey Botchkov
da4b52432a MDEV-7512 GIS: ST_ synonyms for functions are not consistent.
Checked for missing synonims, added those found.
2015-03-15 23:00:05 +04:00
Alexey Botchkov
37345bd9dd MDEV-7529 GIS: ST_Relate returns unexpected results for POINT relations.
Problem was that we considered the point itself as the 'border' object. Instead
of that the 'border' of a POINT is an empty set, and the point is the 'interior'.
Another error fixed by the way - not all operations of the resulting function were properly
allocated.
2015-03-15 22:20:38 +04:00
Alexey Botchkov
ca30418837 MDEV-7514 GIS: PointOnSurface returns NULL instead of the point.
Need to take into account cases of a polygon shaped as a very thin line.
2015-03-15 11:17:50 +04:00
Oleksandr Byelkin
a21ef88d2a MDEV-6954: SET STATEMENT rand_seedX = ...FOR ... makes the next rand() to return 0
The variables now return real values. They can't be made usual variables because they do not have DEFAULT value.
2015-03-14 08:41:43 +01:00
Oleksandr Byelkin
41106b229e MDEV-6997: SET STATEMENT last_insert_id FOR ... does not affect the value written to the binlog
Problem was in reinitialization of first_successful_insert_id_in_prev_stmt_for_binlog after setting variables.
2015-03-13 20:42:30 +01:00
Alexander Barkov
197afb413f MDEV-6566 Different INSERT behaviour on bad bytes with and without character set conversion 2015-03-13 16:51:36 +04:00
Alexey Botchkov
702fba1511 MDEV-7510 GIS: IsRing returns false for a primitive triangle.
The problem is in the IsSimple function. If the first and the last points
of a curve coincide it's and exception and the line is still 'simple'.
2015-03-13 16:10:31 +04:00
Alexander Barkov
75d65b5f4e MDEV-6989 BINARY and COLLATE xxx_bin comparisions are not used for optimization in some cases 2015-03-13 15:48:39 +04:00
Alexander Barkov
bd2105855a Adding "const" qualifier to Item::compare_collation() 2015-03-13 13:52:07 +04:00
Alexander Barkov
bb3115b256 MDEV-6990 GROUP_MIN_MAX optimization is not applied in some cases when it could 2015-03-12 18:12:15 +04:00
Alexey Botchkov
129c82bb59 MDEV-7334 valgrind warning "unitialized bytes" in 10.1.
The 'srid' field's copying was missing in the copying Create_field::Create_field() constructor.
2015-03-12 17:50:23 +04:00
Jan Lindström
8249dcaaeb MDEV-6858: enforce_storage_engine option
Merge from Percona Server enforced use of a specific storage engine
authored by Stewart Smith.

Modified to be session variable and modifiable only by SUPER. Use
similar implementation as default_storage_engine.
2015-03-12 12:17:14 +02:00
Alexander Barkov
ba3573cae8 Clean-up:
- Renaming Item::is_bool_func() to is_bool_type(), to avoid assumption
  that the item is an Item_func derivant.
- Deriving Item_func_spatial_rel from Item_bool_func rather than Item_int_func
2015-03-12 13:40:52 +04:00
Oleksandr Byelkin
a71e2d23bd MDEV-7006 MDEV-7007: SET STATEMENT and slow log
fixed embedded server tests
MDEV-7009: SET STATEMENT min_examined_row_limit has no effect
MDEV-6948:SET STATEMENT gtid_domain_id = ... FOR has no effect (same for gtid_seq_no and server_id)

old values of SET STATENENT variables now saved in its own Query_arena and restored later
2015-03-12 10:19:32 +01:00
Oleksandr Byelkin
dab12366b1 MDEV-6956:SET STATEMENT default_master_connection = ... has no effect
the problem was in assigning default value during parsing.
2015-03-12 09:47:36 +01:00
Alexander Barkov
e91bc2e91d MDEV-7759 NULLIF(x,y) is not equal to CASE WHEN x=y THEN NULL ELSE x END 2015-03-12 11:40:37 +04:00
Daniel Black
fa5809ce10 Add Master_gtid_wait_{count,time,timeouts} status
MASTER_GTID_WAIT function needs some status to evaluate its use.

master_gtid_wait_count indicates how many times the function is called.
master_gtid_wait_time indicates how much time in microseconds occurred
waiting (or timing out)
master_gtid_timeouts indicates how many time times this function timed
out rather than all successful gtids events being available.
2015-03-12 06:43:38 +11:00
Daniel Black
eac71ced18 Add Slave_skipped_errors to global status
This counts the number of times a replication event is ignored
due to slave_skip_errors.
2015-03-12 05:23:05 +11:00
Oleksandr Byelkin
80f03abcca MDEV-7671: Cache VIEW definitions in the TDC
(changes of backported patch are very small: strlen removed, error processing fixed, view open statistics added)
2015-03-11 17:39:15 +01:00
Oleksandr Byelkin
3aa1a600bb Merge branch '10.1' of github.com:MariaDB/server into 10.1 2015-03-11 15:15:43 +01:00
Oleksandr Byelkin
be73c7ee44 MDEV-6951: Erroneous SET STATEMENT produces two identical errors
Double error reporting removed.
2015-03-11 14:57:30 +01:00
Alexander Barkov
190858d996 Removing duplicate code: adding Item_func_bool_predicate as a
common parent class for Item_func_isnull and Item_func_isnotnull
2015-03-11 12:40:35 +04:00
Vicențiu Ciorbaru
0ed57e34c7 MDEV-7025 ANALYZE SELECT/INSERT/UPDATE/DELETE from a view does not check access permissions on the view
Added access checking for the ANALYZE statement command.
2015-03-10 14:11:02 +02:00
Sergei Golubchik
e2de804491 Merge branch '10.1' into bb-10.1-serg 2015-03-08 12:54:42 +01:00
Sergei Petrunia
1626e0d3d4 MDEV-7648: Extra data in ANALYZE FORMAT=JSON $stmt
Show total execution time (r_total_time_ms) for various parts of the
query:
1. time spent in SELECTs
2. time spent reading rows from storage engines

#2 currently gets the data from P_S.
2015-03-07 22:47:28 +03:00
Sergei Petrunia
2288b84df4 MDEV-7679: ANALYZE crashes when printing WHERE when no default db
Fix Item_ident::print() to work when there is no current database
2015-03-07 20:51:35 +03:00
Sergei Petrunia
66ad265f3b MDEV-7674: ANALYZE shows r_rows=0
Change r_rows to be double
2015-03-07 19:30:19 +03:00
Sergei Golubchik
5bff6c5d57 bison warning: clash on default action: <NONE> != <object_ddl_options> 2015-03-07 15:32:52 +01:00
Sergei Golubchik
18feb62fee MDEV-6819 st_mysql_show_var::value should be void* not char* 2015-03-07 13:27:56 +01:00
Sergei Golubchik
2db62f686e Merge branch '10.0' into 10.1 2015-03-07 13:21:02 +01:00
Sergei Golubchik
5f510a9175 Merge branch '5.5' into 10.0 2015-03-06 18:41:32 +01:00
Kristian Nielsen
2e4dc5a370 after-merge fixes 2015-03-04 14:12:48 +01:00
Kristian Nielsen
95d7208859 Merge MDEV-6589 and MDEV-6403 into 10.1.
Conflicts:
	sql/log.cc
	sql/rpl_rli.cc
	sql/sql_repl.cc
2015-03-04 13:49:37 +01:00