Alexey Botchkov
352c7e0dfa
MDEV-15905 select json_value('{"b":true}','$.b')=1 --> false with
...
"Truncated incorrect DOUBLE value: 'true'".
JSON_VALUE_TRUE and JSON_VALUE_FALSE should be handled specifically
in Item_json_value.
2018-06-17 17:15:21 +04:00
Oleksandr Byelkin
6b8802e8dd
MDEV-11071: Assertion `thd->transaction.stmt.is_empty()' failed in Locked_tables_list::unlock_locked_table
...
fix_length_and_dec now return result (error/OK)
2018-06-15 10:31:30 +02:00
Igor Babaev
cab1d63826
Merge branch '10.3' into 10.4
2018-06-03 10:34:41 -07:00
Alexander Barkov
ffe83e8e7b
MDEV-16351 JSON_OBJECT() treats hybrid functions with boolean arguments as numbers
...
Now the boolean data type is preserved in hybrid functions and MIN/MAX,
so COALESCE(bool_expr,bool_expr) and MAX(bool_expr) are correctly
detected by JSON_OBJECT() as being boolean rather than numeric expressions.
2018-05-31 18:52:32 +04:00
Monty
30ebc3ee9e
Add likely/unlikely to speed up execution
...
Added to:
- if (error)
- Lex
- sql_yacc.yy and sql_yacc_ora.yy
- In header files to alloc() calls
- Added thd argument to thd_net_is_killed()
2018-05-07 00:07:32 +03:00
Michael Widenius
ddc5764303
Remove compiler warnings
...
- Remove unused variables
- Mark variables unused
- Fix wrong types
- Add no-strict-aliasing to BUILD scripts
2018-04-16 20:16:43 +03:00
Marko Mäkelä
145ae15a33
Merge bb-10.2-ext into 10.3
2018-01-04 09:22:59 +02:00
Monty
fbab79c9b8
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
...
Conflicts:
cmake/make_dist.cmake.in
mysql-test/r/func_json.result
mysql-test/r/ps.result
mysql-test/t/func_json.test
mysql-test/t/ps.test
sql/item_cmpfunc.h
2018-01-01 19:39:59 +02:00
Alexey Botchkov
f0f3b6549a
MDEV-13970 crash in Item_func_json_extract::read_json.
...
Item_func_json_extract::val_int fixed.
It wasn't tested yet as it's called in exotic cases only.
2017-12-25 08:10:48 +04:00
Marko Mäkelä
7cb3520c06
Merge bb-10.2-ext into 10.3
2017-11-30 08:16:37 +02:00
Alexander Barkov
4a8039b04e
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
2017-11-20 11:12:08 +04:00
Alexey Botchkov
842dce378a
MDEV-14402 JSON_VALUE doesn't escape quote.
...
Result unescaping added.
2017-11-16 19:59:27 +04:00
Marko Mäkelä
5603a5842b
Merge bb-10.2-ext into 10.3
2017-11-02 12:08:37 +02:00
Marko Mäkelä
2ec7b87053
Merge 10.2 into bb-10.2-ext
2017-11-01 14:37:31 +02: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
Alexey Botchkov
b5689c6c87
Compiler warnings fixed.
2017-10-30 14:59:43 +04:00
Alexander Barkov
30e7d6709f
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
2017-10-18 14:11:55 +04:00
Alexey Botchkov
a3ba8c3660
MDEV-13703 Illegal mix of collations for operation 'json_object' on
...
using JSON_UNQUOTE as an argument.
The coercibility and repertoire should be set properly for the
JSON_UNQUOTE.
2017-10-06 09:28:33 +04:00
Alexey Botchkov
f1a20ec396
MDEV-12311 Insufficient check for argument validity in JSON functions.
...
Check validity to the end of the JSON in the json_length
function.
2017-10-05 23:46:25 +04:00
Alexey Botchkov
1f6ada8da8
MDEV-13306 JSON_CONTAINS returns wrong value.
...
The 'value' state should be saved to be compared against the
next array item.
2017-10-05 23:23:39 +04:00
Marko Mäkelä
2c1067166d
Merge bb-10.2-ext into 10.3
2017-10-04 08:24:06 +03: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
Marko Mäkelä
348eaf4252
Merge bb-10.2-ext into 10.3
2017-09-14 09:12:47 +03:00
Marko Mäkelä
c97e504a5f
Merge 10.2 into bb-10.2-ext
2017-09-14 08:09:44 +03:00
Alexey Botchkov
dc82f70e9f
MDEV-13633 JSON_ARRAY() - bad output with some UTF8 characters.
...
set_charset() calls added for Item_func_json_arran
and Item_func_json_object::val_str-s.
2017-09-13 15:17:28 +04:00
Alexander Barkov
178540b904
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
2017-09-13 12:12:05 +04:00
Alexey Botchkov
a237a92099
MDEV-12877 Wrong result from JSON native function.
...
Set default charset for temporary paths so UDF call don't crash.
2017-09-13 00:36:09 +04:00
Alexey Botchkov
30db4e1fc7
MDEV-13786 compiler complains about uninitialized variable.
...
'=0' added to meke the compiler happy.
2017-09-12 15:33:30 +04:00
Alexey Botchkov
0cd731864e
MDEV-13104 Json functions.
...
An extra ',' added to the JSON_MERGE result making it invalid.
2017-09-12 15:21:53 +04:00
Alexey Botchkov
467acc2119
MDEV-13324 JSON_SET returns NULL instead of object.
...
Superfluous ',' was added to the JSON_SET result so it became
invalid.
2017-09-12 14:40:18 +04:00
Alexey Botchkov
6352ec2184
MDEV-12982 JSON_EXTRACT returns data for invalid JSON.
...
Let's check the validity to the end of the JSON.
2017-09-12 11:20:30 +04: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
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
Sergei Golubchik
399e14f066
MDEV-13435 Crash when selecting virtual columns generated using JSON functions
...
don't allocate memory on thd->mem_root in every fix_fields(),
do it once and reuse.
2017-08-14 19:45:59 +02:00
Alexey Botchkov
2ebb1380d6
MDEV-12604 Comparison of JSON_EXTRACT result differs with Mysql.
...
JSON_EXTRACT behaves specifically in the comparison,
so we have to implement specific method for that in
Arg_comparator.
Conflicts:
sql/item_cmpfunc.cc
2017-08-11 09:02:55 +04:00
Alexey Botchkov
79d2853354
MDEV-12604 Comparison of JSON_EXTRACT result differs with Mysql.
...
JSON_EXTRACT behaves specifically in the comparison,
so we have to implement specific method for that in
Arg_comparator.
2017-08-11 00:50:29 +04:00
Marko Mäkelä
0930d6698f
Merge 10.2 into bb-10.2-ext
2017-08-09 12:35:21 +03:00
Alexey Botchkov
4bca34d8a4
MDEV-12789 JSON_KEYS returns duplicate keys twice.
...
Check for duplicating keys added.
2017-08-08 15:40:11 +04:00
Alexey Botchkov
01a4eb8f76
MDEV-12732 json.json_no_table fails with valgrind in buildbot and
...
outside.
The result_limit variable wasn't always initialized in
Item_func_json_array::fix_length_and_dec().
2017-08-08 13:49:29 +04:00
Alexey Botchkov
bb71d9abf2
MDEV-12604 Comparison of JSON_EXTRACT result differs with Mysql.
...
Comparison fixed to take the actual type of JSON value into
account. Bug in escaping handling fixed.
2017-08-08 10:35:26 +04:00
Alexander Barkov
a8caa8e04a
MDEV-12854 Synchronize CREATE..SELECT data type and result set metadata data type for INT functions
2017-05-20 16:29:11 +04:00
Monty
1e04ad284c
Fixed compiler warnings and warnings from build.tags
...
Other things
- Ensure that ut_d() is set to EXPR if ut_ad() is DEBUG_ASSERT()
If not, we will get a crash in purge_sys_t::~purge_sys_t() as
this ut_ad() code expect's that the ut_d() codes has been executed
2017-05-08 02:33:35 +03:00
Alexey Botchkov
3ea9d3e59e
MDEV-12363 Assertion `0' failed in Type_handler_string_result::make_sort_key(uchar*, Item*, const SORT_FIELD_ATTR*, Sort_param*).
...
maybe_null wasn't properly set for Item_json_func_keys.
2017-05-02 15:47:43 +04:00
Alexey Botchkov
42ad4f2821
MDEV-12364 Server crashes in __memcpy_sse2_unaligned / String::copy on
...
JSON_SEARCH with variables.
Wrong index for the tmp_paths array in
Item_func_json_search::val_str.
2017-05-02 14:28:57 +04:00
Alexey Botchkov
76f6c1e1ed
MDEV-12262 Assertion `!null_value' failed in virtual bool Item::send on
...
JSON_REMOVE.
null_value wasn't properly set in Item_json_func_remove::val_str.
2017-03-20 15:18:06 +04:00
Alexey Botchkov
af6eee1fc5
MDEV-11833 JSON functions don't seem to respect max_allowed_packet.
...
Now let's check JSON length to fit the max_allowed packet.
2017-03-14 17:31:14 +04:00
Alexey Botchkov
7c7c0696e7
MDEV-11856 json_search doesn't search for values with double quotes
...
character (").
The my_wildcmp function doesn't expect the string parameter to
have escapements, only the template. So the string
should be unescaped if necessary.
2017-03-14 15:25:02 +04:00
Sergei Golubchik
6f6d0531dc
MDEV-11439 No data type JSON, but CAST(something AS JSON) pretends to work
...
Use JSON_COMPACT(X) instead of CAST(X AS JSON).
Bonus - X is validated to be a valid JSON.
Fix a typo in the error message.
2017-02-14 20:43:41 +01:00