1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-11 15:22:09 +03:00
Commit Graph

507 Commits

Author SHA1 Message Date
18ddde4826 Merge branch '11.1' into 11.2 2023-08-18 00:59:16 +02:00
f5fae75652 Merge branch '11.0' into 11.1 2023-08-09 08:25:14 +02:00
51f9d62005 Merge branch '10.11' into 11.0 2023-08-09 07:53:48 +02:00
ced243a099 Merge branch '10.9' into 10.10 2023-08-05 20:34:09 +02:00
34a8e78581 Merge branch '10.6' into 10.9 2023-08-04 08:01:06 +02:00
5de39c5ae3 MDEV-9069 extend AES_ENCRYPT() and AES_DECRYPT() to support IV and the algorithm
AES_ENCRYPT(str, key, [, iv [, mode ]])
AES_DECRYPT(str, key, [, iv [, mode ]])

mode is aes-{128,192,256}-{ecb,cbc,ctr} e.g. "aes-128-cbc".

and a @@block_encryption_mode variable for the default value of mode

change in behavior: AES_ENCRYPT(str, key) can no longer
be used in persistent virtual columns (and alike)
2023-08-02 13:29:48 +02:00
6bf8483cac Merge branch '10.5' into 10.6 2023-08-01 15:08:52 +02:00
49088c914b MDEV-26182: Implement JSON_INTERSECT()
The idea is to have simple functions that the user can combine to produce
the exact result one wants, whether the user wants JSON object that has
common keys with another JSON object, or same key/value pair etc. So
making simpler function helps here.

We accomplish this by making three separate functions.
1) JSON_OBJECT_FILTER_KEYS(Obj, Arr_keys):
Put keys ( which are basically strings ) in hash, go over the object and
get key one by one. If the key is present in the hash,
add the key-value pair to result.

2) JSON_OBJECT_TO_ARRAY(Obj) : Create a string variable, Go over the json
object, and add each key value pair as an array into the result.

3) JSON_ARRAY_INTERSECT(arr1, arr2) :
Go over one of the json and add each item of the array
in hash (after normalizing each item). Go over the second array,
search the normalized item one by one in the hash. If item is found,
add it to the result.

Implementation Idea: Holyfoot ( Alexey Botchkov)
Author: tanruixiang and Rucha Deodhar
2023-07-24 12:11:36 +05:30
15a7b6c0b7 MDEV-30145: JSON_TABLE: allow to retrieve the key when iterating on JSON
objects

Idea behind implementation:
We get the json object specified by the json path. Then, transform it into
key-value pairs by going over the json. Get each key-value pair
one-by-one and return the result.
2023-07-24 12:11:36 +05:30
f52954ef42 Merge commit '10.4' into 10.5 2023-07-20 11:54:52 +02:00
e704a13b32 Merge 10.9 into 10.10 2023-06-08 11:22:12 +03:00
223c2c5b9d Merge 10.6 into 10.9 2023-06-08 10:46:19 +03:00
78b1831c9f Merge branch '10.4' into 10.4.30 2023-06-07 15:08:29 +02:00
cbabb95915 Merge branch '11.0' into 11.1 2023-06-05 20:15:15 +02:00
0005f2f06c Merge branch 'bb-10.11-release' into bb-11.0-release 2023-06-05 19:27:00 +02:00
30bba8e275 Merge branch 'github/bb-10.9-release' into bb-10.10-release 2023-06-05 18:59:43 +02:00
33fd519ca7 Merge branch 'github/bb-10.6-release' into bb-10.9-release 2023-06-05 18:55:26 +02:00
a42a6fa99b Merge branch 'bb-10.5-release' into bb-10.6-release 2023-06-05 18:53:02 +02:00
bed70468ea Merge branch 'bb-10.4-release' into bb-10.5-release 2023-06-05 17:50:51 +02:00
0fd54c9892 Revert "MDEV-30473 : Do not allow GET_LOCK() / RELEASE_LOCK() in cluster"
This reverts commit 844ddb1109.

This fixes MDEV-30967, MDEV-31325, MDEV-31388
2023-06-03 10:39:34 +02:00
01ea779149 MDEV-31174 New class Native_functions_hash 2023-05-03 17:28:12 +04:00
358b8495f5 MDEV-27128: Implement JSON Schema Validation FUNCTION
Implementation:
Implementation is made according to json schema validation draft 2020

JSON schema basically has same structure as that of json object, consisting
of key-value pairs. So it can be parsed in the same manner as
any json object.

However, none of the keywords are mandatory, so making guess about the
json value type based only on the keywords would be incorrect.
Hence we need separate objects denoting each keyword.

So during create_object_and_handle_keyword() we create appropriate objects
based on the keywords and validate each of them individually on the json
document by calling respective validate() function if the type matches.
If any of them fails, return false, else return true.
2023-04-26 11:00:08 +05:30
c2b6916393 MDEV-19629 post-merge fixes
* it isn't "pfs" function, don't call it Item_func_pfs,
  don't use item_pfsfunc.*
* tests don't depend on performance schema, put in the main suite
* inherit from Item_str_ascii_func
* use connection collation, not utf8mb3_general_ci
* set result length in fix_length_and_dec
* do not set maybe_null
* use my_snprintf() where possible
* don't set m_value.ptr on every invocation
* update sys schema to use the format_pico_time()
* len must be size_t (compilation error on Windows)
* the correct function name for double->double is fabs()
* drop volatile hack
2023-03-27 21:27:27 +02:00
d9808f79de MDEV-19629: format_pico_time implementation 2023-03-27 16:34:29 +02:00
345356b868 Merge 10.9 into 10.10 2023-02-16 11:36:38 +02:00
0d55914d96 Merge 10.8 into 10.9 2023-02-16 10:25:34 +02:00
dbab3e8d90 Merge 10.6 into 10.8 2023-02-10 13:43:53 +02:00
6aec87544c Merge 10.5 into 10.6 2023-02-10 13:03:01 +02:00
c41c79650a Merge 10.4 into 10.5 2023-02-10 12:02:11 +02:00
08c852026d Apply clang-tidy to remove empty constructors / destructors
This patch is the result of running
run-clang-tidy -fix -header-filter=.* -checks='-*,modernize-use-equals-default' .

Code style changes have been done on top. The result of this change
leads to the following improvements:

1. Binary size reduction.
* For a -DBUILD_CONFIG=mysql_release build, the binary size is reduced by
  ~400kb.
* A raw -DCMAKE_BUILD_TYPE=Release reduces the binary size by ~1.4kb.

2. Compiler can better understand the intent of the code, thus it leads
   to more optimization possibilities. Additionally it enabled detecting
   unused variables that had an empty default constructor but not marked
   so explicitly.

   Particular change required following this patch in sql/opt_range.cc

   result_keys, an unused template class Bitmap now correctly issues
   unused variable warnings.

   Setting Bitmap template class constructor to default allows the compiler
   to identify that there are no side-effects when instantiating the class.
   Previously the compiler could not issue the warning as it assumed Bitmap
   class (being a template) would not be performing a NO-OP for its default
   constructor. This prevented the "unused variable warning".
2023-02-09 16:09:08 +02:00
49ee18eb42 MDEV-30473 : Do not allow GET_LOCK() / RELEASE_LOCK() in cluster
In 10.5 If WSREP_ON=ON do not allow RELEASE_ALL_LOCKS function.
Instead print clear error message.
2023-01-27 10:40:07 +02:00
696562ce55 MDEV-30473 : Do not allow GET_LOCK() / RELEASE_LOCK() in cluster
If WSREP_ON=ON do not allow GET_LOCK and RELEASE_LOCK functions.
Instead print clear error message.
2023-01-27 10:34:06 +02:00
844ddb1109 MDEV-30473 : Do not allow GET_LOCK() / RELEASE_LOCK() in cluster
If WSREP_ON=ON do not allow GET_LOCK and RELEASE_LOCK functions.
Instead print clear error message.
2023-01-27 08:39:32 +02:00
6ffe9ad0d4 Merge 10.9 into 10.10 2023-01-13 11:45:57 +02:00
5d5735c181 Merge 10.8 into 10.9 2023-01-13 11:22:29 +02:00
88c35781cc Merge 10.7 into 10.8 2023-01-13 11:11:04 +02:00
1e04cafcba Merge 10.6 into 10.7 2023-01-13 10:47:56 +02:00
3386b30975 Merge 10.5 into 10.6 2023-01-13 10:45:41 +02:00
73ecab3d26 Merge 10.4 into 10.5 2023-01-13 10:18:30 +02:00
12618cfb28 MDEV-19160 json_pretty() alias for json_detailed() 2023-01-12 17:51:42 +00:00
bb76dcbec7 Merge branch '10.9' into 10.10 2022-10-04 13:32:38 +02:00
55e07d9ade Merge branch '10.8' into 10.9 2022-10-04 13:23:13 +02:00
2f70784c2a Merge branch '10.7' into 10.8 2022-10-04 11:42:37 +02:00
b6ebadaa66 Merge branch '10.6' into 10.7 2022-10-04 07:41:35 +02:00
829e8111c7 Merge 10.5 into 10.6 2022-09-26 14:34:43 +03:00
6286a05d80 Merge 10.4 into 10.5 2022-09-26 13:34:38 +03:00
a95268c5b3 MDEV-29028 Queries using RANDOM_BYTES get stored in query cache
Mark the RANDOM_BYTES function as uncacheable.
2022-07-31 14:54:37 +02:00
3c2b0cac52 MDEV-25704 Add RANDOM_BYTES function
MySQL 5.6 added the RANDOM_BYTES function.
https://dev.mysql.com/doc/refman/5.6/en/encryption-functions.html#function_random-bytes

This is needed for compatibility purposes.
2022-07-31 14:54:37 +02:00
6cb6ba8b7b Merge 10.8 into 10.9 2022-04-06 13:33:33 +03:00
b2baeba415 Merge 10.7 into 10.8 2022-04-06 13:28:25 +03:00