Commit graph

171605 commits

Author SHA1 Message Date
Sergei Golubchik
ab8415d983 move encryption tests to a dedicate suite
remove few tests for variables that never existed (merge error)
2015-05-13 14:27:16 +02:00
Sergey Vojtovich
b22959903b MDEV-7943 - pthread_getspecific() takes 0.76% in OLTP RO
Added THD argument to select_result and all derivative classes.
This reduces number of pthread_getspecific calls from 796 to 776 per OLTP RO
transaction.
2015-05-13 15:56:56 +04:00
Alexander Barkov
8345bc6921 MDEV-8152 is_columns_is_embedded test fails
Recording --ps and --embedded tests (a postfix for MDEV-7807)
2015-05-13 15:34:20 +04:00
Sergey Vojtovich
9851a8193f MDEV-8001 - mysql_reset_thd_for_next_command() takes 0.04% in OLTP RO
Removed yet more mysql_reset_thd_for_next_command(). Call
THD::reset_for_next_command() directly instead.
2015-05-13 15:28:34 +04:00
Sergey Vojtovich
4d1ccc4289 MDEV-7951 - sql_alloc() takes 0.25% in OLTP RO
sql_alloc() has additional costs compared to direct mem_root allocation:
- function call: it is defined in a separate translation unit and can't be
  inlined
- it needs to call pthread_getspecific() to get THD::mem_root

It is called dozens of times implicitely at least by:
- List<>::push_back()
- List<>::push_front()
- new (for Sql_alloc derived classes)
- sql_memdup()

Replaced lots of implicit sql_alloc() calls with direct mem_root allocation,
passing through THD pointer whenever it is needed.

Number of sql_alloc() calls reduced 345 -> 41 per OLTP RO transaction.
pthread_getspecific() overhead dropped 0.76 -> 0.59
sql_alloc() overhed dropped 0.25 -> 0.06
2015-05-13 10:43:14 +04:00
Sergey Vojtovich
c4d2c4e844 MDEV-7964 - delete_dynamic() takes 0.12% in OLTP RO
delete_dynamic() was called 9-11x per OLTP RO query + 3x per BEGIN/COMMIT.

3 calls were performed by LEX_MASTER_INFO. Added condition to call those only
for CHANGE MASTER.

1 call was performed by lock_table_names()/Hash_set/my_hash_free(). Hash_set was
supposed to be used for DDL and LOCK TABLES to gather database names, while it
was initialized/freed for DML too. In fact Hash_set didn't do any useful job
here. Hash_set was removed and MDL requests are now added directly to the list.

The rest 5-7 calls are done by optimizer, mostly by Explain_query and friends.
Since dynamic arrays are used in most cases, they can hardly be optimized.

my_hash_free() overhead dropped 0.02 -> out of radar.
delete_dynamic() overhead dropped 0.12 -> 0.04.
2015-05-13 10:43:14 +04:00
Sergey Vojtovich
7cfa803d8e MDEV-8001 - mysql_reset_thd_for_next_command() takes 0.04% in OLTP RO
Removed mysql_reset_thd_for_next_command(). Call THD::reset_for_next_command()
directly instead.

mysql_reset_thd_for_next_command() overhead dropped 0.04% -> out of radar.
THD::reset_for_next_command() overhead didn't increase.
2015-05-13 10:43:14 +04:00
Sergey Vojtovich
5cfb6b479e MDEV-7999 - PROFILING routines take 0.2% when profiling disabled
PROFILING::start_new_query() optimizations:
- no need to check "current": added assertion instead
- "enabled" now means "is enabled currently" instead of "was enabled at query
  start". Old meaning was useless, new meaning echoes OPTION_PROFILING so
  that start_new_query() can be defined in sql_profile.h.
- remnants of start_new_query() moved to sql_profile.h so it can be inlined

PROFILING::start_new_query() overhead dropped 0.08% -> out of radar.

PROFILING::set_query_source() optimizations:
- no need to check "enabled": !enabled && current is impossible
- remnants of set_query_source() moved to sql_profile.h so it can be inlined

PROFILING::set_query_source() overhead dropped 0.02% -> out of radar.

PROFILING::finish_current_query() optimizations:
- moved "current" check out to sql_profile.h so it can be inlined

PROFILING::finish_current_query() overhead dropped 0.10% -> out of radar.
2015-05-13 10:43:13 +04:00
Sergey Vojtovich
55d5af733d MDEV-7945 - THD::enter_stage() takes 0.48% in OLTP RO
THD::enter_stage() optimizations:
- stage backup code moved to THD::backup_stage(), saves one condition
- moved check for "new_stage" out to callers that actually need it
- remnants of enter_stage() moved to sql_class.h so it can be inlined

THD::enter_stage() overhead dropped 0.48% -> 0.07%.

PROFILING::status_change() optimizations:
- "status_arg" is now checked by QUERY_PROFILE::new_status()
- no need to check "enabled": !enabled && current is impossible
- remnants of status_change() moved to sql_profile.h so it can be inlined

PROFILING::status_change() overhead dropped 0.1% -> out of radar.
2015-05-13 10:43:13 +04:00
Nirbhay Choubey
c8ad5b2f12 MDEV-8151 : wsrep.foreign_key, wsrep.pool_of_threads,
.. wsrep.binlog_format, wsrep.mdev_6832 fail in buildbot

Galera-3.9 logs an additional warning in the error log if
it fails to find gvwstate.dat file. Update wsrep/suite.pm.
2015-05-12 17:15:16 -04:00
Alexey Botchkov
8c54182ec4 MDEV-7926 Server crashes in get_geometry_column_record on concurrent SELECT FROM I_S.GEOMETRY_COLUMNS with join and DDL.
The bug was that open_tables() returned error in case of
        thd->killed() without properly calling thd->send_kill_message()
        to set the correct error. This was fixed already in get_schema_column_record,
        so the code was just copied to get_geometry_column_record.
2015-05-12 15:09:28 +05:00
Jan Lindström
58e8db2eb3 MDEV-7942: InnoDB: abuse of UNIV_LIKELY()/UNIV_UNLIKELY()
UNIV_LIKELY()/UNIV_UNLIKELY() hints are supposed to improve branch prediction.
Currently, they're expected to work only if cond evaluates to TRUE or FALSE.

However there're a few conditions that may evaluate to different values, e.g.:

page/page0zip.cc:		if (UNIV_LIKELY(c_stream->avail_in)) {
page/page0zip.cc:			if (UNIV_LIKELY(c_stream->avail_in)) {
dict/dict0mem.cc:		if (UNIV_LIKELY(i) && UNIV_UNLIKELY(!table->col_names)) {

Fixed these conditions so that they evaluate TRUE/FALSE.
2015-05-11 14:31:42 +03:00
Kristian Nielsen
6e49201644 Fix compilation warnings in -DWITH_WSREP=OFF build. 2015-05-11 12:47:43 +02:00
Kristian Nielsen
8bedb638d7 MDEV-8113: Parallel slave: slave hangs on ALTER TABLE (or other DDL) as the first event after slave start
In optimistic parallel replication, it is not safe to try to run a following
transaction in parallel with a DDL statement, and there is code to prevent
this.

However, the code was missing the case where the DDL is the very first event
after slave start. In this case, following transactions could run in
parallel with the DDL, which can cause the slave to hang or even corrupt
slave in unlucky cases.
2015-05-11 12:43:38 +02:00
Jan Lindström
ecfc3de57e MDEV-8129: Compilation warnings in log0crypt.cc
Fix incorrect types and compiler warnings.
2015-05-11 12:22:13 +03:00
Sergei Golubchik
5fdb14542a MDEV-8021 "InnoDB: Tablespace id 4 encrypted but encryption service not available. Can't continue opening tablespace" on server restart when there are encrypted tables
key id was written in the wrong place on the tablespace first page
(thus its value could not be read back later)
2015-05-09 11:19:36 +02:00
Jan Lindström
d259376fd8 MDEV-8041: InnoDB redo log encryption
Merged new version of InnoDB/XtraDB redo log encryption from Google
provided by Jonas Oreland.
2015-05-09 11:13:00 +03:00
Vicentiu Ciorbaru
ab54f5a8b9 Fix win/ files to be stored with LF in repository
On Windows, the files get checked out with CRLF thanks
to .gitattributes.
2015-05-08 17:31:54 +03:00
Vicentiu Ciorbaru
5ae8d06df4 Update .gitattributes 2015-05-08 17:27:41 +03:00
Vicentiu Ciorbaru
0880284bf7 Fix win/ files to be stored with LF in repository
On Windows, the files get checked out with CRLF thanks
to .gitattributes.
2015-05-08 17:06:35 +03:00
Sergei Golubchik
c1b07ff9b7 update .gitattributes 2015-05-08 11:56:48 +02:00
Sergei Golubchik
b5c5f3176a convert files from CRLF to LF line endings 2015-05-08 11:48:16 +02:00
Sergei Golubchik
e774008b04 bump the VERSION 2015-05-08 11:48:02 +02:00
Sergei Golubchik
ac286a9bc7 Merge branch '5.5' into 10.0 2015-05-08 11:20:43 +02:00
Alexander Barkov
91ee98a8c8 MDEV-7807 information_schema.processlist truncates queries with binary strings
Adding a new column INFORMATION_SCHEMA.PROCESSLIST.INFO_BINARY.
2015-05-08 00:34:06 +04:00
Sergei Golubchik
0014bdc7ee MDEV-8115 mysql_upgrade crashes the server with REPAIR VIEW
on REPAIR don't do table-specific stuff for views
(because even if the view has a temp table opened for it,
it's not opened all the way down the engine. In particular,
Aria crashes in maria_status() because MARIA_HA* info - that is
table->table->file->file - is NULL)
2015-05-07 22:18:34 +02:00
Sergey Vojtovich
0fcc350f73 MDEV-7922 - ERROR 1939 (HY000): Engine PERFORMANCE_SCHEMA failed to discover
table

Performance schema discovery fails if connection has no active database set.

This happened due to restriction in SQL parser: table name with no database name
is ambiguous in such case.

Fixed by temporary substitution of default database with being discovered table
database.
2015-05-07 20:45:46 +04:00
Jan Lindström
3832bda1ba Fix compiler error if compiler does not support c99 style
initializers.
2015-05-07 18:30:42 +03:00
Sergey Vojtovich
7ed673f35c MDEV-7793 - Race condition between XA COMMIT/ROLLBACK and disconnect
XA COMMIT/ROLLBACK of XA transaction owned by different thread may access
freed memory if that thread disconnects at the same time.

Also concurrent XA COMMIT/ROLLBACK of recovered XA transaction were not
serialized properly.
2015-05-07 16:48:30 +04:00
Jan Lindström
8350ea0514 Fix compiler error if compiler does not support c99 style
initializers.
2015-05-07 13:04:03 +03:00
Alexander Barkov
a1ad712152 Fixing connect.dbf test failures on big endian machines. 2015-05-07 07:39:45 +04:00
Jan Lindström
b975685036 Merge pull request #54 from openquery/MDEV-8053-c99-style-for-structure-members-10.1
c99 style for assigning structure members
2015-05-06 16:48:17 +03:00
Jan Lindström
f704b3335f Merge pull request #52 from openquery/MDEV-8053-c99-style-for-structure-members
c99 style for assigning structure members
2015-05-06 16:47:23 +03:00
Jan Lindström
bad81f23f6 MDEV-8046: Server crashes in pfs_mutex_enter_func on select from I_S.INNODB_TABLESPACES_ENCRYPTION if InnoDB is disabled
Problem was that information schema tables innodb_tablespaces_encryption and
innodb_tablespaces_scrubbing where missing required check is InnoDB enabled
or not.
2015-05-06 15:16:28 +03:00
Jan Lindström
2f25c653ad MDEV-8074: Failing assertion: mutex->magic_n == MUTEX_MAGIC_N in file sync0sync.cc line 508
Problem was that e.g. on crash recovery fil_space_crypt_close_tablespace
and fil_space_crypt_mark_space_closing access mutex that is not yet
initialized. Mutex is naturally initialized only if encryption is
configured.
2015-05-06 14:11:30 +03:00
Kristian Nielsen
31c069eb4d Merge MDEV-8103 into 10.1 2015-05-06 12:46:33 +02:00
Kristian Nielsen
5c833689ac Merge MDEV-8103 into 10.0 2015-05-06 12:41:21 +02:00
Kristian Nielsen
ef99edf1a8 MDEV-8103: Missing DBUG_RETURN in open_table_uncached() 2015-05-06 12:24:15 +02:00
Sergei Golubchik
b9c89ad038 Merge branch 'Buggynours:10.0' into 10.0 2015-05-05 22:37:00 +02:00
Olivier Bertrand
a82f475bdd - Fix a regression bug on (XML) HTML tables.
modified:
  tabxml.cpp
added:
  xml_html.test
  xml_html.result
  beers.xml
  coffee.htm

- Fix MDEV-7935 by suppressing error resetting code in delete_or_rename_table.
  However, the issue is that this code was added because without it an assertion
  was raised in some cases. Unfortunately I can't remember what were these cases.
  Therefore fixing it in this case will perhaps make a new crash happening on another cases.
modified:
  ha_connect.cc

- Add the UDF Json_Array_Delete.
modified:
  jsonudf.cpp
2015-05-05 22:05:09 +02:00
Sergei Golubchik
c09c265ac4 Fix MDEV-8090 in tabmysql.cpp 2015-05-05 22:05:05 +02:00
Sergei Golubchik
95797b9677 MDEV-8096 vio timeouts are multiplied by 1000 for ssl
in when using vio->read_timeout (and write_timeout) to set
timeouts of a new vio, as in:

  vio_timeout(vio, 0, old_vio.read_timeout)
  vio_timeout(vio, 0, old_vio.write_timeout)

remember that timeouts are stored in ms, but vio_timeout()'s
argument is in seconds.
2015-05-05 21:56:46 +02:00
Vicențiu Ciorbaru
d3a3adb833 MDEV-7985: MySQL Users Break when Migrating to MariaDB, part 2
Gave priority to password field when using a native authentication
plugin.

Also, prevented a user from setting an invalid auth_string, when using
native authentication.
2015-05-05 22:50:32 +03:00
Sergei Golubchik
7b70b0d4a9 Merge branch 'bb-10.0-serg' into 10.0 2015-05-05 16:31:53 +02:00
Sergei Golubchik
93047370a6 mroonga doesn't work in embedded anymore
specify RECOMPILE_FOR_EMBEDDED and disable tests in suite.pm
2015-05-05 16:28:23 +02:00
Sergei Golubchik
1d3ea9ecd8 perfschema 5.6.24
including the big commit
  commit 305130361bf72726de220f3d2b2787395e10be61
  Author: Marc Alff <marc.alff@oracle.com>
  Date:   Tue Feb 10 11:31:32 2015 +0100

      WL#8354 BACKPORT DIGEST IMPROVEMENTS TO MYSQL 5.6

(with the following commits) and related changes in sql/
2015-05-05 15:23:47 +02:00
Alexander Barkov
e4fde092c6 Temporarily disabling Mroonga on Solaris
(See MDEV-7440 Build fails in libgroonga on Solaris)
2015-05-05 15:39:32 +04:00
Alexander Barkov
73c2356e7b MDEV-7778 impossible create copy of table, if table contain default value for timestamp field
MDEV-8082 ON UPDATE is not preserved by CREATE TABLE .. SELECT
2015-05-05 13:22:09 +04:00
Sergei Golubchik
dd0207bda4 .gitignore: add generated mroonga *.result files
and remove duplicates
2015-05-05 08:53:52 +02:00
Sergei Golubchik
d08b7ed514 Merge branch 'Kentoku:10.0' into 10.0 2015-05-05 08:19:20 +02:00