Commit graph

1088 commits

Author SHA1 Message Date
Oleksandr Byelkin
fad47df995 Merge branch '10.4' into 10.5 2020-03-11 17:52:49 +01:00
Oleksandr Byelkin
b8c0e49670 Merge commit '10.3' into 10.4 2020-03-11 13:27:10 +01:00
Alexander Barkov
a1e330de5a MDEV-21743 Split up SUPER privilege to smaller privileges 2020-03-10 23:49:47 +04:00
Sergei Golubchik
05779bc6f1 perfschema mdl related instrumentation changes 2020-03-10 19:24:22 +01:00
Sergei Golubchik
7c58e97bf6 perfschema memory related instrumentation changes 2020-03-10 19:24:22 +01:00
Alexander Barkov
e40858a7bd MDEV-17832 Protocol: extensions for Pluggable types and JSON, GEOMETRY 2020-03-10 20:43:32 +04:00
Varun Gupta
b753ac066b MDEV-21580: Allow packed sort keys in sort buffer
This task deals with packing the sort key inside the sort buffer, which  would
lead to efficient usage of the memory allocated for the sort buffer.

The changes brought by this feature are
  1) Sort buffers would have sort keys of variable length
  2) The format for sort keys inside the sort buffer would look like
     |<sort_length><null_byte><key_part1><null_byte><key_part2>.......|
      sort_length is the extra bytes that are required to store the variable
      length of a sort key.
  3) When packing of sort key is done we store the ORIGINAL VALUES inside
     the sort buffer and not the STRXFRM form (mem-comparable sort keys).
  4) Special comparison function packed_keys_comparison() is introduced
     to compare 2 sort keys.

This patch also contains contributions from Sergei Petrunia.
2020-03-10 15:09:17 +05:30
Oleksandr Byelkin
440452628d Merge branch '10.2' into 10.3 2020-03-06 23:28:26 +01:00
Andy Fiddaman
8f8cc5f4c2
Merge pull request #1434 from citrus-it/illumos-auth-socket
MDEV-21476: auth_socket: add support for illumos with getpeerucred()
2020-03-03 12:51:47 +02:00
Alexey Bychko
42b29d4133 MENT-645 Undefined symbols for architecture x86_64: _pam_syslog
added cmake checks for pam_ext.h and pam_appl.h headers
added check for pam_syslog()
added pam_syslog() if doesn't exist
all cmake checks performed from inside the plugin
2020-02-25 18:52:27 +01:00
Daniel Black
f6b9a29820 MDEV-16662: cmake remove empty INSTALL_DEBUG_TARGET
No adverse effects since this was made a null function in
6b53f9d781.

This function had the last remaining cmake CMP0026 violation.
2020-02-25 08:11:20 +01:00
Vicențiu Ciorbaru
ad17aa110c MDEV-18650: Options deprecated in previous versions - multi_range_count
Remove deprecated system variable multi_range_count. It was ignored from 5.3.
2020-02-13 13:42:01 +02:00
Vicențiu Ciorbaru
8bbcaab160 MDEV-18650: Options deprecated in previous versions - thread_concurrency
thread_concurrency was ignored since 5.5. Remove it.
2020-02-13 13:42:01 +02:00
Vicențiu Ciorbaru
45bc7574fb MDEV-18650: Options deprecated in previous versions - storage_engine
Remove usage of deprecated variable storage_engine. It was deprecated in 5.5 but
it never issued a deprecation warning. Make it issue a warning in 10.5.1.

Replaced with default_storage_engine.
2020-02-13 13:42:01 +02:00
Alexander Barkov
83e75b39b3 MDEV-21702 Add a data type for privileges 2020-02-11 08:10:26 +04:00
Marko Mäkelä
8b6cfda631 Merge 10.4 into 10.5 2020-02-07 08:51:20 +02:00
Monty
4d61f1247a Fixed compiler warnings from gcc 7.4.1
- Fixed possible error in rocksdb/rdb_datadic.cc
2020-01-29 23:23:55 +02:00
Marko Mäkelä
a983b24407 Merge 10.4 into 10.5 2020-01-28 14:17:09 +02:00
Oleksandr Byelkin
bfc24bb2ec Merge branch '10.3' into 10.4 2020-01-24 14:50:23 +01:00
Oleksandr Byelkin
ceda5f724f Merge branch '10.2' into 10.3 2020-01-24 14:16:20 +01:00
Sergei Golubchik
8870f18e1d MDEV-17292 Package the pam_user_map module 2020-01-21 10:56:47 +01:00
Oleksandr Byelkin
7753a29064 Merge branch '10.2' into 10.3 2020-01-03 13:44:16 +01:00
Jan Lindström
ef1e488be3 MDEV-13569: wsrep_info.plugin failed in buildbot with "no nodes coming from prim view
Modify configuration so that all nodes are part of galera cluster
i.e. wsrep_on=ON.
2020-01-02 08:06:23 +02:00
Aleksey Midenkov
9ed8d364cd MDEV-17554 history partitioning cleanups
* Fixed missed warning on condition boundary
* REORGANIZE cases
* vers_utils.h removed
* test cases cleanup
2019-12-03 11:53:25 +03:00
Sergei Golubchik
00c3a28820 cleanup: data type plugins
simplify type naming (less boilerplate code).
don't force a plugin to specify the name twice.
2019-10-31 11:19:39 +01:00
Sergei Golubchik
779978217c Data type plugins - minor fixes
typos, comments
2019-10-31 11:19:35 +01:00
Marko Mäkelä
2b710090aa Merge 10.4 into 10.5 2019-10-29 16:31:40 +02:00
Alexander Barkov
b62a846642 MDEV-20913 sql_mode=ORACLE: INET6 does not work as a routine parameter type and return type
Adding the missing grammar.
2019-10-29 13:33:38 +04:00
Sergei Golubchik
dadc53ff0b MDEV-19882 pam v2: auth_pam_tool truncates passwords that are not null-terminated
Don't assume that passwords (and other conv replies) are zero-terminated.
If they are, though, strndup() down below will take care of that.
2019-10-28 19:45:43 +01:00
Marko Mäkelä
658289ca53 MDEV-20844: Add missing override qualifiers
clang warns if only some overridden member functions in a class
are tagged with the C++11 override keyword. Add the missing keywords.
2019-10-28 16:22:48 +02:00
Alexander Barkov
ec171a94a3 MDEV-20844 RBR from binary(16) to inet6 fails with error 171: The event was corrupt, leading to illegal data being read
This patch changes the way how INET6 is packed to the RBR binary log:
- from fixed length 16 bytes
- to BINARY(16) compatible variable length style
  with trailing 0x00 byte compression.

This is to make INET6 fully compatible with BINARY(16) in RBR binary logs,
so RBR replication works in this scenarios:

- Old master BINARY(16) -> New slave INET6
- New master INET6      -> Old slave BINARY(16)

A new class StringPack was added to share the code between
Field_string and Field_inet6.
2019-10-18 13:15:55 +04:00
Alexander Barkov
5a052ab6b1 Part1: MDEV-20837 Add MariaDB_FUNCTION_PLUGIN
- Defining MariaDB_FUNCTION_PLUGIN
- Changing the code in /plugins/type_inet/ and /plugins/type_test/
  to use MariaDB_FUNCTION_PLUGIN instead of MariaDB_FUNCTION_COLLECTION_PLUGIN.
- Changing maturity for the INET6 data type plugin from experimental to alpha.
2019-10-16 21:40:30 +04:00
Alexander Barkov
22b645ef52 MDEV-20831 Table partitioned by LIST/RANGE COLUMNS(inet6) can be created, but not inserted into
This clause in CREATE TABLE:

  PARTITION BY LIST COLUMNS (inet6column)
    (PARTITION p1 VALUES IN ('::'))

was erroneously written to frm file as:

  PARTITION BY LIST COLUMNS(inet6column)
    (PARTITION p1 VALUES IN (_binary 0x3A3A))

I.e. the text value '::' was converted to HEX representation
and prefixed with _binary.

A simple fix could write `_latin1 0x3A3A` instead of `_binary 0x3A3A`,
but in case of INET6 we don't need neither character set introducers,
nor HEX encoding, because text representation of INET6 values consist
of pure ASCII characters.

So this patch changes the above clause to be printed as:

  PARTITION BY LIST COLUMNS(inet6column)
    (PARTITION p1 VALUES IN ('::'))

Details:

The old code in check_part_field() was not friendly to pluggable data types.
Replacing this function to two new virtual methods in Type_handler:

  virtual bool partition_field_check(const LEX_CSTRING &field_name,
                                     Item *item_expr) const;

  virtual bool partition_field_append_value(String *str,
                                            Item *item_expr,
                                            CHARSET_INFO *field_cs,
                                            partition_value_print_mode_t mode)
                                            const;

so data type plugins can decide whether they need to use character set
introducer and/or hex encoding when printing partition values.
2019-10-15 15:30:18 +04:00
Alexander Barkov
8ec978142b MDEV-20822 INET6 crashes in combination with RBR extended metadata
The code erroneously assumed that only Field_str descendants can
store character set information. After adding Field_inet6, it's
not true anymore.

Also, after adding Field_inet6, storing field->charset() become not correct either:
- Field_inet6::charset() return &my_charset_latin1,
  because clients see INET6 as VARCHAR(39).
- Field_inet6::binlog_type_info().m_cs returns &my_charset_bin
  because storage engines see INET6 as BINARY(16).

We need to store &my_charset_bin to the binlog metadata,
so the slave sees INET6 as BINARY(16), like storage engines do,
to make the slave treat the replicated data as binary IPv6 address
representation (rather than text representation).

The correct character set that needs to be stored to the metadata
is already populated to binlog_type_info_array[i].m_cs. So the
fixed code version uses this value rather than field->charset().
2019-10-14 18:33:31 +04:00
Alexander Barkov
a11694b80d MDEV-20826 Wrong result of MIN(inet6) with GROUP BY
Type_handler_inet6::is_val_native_ready() was not overriden and
returned "false" by default, so Item_sum_min_max::update_field()
erroneously went through the min_max_update_str_field() rather than
min_max_update_native_field() execution path. As a result '8888::'
was compared to 'fff::' in string format (rather than INET6 binary format)
and gave "less" instead of "greater".

Adding the forgotten overriding method returning "true".
2019-10-14 18:26:25 +04:00
Alexander Barkov
5392726e3c MDEV-20818 ER_CRASHED_ON_USAGE or Assertion `length <= column->length' failed in write_block_record on temporary table
The patch for `MDEV-20795 CAST(inet6 AS BINARY) returns wrong result`
unintentionally changed what Item_char_typecast::type_handler()
returns. This broke UNIONs with the BINARY() function, as the Aria
engine started to get columns of unexpected data types.

Restoring previous behaviour, to return
  Type_handler::string_type_handler(max_length).

The prototype for Item_handed_func::return_type_handler() has changed
from:
  const Type_handler *return_type_handler() const
to:
  const Type_handler *return_type_handler(const Item_handled_func *) const
2019-10-14 08:21:08 +04:00
Alexander Barkov
9853026cec MDEV-20800 Server crashes in Field_inet6::store_warning upon updating table statistics
Suppress warnings when Field_inet6::store() is called from
read_statistics_for_table() and other optimizer related routines.

This patch does for Field_inet6 the same thing with what Monty's
patch previously did for other Field_xxx:

> commit 1bbe8c5e0f
> Author: Michael Widenius <monty@mariadb.org>
> Date:   Sun Sep 22 04:08:48 2019 +0300
>
>    Proper fix for disabling warnings in read_statistics_for_table().
>    MDEV-20589: Server still crashes in Field::set_warning_truncated_wrong_value

Alas, some meaningful warnings disappeared.
2019-10-13 23:07:48 +04:00
Alexander Barkov
2cb7047f69 Removing redundant --source include/have_innodb.inc from type_inet6_{memory|myisam}.test
These tests use only HEAP and MyISAM tables.
2019-10-13 22:01:46 +04:00
Alexander Barkov
93cf67fda8 Adding the "override" keyword to Item_char_typecast_func_handler_inet6_to_binary::type_handler_for_create_select()
Clang fails to compile without it.
2019-10-13 18:32:48 +04:00
Alexander Barkov
6860d6f8be Fixing a mysqld crash on Ubuntu-10.2 (Quantal) 2019-10-12 15:28:40 +04:00
Alexander Barkov
530f3f7cfc MDEV-20806 Federated does not work with INET6, returns NULL with warning ER_TRUNCATED_WRONG_VALUE 2019-10-12 07:25:53 +04:00
Alexander Barkov
a0d3a351b8 MDEV-20790 CSV table with INET6 can be created and inserted into, but cannot be read from 2019-10-11 22:51:01 +04:00
Alexander Barkov
5d6d28f274 MDEV-20798 Conversion from INET6 to other types performed without errors or warnings 2019-10-11 22:19:30 +04:00
Alexander Barkov
d8e599bb80 MDEV-20808 CAST from INET6 to FLOAT does not produce an error 2019-10-11 20:12:24 +04:00
Alexander Barkov
b5fae7f743 MDEV-20795 CAST(inet6 AS BINARY) returns wrong result 2019-10-11 14:50:11 +04:00
Marko Mäkelä
d04f2de80a Merge 10.4 into 10.5 2019-10-11 08:41:36 +03:00
Alexander Barkov
312ba3cc3d MDEV-20783 INET6 cannot be converted to BINARY(16) 2019-10-10 08:12:14 +04:00
Alexander Barkov
b37386d854 MDEV-20785 Converting INET6 to CHAR(39) produces garbage without a warning 2019-10-09 22:25:58 +04:00
Alexander Barkov
c78ae293b4 Adding missing "override" keywords, to make clang happy. 2019-10-09 13:39:27 +04:00
Alexander Barkov
6ea5c2b5b6 MDEV-274 The data type for IPv6/IPv4 addresses in MariaDB 2019-10-08 23:42:02 +04:00