Commit graph

1247 commits

Author SHA1 Message Date
Marko Mäkelä
5c3ff5cb93 Merge 10.3 into 10.4 2019-04-02 11:04:54 +03:00
Sergei Golubchik
4e1d3f83b7 Merge branch '10.2' into 10.3 2019-03-29 19:41:41 +01:00
Sergei Golubchik
f2a0c758da Merge branch '10.1' into 10.2 2019-03-29 10:58:20 +01:00
Sergei Golubchik
d8084116b5 MDEV-7066 No Source RPMs ... (and so no "yum-builddep MariaDB-server" either)
special cases:

* change systemd detection to use CHECK_LIBRARY_EXISTS at least once,
  to have it detected by build_depends.cmake
* similarly, use find_library for pam
* unixODBC is weird, libodbc.so is in the unixODBC package, not
  in the unixODBC-devel, where normally all .so files belong.
  Packaging bug? As a workaround, use find_file(sql.h) instead of
  find_path(sql.h) to make sure that /usr/include/sql.h (not /usr/include)
  is cached by cmake, and later build_depends.cmake will select
  unixODBC-devel, as a package owning /usr/include/sql.h file.
2019-03-27 22:51:37 +01:00
Marko Mäkelä
ca80e14a88 Merge 10.3 into 10.4 2019-03-22 13:20:44 +02:00
Alexander Barkov
1c60f40868 Merge remote-tracking branch 'origin/10.2' into 10.3 2019-03-22 14:41:36 +04:00
Marko Mäkelä
031fa8f1d2 Merge 10.1 into 10.2 2019-03-22 11:15:21 +02:00
Marko Mäkelä
8c493a910f Merge 10.0 into 10.1 2019-03-21 21:06:01 +02:00
Marko Mäkelä
5d454181a8 MDEV-6262 follow-up: Ensure NUL termination on strncpy() 2019-03-21 10:29:59 +02:00
Sergei Golubchik
83de75d66d try harder to link unix_socket plugin statically
fix unix_socket tests to work if unix_socket is a built-in
2019-02-21 15:04:03 +01:00
Oleksandr Byelkin
93ac7ae70f Merge branch '10.3' into 10.4 2019-02-21 14:40:52 +01:00
Oleksandr Byelkin
00906719fe Merge branch '10.2' into bb-10.3-merge 2019-02-19 17:26:44 +01:00
Oleksandr Byelkin
91d506cf2d Merge branch '10.1' into 10.2 2019-02-19 16:47:45 +01:00
Sergei Golubchik
2de0b57dd1 Don't build aws_key_management plugin by default 2019-02-19 12:39:40 +01:00
Vladislav Vaintroub
3220227794 MDEV-18578 build aws sdk for all plugins to use 2019-02-18 07:52:13 +01:00
Oleksandr Byelkin
dcc838168f Merge branch '10.3' into bb-10.3-merge 2019-02-12 12:05:10 +01:00
Marko Mäkelä
9f56dd7382 Merge 10.3 into 10.4 2019-02-11 17:55:25 +02:00
Oleksandr Byelkin
65c5ef9b49 dirty merge 2019-02-07 13:59:31 +01:00
Monty
129b2dcef3 Changed user_variables and sql_sequence to maturity state stable 2019-02-06 22:18:20 +02:00
Sergei Golubchik
5b15cc613e MDEV-11340 Allow multiple alternative authentication methods for the same user
introduce the syntax

... IDENTIFIED { WITH | VIA }
      plugin [ { USING | AS } auth ]
 [ OR plugin [ { USING | AS } auth ]
 [ OR ... ]]

Server will try auth plugins in the specified order until the first
success. No protocol changes, server uses the existing "switch plugin"
packet.

The auth chain is stored in json as

  "auth_or":[{"plugin":"xxx","authentication_string":"yyy"},
             {},
             {"plugin":"foo","authentication_string":"bar"},
            ...],
  "plugin":"aaa", "authentication_string":"bbb"

Note:
* "auth_or" implies that there might be "auth_and" someday;
* one entry in the array is an empty object, meaning to take plugin/auth
  from the main json object. This preserves compatibility with
  the existing mysql.global_priv table and with the mysql.user view.
  This entry is preferrably a mysql_native_password plugin for a
  non-empty mysql.user.password column.

SET PASSWORD is supported and changes the password for the *first*
plugin in the chain that has a notion of a "password"
2019-02-04 16:06:57 +01:00
Sergei Golubchik
798d1a9ddf upgrade C/C to 3.1 2019-02-04 16:06:31 +01:00
Sergei Golubchik
103a32fdd3 ed25519: better error message for an incorrect password hash 2019-02-04 15:54:10 +01:00
Sergei Golubchik
c94ec9fc67 MDEV-17950 SHOW GRANTS FOR does not work for a user identified with non-existing plugin
Revert the side effect of 7c40996cc8.
Do not convert password hash to its binary representation when a user
entry is loaded. Do it lazily on the first authenticatation attempt.

As a collateral - force all authentication plugins to follow the
protocol and read_packet at least once before accessing info->username
(username is not available before first client handshake packet is read).

Fix PAM and GSSAPI plugins to behave.
2019-02-04 15:54:10 +01:00
Sergei Golubchik
3742f6f9aa cleanup: use only one callback in PAM plugin, not two 2019-02-04 15:54:10 +01:00
Marko Mäkelä
081fd8bfa2 Merge 10.1 into 10.2 2019-02-02 11:40:02 +02:00
Oleksandr Byelkin
a3a4ea9355 postmerge rollbacks and fixes 2019-01-31 19:28:38 +01:00
Sergey Vojtovich
8553525931 MDEV-18400 - Move shutdown handling to main thread
Signal handler is now respoinsible for setting abort_loop and breaking
poll() in main thread. The rest is handled by main thread itself.

Removed redundant LOCK_error_log init/destroy wrappers.
Removed redundant unireg_end(): it is trivial and it has only one caller.
Removed unused ready_to_exit from PFS.
Removed kill_in_progress: duplicates abort_loop.
Removed shutdown_in_progress: duplicates abort_loop.
Removed ready_to_exit: was used to make sure main thread waits for
cleanups, which are now done by main thread itself.
Removed SIGNALS_DONT_BREAK_READ, MAYBE_BROKEN_SYSCALL,
kill_broken_server: never defined/used.
Make clean_up() static.
2019-01-29 11:56:35 +04:00
Sergey Vojtovich
3503fbbebf Move THD list handling to THD_list
Implemented and integrated THD_list as a replacement for the global
thread list. It uses own mutex instead of LOCK_thread_count for THD
list protection.

Removed unused first_global_thread() and next_global_thread().

delayed_insert_threads is now protected by LOCK_delayed_insert. Although
this patch doesn't fix very wrong synchronization of this variable.

After this patch there are only 2 legitimate uses of LOCK_thread_count
left, both in mysqld.cc: thread_count and ready_to_exit.

Aim is to reduce usage of LOCK_thread_count and COND_thread_count.
Part of MDEV-15135.
2019-01-28 17:39:07 +04:00
Brave Galera Crew
36a2a185fe Galera4 2019-01-23 15:30:00 +04:00
Sergey Vojtovich
0f034e2e96 time_collector transition to std::atomic 2018-12-29 14:19:03 +04:00
Sergey Vojtovich
7a9dfdd8d9 Combine GLOBAL and COMMIT namespaces into BACKUP namespace.
Part of MDEV-5336 Implement LOCK FOR BACKUP

Other things:
- Added printing of MDL locks to DBUG.
2018-12-09 22:12:26 +02:00
Marko Mäkelä
074c684099 Merge 10.3 into 10.4 2018-11-06 16:24:16 +02:00
Marko Mäkelä
df563e0c03 Merge 10.2 into 10.3
main.derived_cond_pushdown: Move all 10.3 tests to the end,
trim trailing white space, and add an "End of 10.3 tests" marker.
Add --sorted_result to tests where the ordering is not deterministic.

main.win_percentile: Add --sorted_result to tests where the
ordering is no longer deterministic.
2018-11-06 09:40:39 +02:00
Marko Mäkelä
32062cc61c Merge 10.1 into 10.2 2018-11-06 08:41:48 +02:00
Sergei Golubchik
7c40996cc8 MDEV-12321 authentication plugin: SET PASSWORD support
Support SET PASSWORD for authentication plugins.

Authentication plugin API is extended with two optional methods:
* hash_password() is used to compute a password hash (or digest)
  from the plain-text password. This digest will be stored in mysql.user
  table
* preprocess_hash() is used to convert this digest into some memory
  representation that can be later used to authenticate a user.
  Build-in plugins convert the hash from hexadecimal or base64 to binary,
  to avoid doing it on every authentication attempt.

Note a change in behavior: when loading privileges (on startup or on
FLUSH PRIVILEGES) an account with an unknown plugin was loaded with a
warning (e.g. "Plugin 'foo' is not loaded"). But such an account could
not be used for authentication until the plugin is installed. Now an
account like that will not be loaded at all (with a warning, still).
Indeed, without plugin's preprocess_hash() method the server cannot know
how to load an account. Thus, if a new authentication plugin is
installed run-time, one might need FLUSH PRIVILEGES to activate all
existing accounts that were using this new plugin.
2018-10-31 16:06:16 +01:00
Sergei Golubchik
0e388d43a7 cleanup: add 'const' to password validation API 2018-10-31 16:06:16 +01:00
Daniel Black
3859273d04 MDEV-14267: correct FSF address 2018-10-30 19:45:09 +08:00
Vladislav Vaintroub
5a5bc21a65 auth_gssapi : Fix string formatting in my_printf_error() 2018-10-16 09:19:03 +01:00
Vladislav Vaintroub
952f394f8e remove MYF flags from plugin 2018-10-16 09:17:03 +01:00
Vladislav Vaintroub
ea9c407e0b Fix regular expression in replace_regex in auth_gssapi test. 2018-10-15 23:07:30 +01:00
Vladislav Vaintroub
64b48aebe4 make auth_gssapi_basic work, also in domain environment. 2018-10-15 22:57:15 +01:00
Vladislav Vaintroub
311126758e MDEV-17462 Heap corruption with auth_gssapi on Windows.
use FreeContextAttributes() on individual members of
SecPkgContext_NativeNames, not on the struct itself.
2018-10-15 22:11:14 +01:00
Marko Mäkelä
2a955c7a83 Merge 10.3 into 10.4 2018-10-10 10:36:51 +03:00
Vladislav Vaintroub
f4cdf90d73 MDEV-17279 Windows : link C runtime dynamically
Changed the build to use /MD flag so that DDL version of C runtime is used.

To make sure MariaDB is always runnable on target system, include
redistributable CRT libraries into installer.

For MSI package, use Microsoft's merge modules.
For ZIP  use "applocal" approach,i.e place redistributable dlls
into the bin directory of the package(via InstallRequiredSystemLibraries
cmake module) The space overhead of libraries in negligible, ~ 3MB unpacked.

There are 2 cases, where we still link C runtime statically

- Upgrade wizard, it uses MFC, and we link statically to avoid
redistribute also whole MFC (for this single application, does not
make much sense).

- MSI installer's custom action dll wixca.dll.Here, we need static link
so that MSI won't fail on a target system that does not have VC++2015
runtime already installed.
2018-10-09 08:42:48 +01:00
Marko Mäkelä
43ee6915fa Merge 10.2 into 10.3 2018-10-09 09:11:30 +03:00
Vladislav Vaintroub
753117fed0 AWS KMS plugin : more detailed message when API calls fail.
Output API function name, exception name, exception text
2018-10-03 23:59:08 +02:00
Marko Mäkelä
1bf3e8ab43 Merge 10.3 into 10.4 2018-09-11 21:31:03 +03:00
Marko Mäkelä
2f4c391958 Merge 10.2 into 10.3 2018-09-06 22:35:45 +03:00
Marko Mäkelä
206528f722 Merge 10.1 into 10.2 2018-08-31 15:10:02 +03:00
Alexey Botchkov
c933970974 MDEV-16665 ed25519 describes itself as 1.0-alpha even though it's not alpha.
Plugin version name fixed.
2018-08-30 15:57:22 +04:00
Alexey Botchkov
2ad51a0bd8 MDEV-17095 pam_user_map module throws syntax error if group name contains backslash.
Let '\\' and '/' symbols to be part of a group name.
2018-08-30 14:51:15 +04:00
Marko Mäkelä
734db318ac Merge 10.3 into 10.4 2018-08-16 10:08:30 +03:00
Sergei Golubchik
456517b88e compiler warnings 2018-08-12 11:37:43 +02:00
Sergei Golubchik
675e7e7dcc remove obsolete checks for -fno-implicit-templates
we stopped using -fno-implicit-templates many years ago
2018-08-12 11:37:43 +02:00
Alexey Botchkov
25410d448d MDEV-15473 Isolate/sandbox PAM modules, so that they can't crash the server.
mysql_install_db.sh script fixed.
2018-07-14 23:06:49 +04:00
Oleksandr Byelkin
aa01f51bde Fix of feedback plugin.
Assign "SELECT" to the table before it usage.
2018-07-06 16:26:19 +02:00
Alexey Botchkov
efba0b1df5 MDEV-15473 Isolate/sandbox PAM modules, so that they can't crash the server.
New version of PAM plugin (v2.0) added along with the old v1.0.
There the pam module is isolated in the auth_pam_tool application so
cannot crash the server.
2018-07-03 15:49:34 +04:00
Alexander Barkov
e61568ee93 Merge remote-tracking branch 'origin/10.3' into 10.4 2018-07-03 14:02:05 +04:00
Sergei Golubchik
36e59752e7 Merge branch '10.2' into 10.3 2018-06-30 16:39:20 +02:00
Sergei Golubchik
1dd3c8f8ba Merge branch '10.1' into 10.2 2018-06-28 22:46:12 +02:00
Sergei Golubchik
16c14d7ba0 mark ed25519 stable 2018-06-28 15:46:57 +02:00
Sergei Golubchik
df704b5a1b don't use my_error(0) or my_printf_error(0)
there's an assert that catches it
2018-06-21 10:15:27 +02:00
Sergei Golubchik
ced6638773 mysys: ME_ERROR_LOG_ONLY flag 2018-06-04 12:32:23 +02:00
Sergei Golubchik
c9061d1102 mysys: rename ME_xxx flags to match plugin api 2018-06-04 12:32:23 +02:00
Marko Mäkelä
15419a5583 Merge 10.2 into 10.3 2018-05-12 22:14:59 +03:00
Eugene Kosov
fe10bf870c MDEV-15893 Rename VTQ to TRT 2018-05-12 10:16:46 +02:00
Marko Mäkelä
82f0dc35aa Merge 10.1 into 10.2 2018-05-11 18:33:58 +03:00
Alexey Botchkov
dab4abbb09 MDEV-15480 Audit plugin does not respect QUERY_DML for audit plugin.
QUERY_DML_NO_SELECT flag added.
2018-05-10 19:23:35 +04:00
Alexey Botchkov
3cbfe8cc47 MDEV-15480 Audit plugin does not respect QUERY_DML for audit plugin.
QUERY_DML_NO_SELECT flag added.
2018-05-10 19:17:06 +04:00
Alexey Botchkov
318097bb8f MDEV-15480 Audit plugin does not respect QUERY_DML for audit plugin.
QUERY_DML_NO_SELECT flag added.
2018-05-10 19:00:54 +04:00
luz.paz
3dd01669b4 Misc. typos
Found via `codespell -i 3 -w --skip="./debian/po" -I ../mariadb-server-word-whitelist.txt  ./cmake/ ./debian/ ./Docs/ ./include/ ./man/ ./plugin/ ./strings/`
2018-04-05 15:26:57 +04:00
Sergei Golubchik
b1818dccf7 Merge branch '10.2' into 10.3 2018-03-28 17:31:57 +02:00
Sergei Golubchik
c764bc0a78 Merge branch '10.1' into 10.2 2018-03-25 13:02:52 +02:00
Alexey Botchkov
0b74a1fa64 MDEV-14533 Provide information_schema tables using which hardware
information can be obtained.

plugin only enabled for Linux, as it fails building on BSD/MacOSX.
disks.test fixed.
2018-03-24 00:37:38 +04:00
Alexey Botchkov
3b644ac1f7 MDEV-14533 Provide information_schema tables using which hardware
information can be obtained.

disks.test moved to plugin's directory.
2018-03-24 00:30:28 +04:00
Sergei Golubchik
b6e2973ee6 MDEV-14533 Provide information_schema tables using which hardware information can be obtained.
update README, use maria_declare_plugin(), specify the author.
2018-03-23 00:55:19 +01:00
Alexey Botchkov
f5b2761c70 MDEV-10871 Add logging capability to pam_user_map.c.
The 'debug' option implemented for the pam_user_map.so.
2018-03-23 00:18:21 +04:00
Marko Mäkelä
3d7915f000 Merge 10.1 into 10.2 2018-03-21 22:58:52 +02:00
Alexey Botchkov
9652038453 MDEV-14533 Provide information_schema tables using which hardware
information can be obtained.

        DISKS plugin implementation added to the tree.
2018-03-21 12:33:38 +04:00
Alexander Barkov
583eb96c24 MDEV-11952 Oracle-style packages: stage#5
- CREATE PACKAGE [BODY] statements are now
  entirely written to mysql.proc with type='PACKAGE' and type='PACKAGE BODY'.
- CREATE PACKAGE BODY now supports IF NOT EXISTS
- DROP PACKAGE BODY now supports IF EXISTS
- CREATE OR REPLACE PACKAGE [BODY] is now supported
- CREATE PACKAGE [BODY] now support the DEFINER clause:

    CREATE DEFINER user@host PACKAGE pkg ... END;
    CREATE DEFINER user@host PACKAGE BODY pkg ... END;

- CREATE PACKAGE [BODY] now supports SQL SECURITY and COMMENT clauses, e.g.:

    CREATE PACKAGE p1 SQL SECURITY INVOKER COMMENT "comment" AS ... END;

- Package routines are now created from the package CREATE PACKAGE BODY
  statement and don't produce individual records in mysql.proc.

- CREATE PACKAGE BODY now supports package-wide variables.
  Package variables can be read and set inside package routines.
  Package variables are stored in a separate sp_rcontext,
  which is cached in THD on the first packate routine call.

- CREATE PACKAGE BODY now supports the initialization section.

- All public routines (i.e. declared in CREATE PACKAGE)
  must have implementations in CREATE PACKAGE BODY

- Only public package routines are available outside of the package

- {CREATE|DROP} PACKAGE [BODY] now respects CREATE ROUTINE and ALTER ROUTINE
  privileges

- "GRANT EXECUTE ON PACKAGE BODY pkg" is now supported

- SHOW CREATE PACKAGE [BODY] is now supported

- SHOW PACKAGE [BODY] STATUS is now supported

- CREATE and DROP for PACKAGE [BODY] now works for non-current databases

- mysqldump now supports packages

- "SHOW {PROCEDURE|FUNCTION) CODE pkg.routine" now works for package routines

- "SHOW PACKAGE BODY CODE pkg" now works (the package initialization section)

- A new package body level MDL was added

- Recursive calls for package procedures are now possible

- Routine forward declarations in CREATE PACKATE BODY are now supported.

- Package body variables now work as SP OUT parameters

- Package body variables now work as SELECT INTO targets

- Package body variables now support ROW, %ROWTYPE, %TYPE
2018-02-25 21:08:19 +04:00
Vladislav Vaintroub
56e7b7eaed Make possible to use clang on Windows (clang-cl)
-DWITH_ASAN can be used as well now, on x64

Fix many clang-cl warnings.
2018-02-20 21:17:36 +00:00
Marko Mäkelä
b006d2ead4 Merge bb-10.2-ext into 10.3 2018-02-15 10:22:03 +02:00
Alexander Barkov
3cad31f2a7 Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext 2018-02-08 19:06:25 +04:00
Vladislav Vaintroub
53476abce8 Windows, compiling : use /permissive- switch to improve conformance
fix a couple "initialization skipped by goto" and other new errors.
2018-02-07 20:22:30 +00:00
Vladislav Vaintroub
282b652028 Windows, compiling : reenable warning C4996 (deprecated functions)
But set _CRT_NONSTDC_NO_WARNINGS to silence silly warnings about
ANSI C function being non-standard

Remove now deprecated GetVersion()/GetVersionEx(),except single case
where where it is really needed, in feedback plugin. Remove checks for
Windows NT.

Avoid old IPv4-only inet_aton, which generated the warning.
2018-02-07 20:17:38 +00:00
Vladislav Vaintroub
d995dd2865 Windows : reenable warning C4805 (unsafe mix of types in bool operations) 2018-02-07 20:12:12 +00:00
Sergei Golubchik
4771ae4b22 Merge branch 'github/10.1' into 10.2 2018-02-06 14:50:50 +01:00
Vladislav Vaintroub
502e2445e6 Fix warnings 2018-02-06 14:22:15 +01:00
Vladislav Vaintroub
6c279ad6a7 MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from 'size_t' to 'type', possible loss of data)
Handle string length as size_t, consistently (almost always:))
Change function prototypes to accept size_t, where in the past
ulong or uint were used. change local/member variables to size_t
when appropriate.

This fix excludes rocksdb, spider,spider, sphinx and connect for now.
2018-02-06 12:55:58 +00:00
Vladislav Vaintroub
27733c8b12 auth_gssapi - fix test result and let the test run on Windows buildbot 2018-02-01 12:50:58 +00:00
Monty
a7e352b54d Changed database, tablename and alias to be LEX_CSTRING
This was done in, among other things:
- thd->db and thd->db_length
- TABLE_LIST tablename, db, alias and schema_name
- Audit plugin database name
- lex->db
- All db and table names in Alter_table_ctx
- st_select_lex db

Other things:
- Changed a lot of functions to take const LEX_CSTRING* as argument
  for db, table_name and alias. See init_one_table() as an example.
- Changed some function arguments from LEX_CSTRING to const LEX_CSTRING
- Changed some lists from LEX_STRING to LEX_CSTRING
- threads_mysql.result changed because process list_db wasn't always
  correctly updated
- New append_identifier() function that takes LEX_CSTRING* as arguments
- Added new element tmp_buff to Alter_table_ctx to separate temp name
  handling from temporary space
- Ensure we store the length after my_casedn_str() of table/db names
- Removed not used version of rename_table_in_stat_tables()
- Changed Natural_join_column::table_name and db_name() to never return
  NULL (used for print)
- thd->get_db() now returns db as a printable string (thd->db.str or "")
2018-01-30 21:33:55 +02:00
Alexander Barkov
c7a2f23a7b Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3 2018-01-29 12:44:20 +04:00
Monty
84514ec643 Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
Conflicts:
	sql/table.cc
2018-01-27 15:20:01 +02:00
Vladislav Vaintroub
9891ee5a2a Fix and reenable Windows compiler warning C4800 (size_t conversion). 2018-01-26 10:37:46 +00:00
Sergei Golubchik
d20d7a92c0 make versioning plugin more clearly a test-only thing
rename to test_versioning
set maturity to experimental
2018-01-09 15:29:43 +03:00
Aleksey Midenkov
5c0a19c873 System Versioning 1.0 pre7
Merge branch '10.3' into trunk
2017-12-21 11:16:42 +03:00
Monty
2e53b96a0a Moved semisync from a plugin to normal server
Part of MDEV-13073 AliSQL Optimize performance of semisync

Did the following renames to match other similar variables
key_ss_mutex_LOCK_binlog_       > key_LOCK_bing
key_ss_cond_COND_binlog_send_  -> key_COND_binlog_send
COND_binlog_send_              -> COND_binlog_send
LOCK_binlog_                   -> LOCK_binlog

debian/mariadb-server-10.2.install does not install semisync libs.
2017-12-18 13:43:36 +02:00
Aleksey Midenkov
1668efb722 MDEV-14645: AS OF TIMESTAMP is misused as TRX_ID [fixes #396] 2017-12-14 18:14:21 +03:00
Aleksey Midenkov
79dd77e6ae System Versioning 1.0 pre3
Merge branch '10.3' into trunk
2017-12-11 15:43:41 +03:00
Monty
68cd543539 Search for galera libraries also in /usr/lib64/galera-3
This is where Codership's offical rpm's puts them
2017-12-08 11:38:22 +02:00
Monty
60df17e95a Remove compiler warnings 2017-12-03 13:58:36 +02:00
Aleksey Midenkov
33085349e9 IB, SQL: removed VTQ, added TRT on SQL layer [closes #305] 2017-11-15 00:22:10 +03:00
Aleksey Midenkov
497c6add88 System Versioning pre1.0
Merge branch '10.3' into trunk
2017-11-13 19:09:46 +03:00
Marko Mäkelä
a48aa0cd56 Merge bb-10.2-ext into 10.3 2017-11-10 16:12:45 +02:00
Monty
0bb0d52221 Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
Conflicts:
	mysql-test/r/cte_recursive.result
	mysql-test/r/derived_cond_pushdown.result
	mysql-test/t/cte_recursive.test
	mysql-test/t/derived_cond_pushdown.test
	sql/datadict.cc
	sql/handler.cc
2017-11-09 23:21:41 +02:00
Marko Mäkelä
843e4508c0 Merge 10.1 into 10.2 2017-11-07 23:02:39 +02:00
Aleksey Midenkov
d8d7251019 System Versioning pre0.12
Merge remote-tracking branch 'origin/archive/2017-10-17' into 10.3
2017-11-07 00:37:49 +03:00
Alexey Botchkov
6ceb49a941 MDEV-13921 Audit log writes invalid SQL if single-line comments are
present.

        thread_pool_server_audit.test fixed.
        plugin version updated.
2017-11-03 22:43:51 +04:00
Alexey Botchkov
1394ea6965 MDEV-13921 Audit log writes invalid SQL if single-line comments are
present.

        thread_pool_server_audit.test fixed.
        plugin version updated.
2017-11-03 22:40:44 +04:00
Alexey Botchkov
c64a697bba MDEV-13921 Audit log writes invalid SQL if single-line comments are
present.

        thread_pool_server_audit.test fixed.
        plugin version updated.
2017-11-03 22:36:58 +04:00
Alexey Botchkov
3a3f1328fe MDEV-13921 Audit log writes invalid SQL if single-line comments are
present.

        Escape special characters (like \r \n \t) instead of
        replacing them with spaces.
2017-11-03 17:15:55 +04:00
Alexey Botchkov
04daf30e9b MDEV-13921 Audit log writes invalid SQL if single-line comments are
present.

        Escape special characters (like \r \n \t) instead of
        replacing them with spaces.
2017-11-03 17:10:36 +04:00
Alexey Botchkov
2e964b233b MDEV-13921 Audit log writes invalid SQL if single-line comments are
present.

        Escape special characters (like \r \n \t) instead of
        replacing them with spaces.
2017-11-03 17:05:41 +04:00
Alexander Barkov
835cbbcc7b Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3
TODO: enable MDEV-13049 optimization for 10.3
2017-10-30 20:47:39 +04:00
Alexander Barkov
003cb2f424 Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext 2017-10-30 16:42:46 +04:00
Sergei Golubchik
e0a1c745ec Merge branch '10.1' into 10.2 2017-10-24 14:53:18 +02:00
Sergei Golubchik
9d2e2d7533 Merge branch '10.0' into 10.1 2017-10-22 13:03:41 +02:00
Sergei Golubchik
da4503e956 Merge branch '5.5' into 10.0 2017-10-18 15:14:39 +02:00
Alexander Barkov
30e7d6709f Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext 2017-10-18 14:11:55 +04:00
Sergei Golubchik
d76f5774fe MDEV-13459 Warnings, when compiling with gcc-7.x
mostly caused by -Wimplicit-fallthrough
2017-10-17 07:37:39 +02:00
Vladislav Vaintroub
dd85ec6f28 Update AWS C++ SDK version
This fixes some truncation warnings on Win64
2017-10-11 08:45:59 +02:00
Marko Mäkelä
2c1067166d Merge bb-10.2-ext into 10.3 2017-10-04 08:24:06 +03:00
Marko Mäkelä
61b2618d3a Merge 10.2 into bb-10.2-ext 2017-10-04 08:10:03 +03:00
Marko Mäkelä
6ca35c1428 Replace a non-ASCII character in a comment 2017-10-04 08:07:41 +03:00
Vladislav Vaintroub
4732767981 Fix Windows warnings : fix server_audit not to use my_win_open and Co
functions.

There is no reason to export IO this functionality from server, if it can
be easily implemented with CRT.

Note: for the sake of compatibility, we do not use _open() on Windows,
but open file with CreateFile, with FILE_SHARE_DELETE flag,
so it can be renamed or deleted when open. Also atomic append flag is used.
2017-10-03 19:42:16 +00:00
Alexander Barkov
8ae8cd6348 Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext 2017-10-02 22:35:13 +04:00
Vladislav Vaintroub
7354dc6773 MDEV-13384 - misc Windows warnings fixed 2017-09-28 17:20:46 +00:00
Sergei Golubchik
88adfd0cea compiler warning 2017-09-23 20:21:49 +02:00
Marko Mäkelä
e3d44f5d62 Merge bb-10.2-ext into 10.3 2017-09-21 08:12:19 +03:00
Marko Mäkelä
fc3b1a7d2f Merge 10.2 into bb-10.2-ext 2017-09-20 17:47:49 +03:00
Vicențiu Ciorbaru
2d9f5f69d4 Merge branch '10.1' into 10.2 2017-09-20 10:46:09 +03:00
Alexey Botchkov
99fbf3eb59 MDEV-13137 MySQL 5.6.23 Crashes when SET GLOBAL server_audit_logging=OFF;
The MySQL 5.6 doesn't always send the MYSQL_AUDIT_GENERAL_LOG
        notification. So we have to suppress the log_current_query()
        in this case.
2017-09-19 14:01:12 +04:00
Alexey Botchkov
389f7cdf3c MDEV-13137 MySQL 5.6.23 Crashes when SET GLOBAL server_audit_logging=OFF;
The MySQL 5.6 doesn't always send the MYSQL_AUDIT_GENERAL_LOG
        notification. So we have to suppress the log_current_query()
        in this case.
2017-09-19 13:43:36 +04:00
Alexey Botchkov
a47d16907d MDEV-13137 MySQL 5.6.23 Crashes when SET GLOBAL server_audit_logging=OFF;
The MySQL 5.6 doesn't always send the MYSQL_AUDIT_GENERAL_LOG
        notification. So we have to suppress the log_current_query()
        in this case.
2017-09-19 13:08:24 +04:00
Sergei Golubchik
7e56e9ea77 MDEV-13650 Backport fix for MDEV-13060 (crash when both AWS plugin and server_audit are loaded) to 10.1
MDEV-13060 Server Audit Plugin Crashes with AWS KMS plugin

don't do auditing if thd is NULL.

Collaterals:
* copy-paste bugs server_audit.c
2017-09-18 10:40:26 +02:00
Marko Mäkelä
ae02407ce3 Merge bb-10.2-ext into 10.3 2017-09-07 12:30:56 +03:00
Marko Mäkelä
a82ed92a6a Merge 10.2 into bb-10.2-ext 2017-09-07 12:23:58 +03:00
Marko Mäkelä
70db1e3b8a Merge 10.1 into 10.2 2017-09-06 19:28:51 +03:00
Marko Mäkelä
cd694d76ce Merge 10.0 into 10.1 2017-09-06 15:32:56 +03:00
Marko Mäkelä
7f99381288 Fix compiler warnings
metadata_lock_info_duration[]: Remove the unused variable.

Add some comments /* fall through */ to silence -Wimplicit-fallthrough
2017-09-01 15:40:49 +03:00
Marko Mäkelä
4e1fa7f63d Merge bb-10.2-ext into 10.3 2017-09-01 11:33:45 +03:00
Marko Mäkelä
6749d39a95 Merge 10.2 into bb-10.2-ext 2017-09-01 08:47:55 +03:00
Peter Shchuchkin
41d89b7da1 Added HITS column to QUERY_CACHE_INFO table
Updated qc_info tests, added new test that checks HITS is incremented.
2017-08-31 13:50:25 +04:00
Marko Mäkelä
a36c369bda Merge 10.1 into 10.2
For running the Galera tests, the variable my_disable_leak_check
was set to true in order to avoid assertions due to memory leaks
at shutdown.

Some adjustments due to MDEV-13625 (merge InnoDB tests from MySQL 5.6)
were performed. The most notable behaviour changes from 10.0 and 10.1
are the following:

* innodb.innodb-table-online: adjustments for the DROP COLUMN
behaviour change (MDEV-11114, MDEV-13613)

* innodb.innodb-index-online-fk: the removal of a (1,NULL) record
from the result; originally removed in MySQL 5.7 in the
Oracle Bug #16244691 fix
377774689b

* innodb.create-index-debug: disabled due to MDEV-13680
(the MySQL Bug #77497 fix was not merged from 5.6 to 5.7.10)

* innodb.innodb-alter-autoinc: MariaDB 10.2 behaves like MySQL 5.6/5.7,
while MariaDB 10.0 and 10.1 assign different values when
auto_increment_increment or auto_increment_offset are used.
Also MySQL 5.6/5.7 exhibit different behaviour between
LGORITHM=INPLACE and ALGORITHM=COPY, so something needs to be tested
and fixed in both MariaDB 10.0 and 10.2.

* innodb.innodb-wl5980-alter: disabled because it would trigger an
InnoDB assertion failure (MDEV-13668 may need additional effort in 10.2)
2017-08-31 09:30:40 +03:00
Eugene Kosov
b231a85200 Plugins: lost terminator in versioning plugin [fixes #248] 2017-08-30 13:43:04 +03:00
Jan Lindström
01209de763 Merge remote-tracking branch 'origin/bb-10.1-jplindst' into 10.1 2017-08-29 20:30:18 +03:00
Vladislav Vaintroub
dda40b9304 AWS Key Management : Introduce "mock" variable, available in debug build.
If this variable is set, skip actual AWS calls, and fake/mock
both generation and encryption of the keys.

The advantage of having a mock mode is that more aws_key_management tests
can be enabled on buildbot.
2017-08-28 18:28:07 +00:00
Sergei Golubchik
bb8e99fdc3 Merge branch 'bb-10.2-ext' into 10.3 2017-08-26 00:34:43 +02:00
Sergei Golubchik
27412877db Merge branch '10.2' into bb-10.2-ext 2017-08-25 10:25:48 +02:00
Michael Widenius
cc77f9882d Changed KEY names to use LEX_CSTRING 2017-08-24 01:05:53 +02:00
Sergei Golubchik
828602356c Don't include my_global.h in "pure" plugins
this partially reverts 6e56ebbb498
2017-08-24 01:05:48 +02:00
Sergei Golubchik
a6e215f221 Fix compilation warnings in plugins
* update cracklib_password_check to match the new prototype
* cannot use __attribute__((format)) for my_snprintf, because
  we support format extensions that the compiler doesn't know about.
2017-08-24 01:05:48 +02:00
Michael Widenius
4aaa38d26e Enusure that my_global.h is included first
- Added sql/mariadb.h file that should be included first by files in sql
  directory, if sql_plugin.h is not used (sql_plugin.h adds SHOW variables
  that must be done before my_global.h is included)
- Removed a lot of include my_global.h from include files
- Removed include's of some files that my_global.h automatically includes
- Removed duplicated include's of my_sys.h
- Replaced include my_config.h with my_global.h
2017-08-24 01:05:44 +02:00
Sachin Setiya
5077cc0b1a Fix Merge Error 2017-08-23 16:49:42 +05:30
Sergei Golubchik
cb1e76e4de Merge branch '10.1' into 10.2 2017-08-17 11:38:34 +02:00
Vladislav Vaintroub
0188819229 MDEV-13514 fix compilation for aws_key_management plugin 2017-08-14 17:22:18 +00:00
Vladislav Vaintroub
84008f26b3 MDEV-12469 : Update AWS SDK version to avoid gcc7 compile errors. 2017-08-11 15:26:54 +00:00
Sergei Golubchik
8e8d42ddf0 Merge branch '10.0' into 10.1 2017-08-08 10:18:43 +02:00
Vicențiu Ciorbaru
786ad0a158 Merge remote-tracking branch 'origin/5.5' into 10.0 2017-07-25 00:41:54 +03:00
Daniel Black
172e3a1bc6 MDEV-12646: Apply fixes found by Coverity static analysis tool
Inspired by: https://github.com/devexp-db/mariadb/blob/f27/mariadb-covscan-stroverflow.patch
2017-07-18 15:53:31 +02:00
Aleksey Midenkov
dcb54040bc SQL: VTQ testing iface moved to plugin [closes #224] 2017-07-07 17:52:23 +03:00
Marko Mäkelä
57fea53615 Merge bb-10.2-ext into 10.3 2017-07-07 12:39:43 +03:00
Alexander Barkov
8b2c7c9444 Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext 2017-07-07 12:43:10 +04:00
Sergei Golubchik
2bf017c210 MDEV-13060 Server Audit Plugin Crashes with AWS KMS plugin
don't do auditing if thd is NULL.

Collaterals:
* copy-paste bugs server_audit.c
* uninitialized user field when thd in NULL
2017-07-05 17:15:58 +02:00
Marko Mäkelä
1e3886ae80 Merge bb-10.2-ext into 10.3 2017-06-19 17:28:08 +03:00
Alexander Barkov
765347384a Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext 2017-06-15 15:27:11 +04:00
Marko Mäkelä
3d615e4b1a Merge branch 'bb-10.2-ext' into 10.3
This excludes MDEV-12472 (InnoDB should accept XtraDB parameters,
warning that they are ignored). In other words, MariaDB 10.3 will not
recognize any XtraDB-specific parameters.
2017-06-02 09:36:04 +03:00
Marko Mäkelä
8c81f24d1b Merge 10.1 into 10.2 2017-05-26 22:45:46 +03:00
Alexander Barkov
9bc3225642 Merge tag 'mariadb-10.2.6' into bb-10.2-ext 2017-05-26 19:32:28 +04:00
Sergei Golubchik
152aec019d MDEV-11650 plugins.cracklib_password_check, plugins.two_password_validations fail in buildbot with valgrind (Conditional jump or move depends on uninitialised value) 2017-05-24 11:59:04 +02:00
Sergei Golubchik
54caaf6848 MDEV-10940 plugins.pam still fails in buildbot with valgrind
fixed valgrind warning in a debug output
2017-05-24 11:59:03 +02:00
Marko Mäkelä
8f643e2063 Merge 10.1 into 10.2 2017-05-23 11:09:47 +03:00
Marko Mäkelä
b61700c221 Merge 10.0 into 10.1 2017-05-23 08:59:03 +03:00
Rasmus Johansson
2c69c428a7 Changing maturity to stable
Additional tests have been done and conclusion was to update maturity to stable
2017-05-22 13:33:37 +03:00
Sergei Golubchik
7c03edf2fe MDEV-6262 analyze the coverity report on mariadb
uploaded 10.0, analyzed everything with the Impact=High
(and a couple of Medium)
2017-05-19 20:26:56 +02:00
Vladislav Vaintroub
d0eb4ee96b Backport aws kms build fixes from 10.2 2017-05-18 11:01:34 +00:00
Sergei Golubchik
ccca4f43c9 MDEV-10332 support for OpenSSL 1.1 and LibreSSL
post-review fixes:
* move all ssl implementation related ifdefs/defines to one file
  (ssl_compat.h)
* work around OpenSSL-1.1 desire to malloc every EVP context by
  run-time checking that context allocated on the stack is big enough
  (openssl.c)
* use newer version of the AWS SDK for OpenSSL 1.1
* use get_dh2048() function as generated by openssl 1.1
  (viosslfactories.c)
2017-05-09 18:53:10 +02:00
Alexander Barkov
314350a722 Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3 2017-05-07 23:51:18 +04:00
Marko Mäkelä
14c6f00a9f Merge 10.1 into 10.2
Also, include fixes by Vladislav Vaintroub to the
aws_key_management plugin. The AWS C++ SDK specifically depends on
OPENSSL_LIBRARIES, not generic SSL_LIBRARIES (such as YaSSL).
2017-05-06 14:36:46 +03:00
Vladislav Vaintroub
c7d85db1c4 Fix AWS key managemennt compile error on Linux 2017-05-06 01:55:45 +02:00
Aleksey Midenkov
9e9af76eaf SQL: vers_current_time refactoring [closes #117]
* session sysvars;
* moved value parsing to set variable phase;
* renamed 'temporal_current_timestamp' to 'vers_current_time'.
2017-05-05 20:36:34 +03:00
Aleksey Midenkov
67cd92b6f4 SQL, IB: Copy history via CREATE .. SELECT [closes #157, #152] 2017-05-05 20:36:33 +03:00
Aleksey Midenkov
0e01038936 SQL: forced, hidden versioning [closes #32] 2017-05-05 20:36:30 +03:00
Vladislav Vaintroub
13752faa4d Fix compilation of aws_key_management plugin 2017-05-05 16:37:00 +00:00
Alexander Barkov
ac53b49b1b Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext 2017-05-05 16:12:54 +04:00
Sergei Golubchik
54e24fcbd5 Compile user_variables plugin statically
Recompile it for embedded.
Test it for embedded.
Promote it to Gamma
2017-04-30 14:58:11 +02:00
Vladislav Vaintroub
7bf409593e MDEV-11660 Make encryption plugins "pure"
Do not exporting mysqld entry points directly.
This is needed for mariabackup, to load encryption plugins on Windows.

All plugins are "pure" by default. To mark plugin "impure"
it should use RECOMPILE_FOR_EMBEDDED or STORAGE_ENGINE keyword.
2017-04-27 19:12:38 +02:00
Vladislav Vaintroub
db39107413 MDEV-11663 Create services for functionality used by plugins
Added service for
- encryption (AES)
- error reporting, e.g my_printf_error()
2017-04-27 19:12:38 +02:00
Alexander Barkov
79ecd75afd Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3 2017-04-24 09:54:12 +04:00
Monty
5a759d31f7 Changing field::field_name and Item::name to LEX_CSTRING
Benefits of this patch:
- Removed a lot of calls to strlen(), especially for field_string
- Strings generated by parser are now const strings, less chance of
  accidently changing a string
- Removed a lot of calls with LEX_STRING as parameter (changed to pointer)
- More uniform code
- Item::name_length was not kept up to date. Now fixed
- Several bugs found and fixed (Access to null pointers,
  access of freed memory, wrong arguments to printf like functions)
- Removed a lot of casts from (const char*) to (char*)

Changes:
- This caused some ABI changes
  - lex_string_set now uses LEX_CSTRING
  - Some fucntions are now taking const char* instead of char*
- Create_field::change and after changed to LEX_CSTRING
- handler::connect_string, comment and engine_name() changed to LEX_CSTRING
- Checked printf() related calls to find bugs. Found and fixed several
  errors in old code.
- A lot of changes from LEX_STRING to LEX_CSTRING, especially related to
  parsing and events.
- Some changes from LEX_STRING and LEX_STRING & to LEX_CSTRING*
- Some changes for char* to const char*
- Added printf argument checking for my_snprintf()
- Introduced null_clex_str, star_clex_string, temp_lex_str to simplify
  code
- Added item_empty_name and item_used_name to be able to distingush between
  items that was given an empty name and items that was not given a name
  This is used in sql_yacc.yy to know when to give an item a name.
- select table_name."*' is not anymore same as table_name.*
- removed not used function Item::rename()
- Added comparision of item->name_length before some calls to
  my_strcasecmp() to speed up comparison
- Moved Item_sp_variable::make_field() from item.h to item.cc
- Some minimal code changes to avoid copying to const char *
- Fixed wrong error message in wsrep_mysql_parse()
- Fixed wrong code in find_field_in_natural_join() where real_item() was
  set when it shouldn't
- ER_ERROR_ON_RENAME was used with extra arguments.
- Removed some (wrong) ER_OUTOFMEMORY, as alloc_root will already
  give the error.

TODO:
- Check possible unsafe casts in plugin/auth_examples/qa_auth_interface.c
- Change code to not modify LEX_CSTRING for database name
  (as part of lower_case_table_names)
2017-04-23 22:35:46 +03:00
Alexander Barkov
530396cef0 Merge remote-tracking branch 'origin/10.2' into 10.3 2017-04-22 23:49:47 +04:00
Vladislav Vaintroub
8bbeac0171 Fix AWS SDK build error on some buildbot builders.
Use older version of the SDK generally, because the newer ones break
with older cmake.

On Macs, use newer version, to fix mac specific the build error.
2017-04-20 13:39:02 +00:00
Daniel Black
9a91d743bb MDEV-12453: AWS SDK version failed to build on OSX
Update AWS SDK version from 1.0.8 to 1.0.100

Commit b64910ce27 (MDEV-12453)
enabled AWS_SDK to build correctly on buildbot.

Travis still had build faults like below despite many common elements
between the builds;

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:79:9: error: no member named 'strcoll' in the global namespace; did you mean 'strtoll'?
[ 24%] Building CXX object storage/rocksdb/CMakeFiles/rocksdblib.dir/rocksdb/db/internal_stats.cc.o
using ::strcoll;
      ~~^
/usr/include/stdlib.h:169:3: note: 'strtoll' declared here
         strtoll(const char *__str, char **__endptr, int __base);
         ^
2017-04-19 13:01:34 +02:00
Alexander Barkov
e2fc1f0ad4 Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3 2017-04-13 07:12:50 +04:00
Vladislav Vaintroub
b64910ce27 MDEV-12452 MDEV-12453 : Fix building rocksdb and aws_key_management on macOS
use  CMAKE_CXX_STANDARD to set C++11 flags  with CMake 3.1+ (apples flags are somehow different from standard clang)
port htonbe16/32/64 macros for rocksdb
use reinterpret_cast<size_t> to cast macOS's pthread_t (pointer type) to  size_t , for rocksdb
2017-04-06 18:40:12 -04:00
Alexander Barkov
3d004de31d Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3 2017-04-05 14:47:06 +04:00
Vladislav Vaintroub
6d417a0bad Fix aws_key_management compilation after mismerge
Also  do not use BUILD_BYPRODUCTS in ExternalPeoject for older cmake
2017-04-04 08:50:01 +00:00
Marko Mäkelä
6e105d7535 Merge 10.1 into 10.2 2017-04-04 07:59:25 +03:00
Alexander Barkov
15d98ddc2a Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3 2017-04-03 17:35:55 +04:00
Sergei Golubchik
e68f7402c5 Avoid TARGET_LINK_LIBRARIES() for plugins
as a plugin can be disabled, so the target doesn't necessarily exist
2017-04-01 19:32:26 +02:00
Sergei Golubchik
ac8218a0be fix Ninja builds for AWS SDK
specify BUILD_BYPRODUCTS, ninja needs it
2017-03-31 18:20:17 +02:00
Sergei Golubchik
31896aa6e2 put all aws_key_management plugin files into plugin/aws_key_management
that is, download AWS SDK there, not into the builddir root.
and .gitignore them all.
2017-03-31 18:17:53 +02:00
Vladislav Vaintroub
9de7386f6f AWS KMS plugin : Fix building in case AWS C++ SDK was preinstalled
into non-standard compiler/linker path (e.g vcpkg on Windows).

Also fix linking with static preinstalled aws c++ sdk libraries
2017-03-31 16:01:37 +00:00
Sergei Golubchik
da4d71d10d Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
Alexander Barkov
94d643ac22 Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3 2017-03-29 21:02:18 +04:00
Sergei Golubchik
a00517ac97 restore the correct linking of ed25519 plugin
* add a clarifying comment
* apply /wd4244 /wd4146 to ref10 source files, not to the library
2017-03-29 00:39:37 +02:00
Vladislav Vaintroub
b56262f696 MDEV-12328, attempt to fix windows packaging 2017-03-26 23:03:25 +00:00
Vladislav Vaintroub
716188f1d4 Fix some warnings on Windows compilation
- silence warnings in ed25519 reference implementation
- fix signed/unsigned warning in popular header item_func.h
2017-03-24 10:10:36 +01:00
Vladislav Vaintroub
854359ffc5 Fix AWS KMS plugin's compile error
Do not include base64.h, it was recently removed.
2017-03-14 20:44:25 +00:00
iangilfillan
f0ec34002a Correct FSF address 2017-03-10 18:21:29 +01:00
Sergei Golubchik
e0a03ca30a ed25519 plugin: simplify the api
various ed25519/ref10 api simplifications for our specific use case
2017-03-10 18:21:28 +01:00
Sergei Golubchik
7120118a5e MDEV-12160 Modern alternative to the SHA1 authentication plugin
ED25519 authentication plugin
2017-03-10 18:21:28 +01:00
Sergei Golubchik
269ab56f8b small plugin API related fixes
* define MYSQL_DYNAMIC_PLUGIN only for server plugins
* don't typedef my_bool in mysql.h if plugin.h has already done it
* fix the include guard in plugin.h
2017-03-10 18:21:28 +01:00
Sergei Golubchik
051851b9a6 base64 service 2017-03-10 18:21:27 +01:00
Sergei Golubchik
bd1139ad27 cleanup: generalize my_sha1.cc
move most of the code into my_sha.ic, making it independent
from the actual SHAx variant.
2017-03-10 18:21:26 +01:00
Marko Mäkelä
ad0c218a44 Merge 10.0 into 10.1
Also, implement MDEV-11027 a little differently from 5.5 and 10.0:

recv_apply_hashed_log_recs(): Change the return type back to void
(DB_SUCCESS was always returned).

Report progress also via systemd using sd_notifyf().
2017-03-09 08:53:08 +02:00
Marko Mäkelä
47396ddea9 Merge 5.5 into 10.0
Also, implement MDEV-11027 a little differently from 5.5:

recv_sys_t::report(ib_time_t): Determine whether progress should
be reported.

recv_apply_hashed_log_recs(): Rename the parameter to last_batch.
2017-03-08 11:40:43 +02:00
klemens
7be541f281 spelling fixes 2017-03-07 13:38:06 +04:00
Alexey Botchkov
30cac41c2f MDEV-11084 server_audit does not work with mysql_community 5.7.16.
Server audit plugin version updated.
2017-03-06 23:07:59 +04:00
Vicențiu Ciorbaru
1acfa942ed Merge branch '5.5' into 10.0 2017-03-03 01:37:54 +02:00
Vladislav Vaintroub
ad2e38153c AWS key management plugin: Fix search for system installed AWS SDK libs 2017-03-01 10:07:54 +00:00
Sergei Golubchik
d78d0d459d cleanup: NO_OPEN_3 was never defined 2017-02-27 12:35:10 +01:00
Alexander Barkov
b5d7fff687 Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3 2017-02-27 12:41:37 +04:00
Alexey Botchkov
1b7aae90fb MDEV-11904 Make Audit Plugin working with MySQL 8.0.
MySQL 8.0 basically inherits the 5.7 model, though some
        modeifications required for the plugin.
2017-02-20 18:22:01 +04:00
Nirbhay Choubey
74a5638a1d MDEV-11530: wsrep_info.plugin fails sporadically in buildbot
Add the warning to the global_suppressions list.
2017-02-13 18:40:24 -05:00
Sergei Golubchik
2195bb4e41 Merge branch '10.1' into 10.2 2017-02-10 17:01:45 +01:00
Vicențiu Ciorbaru
8e15768731 Merge branch '10.0' into 10.1 2017-01-16 03:18:14 +02:00
vicentiu
e9aed131ea Merge remote-tracking branch 'origin/5.5' into 10.0 2017-01-06 17:09:59 +02:00
Alexander Barkov
86209c7304 Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3 2016-12-30 15:43:08 +04:00
Sergei Golubchik
4a5d25c338 Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
Alexander Barkov
c4de14fb44 Merge remote-tracking branch 'origin/10.2' into 10.3 2016-12-27 08:19:14 +04:00
Sergey Vojtovich
8774a02364 MDEV-11227 - mysqlimport -l doesn't issue UNLOCK TABLES
Implementation of MDEV-7660 introduced unwanted incompatible change:
modifications under LOCK TABLES with autocommit enabled are rolled back on
disconnect. Previously everything was committed, because LOCK TABLES didn't
adjust autocommit setting.

This patch restores original behavior by reverting some changes done in
MDEV-7660:
- sql/sql_parse.cc: do not reset autocommit on LOCK TABLES
- sql/sql_base.cc: do not set autocommit on UNLOCK TABLES
- test cases: main.lock_tables_lost_commit, main.partition_explicit_prune,
  rpl.rpl_switch_stm_row_mixed, tokudb.nested_txn_implicit_commit,
  tokudb_bugs.db806

But it makes InnoDB tables under LOCK TABLES ... READ [LOCAL] not protected
against DML. To restore protection some changes from WL#6671 were merged,
specifically MDL_SHARED_READ_ONLY and test cases.

WL#6671 merge highlights:
- Not all tests merged.
- In MySQL LOCK TABLES ... READ acquires MDL_SHARED_READ_ONLY for all engines,
  in MariaDB MDL_SHARED_READ is always acquired first and then upgraded to
  MDL_SHARED_READ_ONLY for InnoDB only.
- The above allows us to omit MDL_SHARED_WRITE_LOW_PRIO implementation in
  MariaDB, which is rather useless with InnoDB. In MySQL it is needed to
  preserve locking behavior between low priority writes and LOCK TABLES ... READ
  for non-InnoDB engines (covered by sys_vars.sql_low_priority_updates_func).
- Omitted HA_NO_READ_LOCAL_LOCK, we rely on lock_count() instead.
- Omitted "piglets": in MariaDB stream of DML against InnoDB table may lead to
  concurrent LOCK TABLES ... READ starvation.
- HANDLER ... OPEN acquires MDL_SHARED_READ instead of MDL_SHARED in MariaDB.
- Omitted SNRW->X MDL lock upgrade for IMPORT/DISCARD TABLESPAECE under LOCK
  TABLES.
- Omitted strong locks for views, triggers and SP under LOCK TABLES.
- Omitted IX schema lock for LOCK TABLES READ.
- Omitted deadlock weight juggling for LOCK TABLES.

Full WL#6671 merge status:
- innodb.innodb-lock: fully merged
- main.alter_table: not merged due to different HANDLER solution
- main.debug_sync: fully merged
- main.handler_innodb: not merged due to different HANDLER solution
- main.handler_myisam: not merged due to different HANDLER solution
- main.innodb_mysql_lock: fully merged
- main.insert_notembedded: fully merged
- main.lock: not merged (due to no strong locks for views)
- main.lock_multi: not merged
- main.lock_sync: fully merged (partially in MDEV-7660)
- main.mdl_sync: not merged
- main.partition_debug_sync: not merged due to different HANDLER solution
- main.status: fully merged
- main.view: fully merged
- perfschema.mdl_func: not merged (no such test in MariaDB)
- perfschema.table_aggregate_global_2u_2t: not merged (didn't fail in MariaDB)
- perfschema.table_aggregate_global_2u_3t: not merged (didn't fail in MariaDB)
- perfschema.table_aggregate_global_4u_2t: not merged (didn't fail in MariaDB)
- perfschema.table_aggregate_global_4u_3t: not merged (didn't fail in MariaDB)
- perfschema.table_aggregate_hist_2u_2t: not merged (didn't fail in MariaDB)
- perfschema.table_aggregate_hist_2u_3t: not merged (didn't fail in MariaDB)
- perfschema.table_aggregate_hist_4u_2t: not merged (didn't fail in MariaDB)
- perfschema.table_aggregate_hist_4u_3t: not merged (didn't fail in MariaDB)
- perfschema.table_aggregate_thread_2u_2t: not merged (didn't fail in MariaDB)
- perfschema.table_aggregate_thread_2u_3t: not merged (didn't fail in MariaDB)
- perfschema.table_aggregate_thread_4u_2t: not merged (didn't fail in MariaDB)
- perfschema.table_aggregate_thread_4u_3t: not merged (didn't fail in MariaDB)
- perfschema.table_lock_aggregate_global_2u_2t: not merged (didn't fail in MariaDB)
- perfschema.table_lock_aggregate_global_2u_3t: not merged (didn't fail in MariaDB)
- perfschema.table_lock_aggregate_global_4u_2t: not merged (didn't fail in MariaDB)
- perfschema.table_lock_aggregate_global_4u_3t: not merged (didn't fail in MariaDB)
- perfschema.table_lock_aggregate_hist_2u_2t: not merged (didn't fail in MariaDB)
- perfschema.table_lock_aggregate_hist_2u_3t: not merged (didn't fail in MariaDB)
- perfschema.table_lock_aggregate_hist_4u_2t: not merged (didn't fail in MariaDB)
- perfschema.table_lock_aggregate_hist_4u_3t: not merged (didn't fail in MariaDB)
- perfschema.table_lock_aggregate_thread_2u_2t: not merged (didn't fail in MariaDB)
- perfschema.table_lock_aggregate_thread_2u_3t: not merged (didn't fail in MariaDB)
- perfschema.table_lock_aggregate_thread_4u_2t: not merged (didn't fail in MariaDB)
- perfschema.table_lock_aggregate_thread_4u_3t: not merged (didn't fail in MariaDB)
- sys_vars.sql_low_priority_updates_func: not merged
- include/thr_rwlock.h: not merged, rw_pr_lock_assert_write_owner and
  rw_pr_lock_assert_not_write_owner are macros in MariaDB
- sql/handler.h: not merged (HA_NO_READ_LOCAL_LOCK)
- sql/mdl.cc: partially merged (MDL_SHARED_READ_ONLY only)
- sql/mdl.h: partially merged (MDL_SHARED_READ_ONLY only)
- sql/lock.cc: fully merged
- sql/sp_head.cc: not merged
- sql/sp_head.h: not merged
- sql/sql_base.cc: partially merged (MDL_SHARED_READ_ONLY only)
- sql/sql_base.h: not merged
- sql/sql_class.cc: fully merged
- sql/sql_class.h: fully merged
- sql/sql_handler.cc: merged partially (different solution in MariaDB)
- sql/sql_parse.cc: partially merged, mostly omitted low priority write part
- sql/sql_reload.cc: not merged comment change
- sql/sql_table.cc: not merged SNRW->X upgrade for IMPORT/DISCARD TABLESPACE
- sql/sql_view.cc: not merged
- sql/sql_yacc.yy: not merged (MDL_SHARED_WRITE_LOW_PRIO, MDL_SHARED_READ_ONLY)
- sql/table.cc: not merged (MDL_SHARED_WRITE_LOW_PRIO)
- sql/table.h: not merged (MDL_SHARED_WRITE_LOW_PRIO)
- sql/trigger.cc: not merged
- storage/innobase/handler/ha_innodb.cc: merged store_lock()/lock_count()
  changes (in MDEV-7660), didn't merge HA_NO_READ_LOCAL_LOCK
- storage/innobase/handler/ha_innodb.h: fully merged in MDEV-7660
- storage/myisammrg/ha_myisammrg.cc: not merged comment change
- storage/perfschema/table_helper.cc: not merged (no MDL support in MariaDB PFS)
- unittest/gunit/mdl-t.cc: not merged
- unittest/gunit/mdl_sync-t.cc: not merged

MariaDB specific changes:
- handler.heap: different HANDLER solution, MDEV-7660
- handler.innodb: different HANDLER solution, MDEV-7660
- handler.interface: different HANDLER solution, MDEV-7660
- handler.myisam: different HANDLER solution, MDEV-7660
- main.mdl_sync: MDEV-7660 specific changes
- main.partition_debug_sync: removed test due to different HANDLER solution,
  MDEV-7660
- main.truncate_coverage: removed test due to different HANDLER solution,
  MDEV-7660
- mysql-test/include/mtr_warnings.sql: additional cleanup, MDEV-7660
- mysql-test/lib/v1/mtr_report.pl: additional cleanup, MDEV-7660
- plugin/metadata_lock_info/metadata_lock_info.cc: not in MySQL
- sql/sql_handler.cc: MariaDB specific fix for mysql_ha_read(), MDEV-7660
2016-12-21 13:18:45 +04:00
Nirbhay Choubey
da4babb86c Fix failing galera tests. 2016-12-19 15:47:01 -05:00
Alexey Botchkov
211cf9321a MDEV-11510 Audit plugin sometimes causes server to crash when using with MySQL.
MySQL has a bug failing to handle
           MYSQL_THDVAR_STR(...  PLUGIN_VAR_NOSYSVAR |
                                 PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_MEMALLOC)
        so fall back to just PLUGIN_VAR_READONLY | PLUGIN_VAR_MEMALLOC
        whem MySQL started.
2016-12-16 18:37:11 +04:00
Sergey Vojtovich
8f9999b5fc MDEV-11212 - Clean-up MariaDB atomic operations
Removed my_atomic_initialize(): it doesn't make sense anymore.
2016-12-13 16:38:20 +04:00
Nirbhay Choubey
cf29e8c55b wsrep_info plugin: Fix test case 2016-11-14 11:02:57 -05:00
Vladislav Vaintroub
6ae3dd6fb4 AWS Key management plugin does not build on Centos7.
Building AWS C++ SDK as external project needs CMake 2.8.12
Centos7  out of the box has 2.8.11, thus the build fails.

Fixed check for required CMake version.
2016-11-09 00:10:45 +01:00
Nirbhay Choubey
491f42d50d Fix/disable some failing galera tests. 2016-11-07 11:53:59 -05:00
Nirbhay Choubey
fa4fa0ab90 Make galera test suites default. 2016-11-02 09:45:43 -04:00
Sergey Vojtovich
71e11bce34 MDEV-8791 - AIX: Unresolved Symbols during linking
Clean-up nolock.h: it doesn't serve any purpose anymore. Appropriate code moved
to x86-gcc.h and my_atomic.h.

If gcc sync bultins were detected, we want to make use of them independently of
__GNUC__ definition. E.g. XLC simulates those, but doesn't define __GNUC__.

HS/Spider: According to AIX manual alloca() returns char*, which cannot be
casted to any type with static_cast. Use explicit cast instead.

MDL: Removed namemangling pragma, which didn't let MariaDB build with XLC.

WSREP: _int64 seem to be conflicting name with XLC, replaced with _integer64.

CONNECT: RTLD_NOLOAD is GNU extention. Removed rather meaningless check if
library is loaded. Multiple dlopen()'s of the same library are permitted,
and it never gets closed anyway. Except for error, which was a bug: it may
close library, which can still be referenced by other subsystems.

InnoDB: __ppc_get_timebase() is GNU extention. Only use it when __GLIBC__ is
defined.

Based on contribution by flynn1973.
2016-10-31 12:18:23 +04:00
Vladislav Vaintroub
c1bbedbd4a AWS key Management plugin - add plugin variable for the region
AWS C++ SDK always defaults region to us-east-1 for clientConfiguration
(ignoring config file or env.variable)

This patch introduces a plugin variable 'region' to make it usable
for master keys created in regions other than 'us-east-1'.
2016-10-28 20:43:32 +02:00
Monty
7b96416f3c Use sql_mode_t for sql_mode.
This fixed several cases where we where using just ulong for sql_mode
2016-10-05 01:11:08 +03:00
Sergei Golubchik
2ede40e67e Merge branch '10.0' into 10.1 2016-09-29 12:59:51 +02:00
Sergei Golubchik
a3f11f7549 Merge branch '5.5' into 10.0 2016-09-29 12:31:46 +02:00
Sergei Golubchik
794c826244 MDEV-10890 plugins.pam fails in buildbot with valgrind
initialize uninitialized value
2016-09-28 17:56:01 +02:00
Sergei Golubchik
66d9696596 Merge branch '10.0' into 10.1 2016-09-28 17:55:28 +02:00
Vladislav Vaintroub
0e76054b7b Feedback plugin : add support for Windows 10 / Server 2016.
Also add fallback version string for unknown future versions.
2016-09-28 12:52:01 +00:00
Vicențiu Ciorbaru
0e472236ce Make sure to recompile the feedback plugin for EMBEDDED
On OS X with clang 7.3.0 running any test as embedded crashes. As
libfeedback was not compiled with embedded, we had 2 notions of THD,
with different number of members. When calling inline functions defined in
sql_class.h, the functions were defined for 1 THD but called on an
object that is different. This resulted in erroneous data being returned
and shortly after, a crash within the alloc_query() function.

Recompile the feedback plugin for the embedded server specifically to
not have such symbol conflicts.
2016-09-27 17:38:47 +02:00
Oleksandr Byelkin
e226276950 MDEV-10777: Server crashed due to query_cache_info plugin
Possible fix. Make the pluging more safe.
2016-09-27 14:11:37 +02:00
Vladislav Vaintroub
3f5aedccca MDEV-10847 Bring AWS KMS encryption plugin up-to-date with released SDK
- Library path's are different now
- New dependency on Linux libuuid
- Add calls for SDK Initialization/shutdown
- Also add request_timeout parameter, default SDK HTTPs timeout appears
to be too short in my tests
2016-09-27 11:18:24 +00:00
Sergei Golubchik
77ce4ead81 Merge branch '5.5' into 10.0 2016-09-27 09:21:19 +02:00
Jan Lindström
4e2a0c34b0 MDEV-10888: encryption.filekeys_emptyfile fails in buildbot with valgrind
Problem was that length of the filekeys file was not checked and if
length is less than OpenSSL_prefix_len uninitialized memory was
accessed.
2016-09-27 07:54:27 +03:00
Sergei Golubchik
d61e5260fb MDEV-10441 Document the server_audit_loc_info variable
fix PLUGIN_VAR_NOSYSVAR | PLUGIN_VAR_NOCMDOPT plugin thdvars to work.
use that for server_audit_loc_info
2016-09-26 17:48:08 +02:00
Sergei Golubchik
59d51f0c12 Merge branch '10.2' into bb-10.2-connector-c-integ-subm 2016-09-21 12:54:56 +02:00
Sergei Golubchik
4368efe870 valgrind failures
and a couple of collaterals:
* debugging assert in my_valgrind.h
* trivial cleanup in sql_union.cc
2016-09-21 10:03:16 +02:00
Sergei Golubchik
0aa6817e86 name clash with gnutls on on base64_encode 2016-09-12 17:51:52 +02:00
Sergei Golubchik
ed0b84a027 remove libmysql/
also disable server's client plugins when C/C has the same
2016-09-12 17:51:49 +02:00
Sergei Golubchik
06b7fce9f2 Merge branch '10.1' into 10.2 2016-09-09 08:33:08 +02:00
Sergei Golubchik
61fd38a1de update plugin maturities 2016-09-05 17:11:14 +02:00
Sergei Golubchik
6820bf9ca9 do not quote numbers in the DEFAULT clause in SHOW CREATE 2016-08-27 16:59:11 +02:00
Sergei Golubchik
ea91bb6801 MDEV-10361 Crash in pam_securid.so with auth_pam connecting from SQLyog
auth_pam: debug output
2016-08-24 20:41:26 +02:00
Sergei Golubchik
c5d73186c0 MDEV-8227 simple_password_check_minimal_length gets adjusted without a warning 2016-07-12 22:21:49 +02:00
Sergei Golubchik
932646b1ff Merge branch '10.1' into 10.2 2016-06-30 16:38:05 +02:00
Sergei Golubchik
3361aee591 Merge branch '10.0' into 10.1 2016-06-28 22:01:55 +02:00
Sergey Vojtovich
f289f3ee9c MDEV-9728 - Hard crash in metadata_lock_info
Disable output of MDL lock duration since there is no facility to retreive
it properly.
2016-06-23 12:16:20 +04:00
Sergey Vojtovich
4abeebeed7 MDEV-9728 - Hard crash in metadata_lock_info
Reverted APC based fix. APC subsystem is not ready to serve metadata_lock_info
needs.
2016-06-23 12:06:16 +04:00
Monty
838205f0bb Fixed compiler warnings and test failures found by buildbot 2016-06-22 22:04:55 +03:00
Sergei Golubchik
e167806196 compilation failures
windows: use GetProcAddress() to access internal server data structures
rhel5: CONNECT-JDBC requires at least Java 1.6
2016-06-22 16:12:50 +02:00
Sergei Golubchik
f9b5acfb0c Merge branch 'bb-10.0-serg' into 10.0 2016-06-22 10:54:19 +02:00
Sergey Vojtovich
1f761c5615 MDEV-9728 - Hard crash in metadata_lock_info
Added missing target_thd initialization when processing local thread.
2016-06-21 23:34:31 +04:00
Sergey Vojtovich
82a96926a7 MDEV-9728 - Hard crash in metadata_lock_info
metadata_lock_info plugin called MDL_context::find_ticket() to obtain lock
duration, which in turn iterates foreign thread private lists. These lists
can be updated by owner thread without protection.

Fixed by iterating threads (instead of MDL locks and tickets) and obtaining
data through APC.

Also fixed mdl_iterate_lock() to initialize iterator under prlock protection.
2016-06-21 17:04:57 +04:00
Sergei Golubchik
c081c978a2 Merge branch '5.5' into bb-10.0 2016-06-21 14:11:02 +02:00
Sergei Golubchik
95bf696d2c MDEV-9749 InnoDB receives 'Bad file descriptor' error, possibly related to feedback plugin
and
MDEV-10250 InnoDB: Error: File (unknown): 'close' returned OS error 209. Cannot continue operation"

after a failed connect() feedback plugin was continuing with the
file descriptor, trying to send the data (which failed) and
closing it at the end. Even though this fd might've been reused for
something else already.
2016-06-20 15:49:00 +02:00
Mario Weigel
626a62e5cc MDEV-10214: Fix segfault when using groups in PAM user mapping plugin 2016-06-12 23:13:26 +12:00
Otto Kekäläinen
effbe7dd7b General spell fixing in comments and strings 2016-06-08 14:17:23 +03:00
Sergei Golubchik
562c1df7d9 cleanup: thread_count
move thread_count handling into THD:
* increment thread_count in THD constructor
* decrement thread_count in THD destructor
* never modify thread_count directly!
2016-06-04 09:06:00 +02:00
Monty
89685d55d7 Reuse THD for new user connections
- To ensure that mallocs are marked for the correct THD, even if it's
  allocated in another thread, I added the thread_id to the THD constructor
- Added st_my_thread_var to thr_lock_info_init() to avoid a call to my_thread_var
- Moved things from THD::THD() to THD::init()
- Moved some things to THD::cleanup()
- Added THD::free_connection() and THD::reset_for_reuse()
- Added THD to CONNECT::create_thd()
- Added THD::thread_dbug_id and st_my_thread_var->dbug_id. These are needed
  to ensure that we have a constant thread_id used for debugging with a THD,
  even if it changes thread_id (=connection_id)
- Set variables.pseudo_thread_id in constructor. Removed not needed sets.
2016-06-04 09:06:00 +02:00
Vladislav Vaintroub
683b88e66a Mark gssapi plugin as stable. No open bug reports, and no further work planned, thus stable is accurate 2016-05-28 11:46:46 +02:00
Nirbhay Choubey
9b2151f6af metadata_lock_info: Add compile time assertions
This is to ensure that the list of valid values for
METADATA_LOCK_INFO fields is always kept in sync with
the parent MDL types.
2016-05-05 09:19:39 -04:00
Sergei Golubchik
87e3e67f43 Merge branch '10.0' into 10.1 2016-05-04 15:23:26 +02:00
Vladislav Vaintroub
6345cd4418 Fix compile errors 2016-04-28 21:22:09 +02:00
Monty
636bb59034 Final fixes for Memory_used
- Change some static variables to dynamic to ensure that we don't do any memory
  allocations before server starts or stops
- Print more memory information on SIGHUP. Fixed output.
- Write out if memory was lost if run with --debug-at-exit
- Fixed wrong #ifdef in sql_cache.cc
2016-04-28 17:15:38 +03:00
Monty
fabeab7819 Cleanups
- Avoid some realloc() during startup
- Ensure that file_key_management_plugin frees it's memory early, even if
  it's linked statically.
- Fixed compiler warnings from unused variables and missing destructors
- Fixed wrong indentation
2016-04-28 16:36:02 +03:00
Monty
f6cc7f1bdc Fixed failing test cases and compiler warnings
- Fixed wait condition in kill_processlist-6619
- Updated Ssl_chiper for openssl tests
- Added supression for valgrinds when using libcrypto
- Fixed wrong argument to pthread_mutex in server_audit.c when compiling with debug
- Adding missing debug_sync_update() to debug_sync.h
- Added initializers to some variables and fixed error handling in jsonudf.cpp
- Fixed cluster_filter_unpack_varchar which doesn't have a stable index type.
- Updated compiler_warnings.supp
2016-04-25 15:37:24 +03:00
Sergey Vojtovich
072ca71d26 MDEV-9281 - Debian: the Lintian complains about "shlib-calls-exit" in handlersocket.so
MDEV-9278 - Debian: the Lintian complains about "shlib-calls-exit" in ha_spider.so

Handlersocket handles errors in a way that it aborts program execution. In most
cases it is done via abort(). One exception was host/service resolution failure,
which was aborted with exit().

As a workaround replaced this exit() with abort() for symmetry with other error
handling.
2016-04-20 18:20:31 +04:00
Sergei Golubchik
f67a2211ec Merge branch '10.1' into 10.2 2016-03-23 22:36:46 +01:00
Vicențiu Ciorbaru
16ddd1824c MDEV-9613: keyfile without any keys crashes mysqld on loading file_key_management plugin
Code was assuming that the keys file would contain at least one valid
key. This caused a Dynamic_array::at(0) call that lead to the crash.
2016-03-22 22:20:33 +02:00
Sergei Golubchik
3b0c7ac1f9 Merge branch '10.0' into 10.1 2016-03-21 13:02:53 +01:00
Sergei Golubchik
b24a04c6e0 don't do anything for AWS plugin unless it's enabled
in particular, don't do ExternalProject_Add()
that starts creating build directories for a disabled
plugin
2016-03-19 19:40:33 +01:00
Sergei Golubchik
3fdc6140a3 update plugins' maturity levels 2016-03-18 22:05:23 +01:00
Akira Higuchi
1c84836819 fix that mysqld aborts on exit if an open handlersocket connection remains 2016-03-18 14:32:18 +04:00
Akira Higuchi
4f0fc0f912 fix a memory leak in handlersocket 2016-03-18 14:32:18 +04:00
Vladislav Vaintroub
d1e6c40294 mtr complains about klist is not found, if Kerberos is not installed on machines 2016-03-17 17:58:40 +01:00
Vladislav Vaintroub
46089d7691 MDEV-9659 : AWS KMS encryption plugin 2016-03-13 20:29:14 +01:00
Otto Kekäläinen
1777fd5f55 Fix spelling: occurred, execute, which etc 2016-03-04 02:09:37 +02:00
Sergey Vojtovich
90c9641a8a MDEV-7331 - information_schema.user_variables 2016-02-26 18:35:14 +04:00
Sergey Vojtovich
804fb401ba Fixed plugins.feedback_plugin_send failure
Fixed assertion failure introduced along with MDEV-6150 (thd must be unlinked
before calling "delete thd").
2016-02-26 13:37:31 +04:00
Sergei Golubchik
00d1db7a38 Merge branch '10.1' into 10.2 2016-02-25 18:19:55 +01:00
Sergei Golubchik
a5679af1b1 Merge branch '10.0' into 10.1 2016-02-23 21:35:05 +01:00
Vladislav Vaintroub
1ac64b7510 MDEV-9557 - fix compilation errors due to missing krb5_free_unparsed_name() in old versions of Heimdal Kerberos 2016-02-16 12:55:45 +00:00
Sergei Golubchik
271fed4106 Merge branch '5.5' into 10.0 2016-02-15 22:50:59 +01:00
Vladislav Vaintroub
e1385f2083 fix buffer overrun 2016-02-15 13:02:57 +01:00
Alexey Botchkov
93e9d81efa Errorneous PSI declaration line fixed. 2016-02-12 12:04:11 +04:00
Sergei Golubchik
01628ce35a Merge branch 'bb-5.5-serg' into 5.5 2016-02-09 14:08:36 +01:00
Sergei Golubchik
f3444df415 Merge branch 'mysql/5.5' into 5.5
reverted about half of commits as either not applicable or
outright wrong
2016-02-09 11:27:40 +01:00
Alexey Botchkov
ea0c3fc87b MDEV-9438 backport feedback-http-proxy to 5.5 and 10.0.
The http-proxy option to the FEEDBACK plugin backported.
2016-02-09 05:19:56 +04:00
Monty
b3093073b1 Changed my_thread_id to int64 to fix compilation problem with
my_atomic_add32_explicit on windows
Fixed that server_audit.c also works if one compiles with safemalloc
Fixed compiler warnings
2016-02-08 22:34:41 +02:00
Monty
3d4a7390c1 MDEV-6150 Speed up connection speed by moving creation of THD to new thread
Creating a CONNECT object on client connect and pass this to the working thread which creates the THD.
Split LOCK_thread_count to different mutexes
Added LOCK_thread_start to syncronize threads
Moved most usage of LOCK_thread_count to dedicated functions
Use next_thread_id() instead of thread_id++

Other things:
- Thread id now starts from 1 instead of 2
- Added cast for thread_id as thread id is now of type my_thread_id
- Made THD->host const (To ensure it's not changed)
- Removed some DBUG_PRINT() about entering/exiting mutex as these was already logged by mutex code
- Fixed that aborted_connects and connection_errors_internal are counted in all cases
- Don't take locks for current_linfo when we set it (not needed as it was 0 before)
2016-02-07 10:34:03 +02:00
Monty
b2f8d7b410 Merge branch '10.1' into 10.2
Conflicts:
	VERSION
	cmake/plugin.cmake
	config.h.cmake
	configure.cmake
	plugin/server_audit/server_audit.c
	sql/sql_yacc.yy
2016-02-06 18:14:54 +02:00
Vladislav Vaintroub
52d695fef4 Fix authentication plugin's tests in case username contains non-alphanumeric character, e.g dash 2016-02-01 17:51:57 +01:00
Vladislav Vaintroub
3d794d0ee8 MDEV9494 Fix build for Heimdal Kerberos 2016-01-31 00:36:33 +01:00
Vladislav Vaintroub
4b31e6dc95 Address review comments, add unit test 2016-01-27 16:34:05 +01:00
Georg Richter
ef3ca5c3ba New authentication plugin for authentication via named pipe on Windows
operating systems.

The plugin gets the sid of the client process and considers the user
authenticated if the given username matches the username of this sid.
2016-01-27 16:34:05 +01:00
Sergei Golubchik
f4faac4d6a Merge branch '10.0' into 10.1 2016-01-25 22:58:57 +01:00
Sergei Golubchik
5a5f18f3f7 MDEV-9205 PAM user map plugin does not work with LDAP groups
allow more characters in a valid user/group name:
* POSIX allows dashes '-' and dots '.'
* also the name may end with a dollar sign '$'

for our purposes it's enough to allow [-.$] anywhere in the name
2016-01-25 17:04:14 +01:00
Alexey Botchkov
1793646d78 Merge branch '5.5' into 10.0
Conflicts:
	plugin/server_audit/server_audit.c
2016-01-25 16:37:08 +04:00
Robbie Harwood
42d9f3d87b Fix spelling of my name 2016-01-20 13:24:30 -05:00
Vladislav Vaintroub
67cf76ad9b MDEV 4691- address review comments 2016-01-19 11:59:32 +01:00
Alexey Botchkov
9c9d10b441 MDEV-9106 Audit plugin not working with MySQL 5.7.
fixing Windows crash.
2016-01-15 09:50:27 +04:00
Vladislav Vaintroub
55d61ec878 MDEV-4961 SSPI/GSSAPI/Kerberos authentication plugin 2016-01-14 13:31:08 +01:00
Alexey Botchkov
cdc9aa5b5b MDEV-9106 Audit Plugin doesn't run with MySQL 5.7.
MariaDB 5.5 built in debug gets unhappy with mutexes.
    Although everything is correct, some DBUG_ASSERT can happen.
    So this patch keeps safe_mutex silent.
2016-01-13 15:27:53 +04:00
Alexey Botchkov
c9552533c9 MDEV-9106 Audit plugin compiled with MariaDB can't install on MySQL 5.7.
The audit API was seriously changed in MySQL 5.7.
        so we had to adapt the plugin's code to that.
2016-01-12 18:43:55 +04:00
Ajo Robert
3d1306f7b7 Bug#21770366 backport bug#21657078 to 5.5 and 5.6
Problem Statement
=========
Fix various issues when building MySQL with Visual Studio 2015.

Fix:
=======
- Visual Studio 2015 adds support for timespec. Add check and
  related code to use this and only use our replacement if
  timespec is not defined.
- Rename lfind/lsearch to my* to avoid redefinition problems.
- Set default value for TMPDIR to "" on Windows as P_tmpdir
  no longer exists.
- using VS definition of snprintf if available
- tzname are now renamed to _tzname.
2016-01-07 14:36:19 +05:30
Alexander Barkov
2ba7ed77aa Merge remote-tracking branch 'origin/10.1' into 10.2 2015-12-29 19:37:11 +04:00
Sergei Golubchik
a2bcee626d Merge branch '10.0' into 10.1 2015-12-21 21:24:22 +01:00
Sergey Vojtovich
3402f7a853 Fixed auth_socket static compilation 2015-12-18 16:31:05 +04:00
Sergey Vojtovich
90ea014585 MDEV-8378 - Debian: the Lintian complains about many "shlib-calls-exit" in many
of the plugins

Removed exit() from daemon_example, pass error to caller instead.
Also removed unused my_abort_hook.
2015-12-16 19:39:00 +04:00
Sergei Golubchik
1623995158 Merge branch '5.5' into 10.0 2015-12-13 00:10:40 +01:00
Sergei Golubchik
abf9d35213 Merge branch 'mysql/5.5' into 5.5 2015-12-09 10:00:49 +01:00
Sergei Golubchik
859a7369c1 MDEV-9161 feedback_plugin_send in debug builds
thd->cleanup_after_query() is needed to destroy all Items
created for this query (and Item destructors free allocated
Strings).
2015-12-08 09:46:52 +01:00
Sergei Golubchik
99774f1501 feedback plugin compilation warnings 2015-12-08 09:46:51 +01:00
Sergey Vojtovich
e562b43222 MDEV-8111 - remove "fast mutexes"
They aren't faster than normal mutexes. They're disabled by default for years,
so de facto it's dead code, never used.
2015-11-26 11:34:17 +04:00
Sergei Golubchik
2fc3dc393d Merge branch '10.1' into bb-10.1-serg 2015-11-20 09:31:13 +01:00
Monty
1e156e1436 Fixed compile warnings on Solaris 2015-11-20 10:00:06 +02:00
Sergei Golubchik
beded7d9c9 Merge branch '10.0' into 10.1 2015-11-19 15:52:14 +01:00
Sergei Golubchik
2553f143fd fix feedback plugin not to crash in debug builds
feedback was bzero-ing thd->status_vars.memory_used,
but server was asserting the correct value of it
2015-11-19 10:17:40 +01:00
Sergei Golubchik
ab476a8d10 Merge branch '5.5' into 10.0 2015-11-18 22:03:02 +01:00
Sergei Golubchik
43a5090980 MDEV-9051 mysqld got signal 11, after upgrade to 10.1.8
feedback plugin needs to set tables->select_lex properly
2015-11-18 11:23:15 +01:00
Sergei Golubchik
726162989b feedback plugin debug
make it possible to change feedback plugin wait intervals
* only in debug builds
* and force the feedback report to be ignored

update the test to use this feature
2015-11-18 11:23:15 +01:00
Monty
a9cda4419b MDEV-8066 Crash on unloading semisync_master plugin
Bug was that ReplSemiSyncMaster::commitTrx() was waiting on a condition
for state to change, but didn't take into account that one could have
disabled semi-sync during the wait.
2015-11-14 00:04:29 +02:00
Vladislav Vaintroub
a430df3aba Fix compile error on Windows
Using __attribute__  needs my_attribute.h include
2015-11-10 17:47:39 +01:00
Monty
cb4737cb4e Fixed compiler warning 2015-11-10 13:46:56 +02:00
Sergei Golubchik
c4e336e01e fix the encryption.filekeys_nofile test
and move the error reporting where it belongs
2015-10-10 14:19:02 +02:00
Monty
602c803bd9 Don't enable file_key_management_plugin by default (as this gives warnings in the log)
Better warning from file_key_management plugin if filename is not given
2015-10-09 13:02:55 +03:00
Monty
c696fc74cf Fixed compiler warnings and errors 2015-10-09 13:01:07 +03:00
Alexey Botchkov
b0935fc5da MDEV-8842 add group support to pam_user_map module.
Added to the pam_user_map module.
2015-10-09 03:25:08 +05:00
Alexey Botchkov
3757bc5e89 MDEV-8431 Feedback plugin needs an option for http proxy.
'feedback_http_proxy' system variable added to specify the
proxy server as host:port. Not a dynamic one.
2015-10-09 03:23:35 +05:00
Daniel Black
d4557934ec plugin - qc_info - add Query Cache flags 2015-10-05 17:27:12 +02:00
Shishir Jaiswal
17387bc574 Bug #21467458 - UNINSTALL PLUGIN DAEMON_EXAMPLE CRASHES
MYSQLD.

DESCRIPTION
===========
Crash occurs when daemon_example plugin is uninstalled
immediately after its installed. This can be reproduced
by installing and uninstalling the plugin repeatedly.

ANALYSIS
========
The daemon_example_plugin_deinit() function of the daemon
example plugin calls pthread_cancel() but doesn't wait for
the worker thread to actually complete before deallocating
the data buffer and closing the file that it writes to.
This is causing SEGFAULT!

FIX
===
Added a pthread_join() to wait for the thread to complete
before doing the cleanup work.

Removed a stray 'x' variable from the example code.

NOTE
====
Have made an entry in .opt file as given below:
--plugin-dir=$DAEMONEXAMPLE_DIR

This is done so that the program takes plugin directory as
../<dbg>/plugin/daemon_example/ instead of
../lib/plugin/
2015-09-16 18:58:43 +05:30
Sergey Vojtovich
c69cf93bfb MDEV-8673 - [PATCH] Missing Sanity Check for strndup() in MariaDB 10.0.2x
Contributed by Bill Parker.

Added check for strndup() return value.
2015-09-16 17:24:34 +04:00