Commit graph

66475 commits

Author SHA1 Message Date
Sergei Golubchik
8b6c0542db bugfix: stored column depends on virtual depends on updated
TABLE::mark_virtual_col() was polluting table->vcol_set
and that confused the following mark_virtual_col()
2016-12-12 20:27:32 +01:00
Sergei Golubchik
7459f0c03a cleanup: don't update_virtual_fields from READ_RECORD
it was done only in some access methods, not in all,
so the caller had to update_virtual_fields anyway.
2016-12-12 20:27:31 +01:00
Sergei Golubchik
0bef3bb8d0 cleanup: remove Item::intro_version
and partition_info::set_show_version_string - they were
already broken and impossible to maintain
2016-12-12 20:27:25 +01:00
Sergei Golubchik
fd0044041b don't convert WEEK(x) to WEEK(x, @@default_week_format) 2016-12-12 20:27:24 +01:00
Sergei Golubchik
867809f23a bugfix: compile InnoDB w/o P_S 2016-12-12 20:27:23 +01:00
Sergei Golubchik
75925f8fc1 bugfix: Item_func_spatial_collection::print() 2016-12-12 20:27:23 +01:00
Sergei Golubchik
75fb3213d3 bugfix: Item_func_dyncol_add::print() 2016-12-12 20:27:23 +01:00
Sergei Golubchik
0980627fca bugfix: Item_func_weight_string::print() 2016-12-12 20:27:22 +01:00
Sergei Golubchik
232dc91bc9 bugfix: Item_func_like::print() was losing ESCAPE clause 2016-12-12 20:27:22 +01:00
Sergei Golubchik
660355c1ac bugfix: Item_func_get_system_var::print() 2016-12-12 20:27:22 +01:00
Sergei Golubchik
0852cf534a say MariaDB in InnoDB error messages, not MySQL 2016-12-12 20:27:21 +01:00
Sergei Golubchik
b8dfedd747 the mysql-test combination is 'innodb' not 'xtradb' 2016-12-12 20:27:20 +01:00
Alexey Botchkov
9320d8ae30 MDEV-11453 JSON_CONTAINS returns incorrect values.
The weird logic of json_contains was implemented.
2016-12-11 01:12:33 +04:00
Marko Mäkelä
63152a52da Port the test innodb.innodb_misc1 from MySQL.
Adjust some results and error codes.
2016-12-09 12:00:19 +02:00
Alexey Botchkov
04aa31c70b MDEV-11469 JSON_SEARCH returns incorrect results.
Support for '**' in json path expressions added.
2016-12-09 12:26:32 +04:00
Alexey Botchkov
7f6710e5be MDEV-11489 Assertion `0' failed in json_find_path.
When the json was just a scalar value, json_extract tried
        to parse after the value ended.
2016-12-08 11:25:21 +04:00
Alexey Botchkov
3371904380 MDEV-11447 JSON_MERGE merges valid JSON objects incorrectly.
Test case added.
2016-12-06 01:39:06 +04:00
Alexey Botchkov
fba1eab92f MDEV-11446 JSON_MERGE accepts arguments in invalid format.
Test case added.
2016-12-06 01:35:40 +04:00
Alexey Botchkov
3bae5328ea MDEV-11433 JSON_MERGE returns a non-NULL result with a NULL argument.
Item_func_json_merge fixed.
2016-12-06 01:32:13 +04:00
Alexey Botchkov
486079d159 MDEV-11440 JSON has become a reserved word in MariaDB.
'JSON' made possible identifier.
2016-12-06 00:39:53 +04:00
Alexey Botchkov
3743b4c3ef MDEV-11468 JSON_UNQUOTE returns incorrect results.
Now return the argument's value when error.
2016-12-06 00:34:25 +04:00
Jan Lindström
0009f4a441 Merge pull request #268 from grooverdan/10.2-MDEV-10651-enable-test-sys_vars.innodb_buffer_pool_dump_pct_basic
MDEV-10651: enable test sys_vars.innodb_buffer_pool_dump_pct_basic
2016-12-05 17:12:29 +02:00
Marko Mäkelä
cc85ba8f2e MDEV-11233 CREATE FULLTEXT INDEX with a token longer than 127 bytes
crashes server

This bug is the result of merging the Oracle MySQL follow-up fix
BUG#22963169 MYSQL CRASHES ON CREATE FULLTEXT INDEX
without merging the base bug fix:
Bug#79475 Insert a token of 84 4-bytes chars into fts index causes
server crash.

Unlike the above mentioned fixes in MySQL, our fix will not change
the storage format of fulltext indexes in InnoDB or XtraDB
when a character encoding with mbmaxlen=2 or mbmaxlen=3
and the length of a word is between 128 and 84*mbmaxlen bytes.
The Oracle fix would allocate 2 length bytes for these cases.

Compatibility with other MySQL and MariaDB releases is ensured by
persisting the used maximum length in the SYS_COLUMNS table in the
InnoDB data dictionary.

This fix also removes some unnecessary strcmp() calls when checking
for the legacy default collation my_charset_latin1
(my_charset_latin1.name=="latin1_swedish_ci").

fts_create_one_index_table(): Store the actual length in bytes.
This metadata will be written to the SYS_COLUMNS table.

fts_zip_initialize(): Initialize only the first byte of the buffer.
Actually the code should not even care about this first byte, because
the length is set as 0.

FTX_MAX_WORD_LEN: Define as HA_FT_MAXCHARLEN * 4 aka 336 bytes,
not as 254 bytes.

row_merge_create_fts_sort_index(): Set the actual maximum length of the
column in bytes, similar to fts_create_one_index_table().

row_merge_fts_doc_tokenize(): Remove the redundant parameter word_dtype.
Use the actual maximum length of the column. Calculate the extra_size
in the same way as row_merge_buf_encode() does.
2016-12-05 16:32:03 +02:00
Alexey Botchkov
1da0865058 MDEV-11467 JSON_EXTRACT returns incorrect results.
Item_func_json_extract::val_str fixed.
2016-12-05 09:34:28 +04:00
Alexey Botchkov
2b01461629 MDEV-11465 JSON_LENGTH returns incorrect length.
Item_func_json_length::val_int fixed.
2016-12-05 08:59:55 +04:00
Alexey Botchkov
75a51818b2 MDEV-11448 Assertion `*p_cur_step < p->last_step' failed in strings/json_lib.c handle_match.
Test case added.
2016-12-05 08:52:37 +04:00
Alexey Botchkov
fe6d0a0719 MDEV-11471 JSON_ARRAY_APPEND returns incorrect results.
Item_func_json_array_append::val_str fixed.
2016-12-05 08:43:15 +04:00
Alexey Botchkov
abb80d25f4 MDEV-11472 JSON_ARRAY_INSERT returns incorrect results.
Item_func_json_array_insert::val_str fixed.
2016-12-05 08:03:11 +04:00
Alexey Botchkov
df87dce03c MDEV-11473 JSON_REMOVE returns invalid results.
Item_func_json_remove::val_str fixed.
2016-12-05 07:42:00 +04:00
Alexey Botchkov
7e03c67ae8 MDEV-11474 JSON_DEPTH returns incorrect results.
Item_func_json_depth::val_int fixed.
2016-12-05 07:17:54 +04:00
Daniel Black
6924593ed8 MDEV-10651: enable test sys_vars.innodb_buffer_pool_dump_pct_basic
Since 10.2 (2e814d4702) this test
changed and the race condition of MDEV-10651 no longer forms part
of this test.

As such re-enable this test.

Also include save/restore of the default values of this variable.

Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2016-12-05 10:42:42 +11:00
Alexey Botchkov
78dc7c3a6e MDEV-11461 JSON_TYPE does not recognize integer/double types.
Integer/Double recognition added.
2016-12-05 01:03:31 +04:00
Alexey Botchkov
5454500562 MDEV-11452 JSON_CONTAINS accepts wrong number of arguments.
Create_func_json_contains::create_native fixed.
2016-12-05 01:03:31 +04:00
Alexey Botchkov
c89c514ed3 MDEV-11445 JSON_MERGE requires at least two arguments in MySQL, but not in MariaDB.
Create_func_json_merge::create_native fixed.
2016-12-05 01:03:30 +04:00
Alexey Botchkov
12897a5bba MDEV-11437 JSON_QUOTE function does not quote and uses wrong character set.
json_quote fixed.
2016-12-05 01:03:30 +04:00
Alexey Botchkov
b4cbaf0b7c MDEV-11436 CREATE TABLE .. AS SELECT JSON_OBJECT truncates data.
fix_length_and_dec() didn't calculate the length of the result
        properly.
2016-12-05 01:03:30 +04:00
Alexey Botchkov
f391ab4f01 MDEV-11438 Assertion `null_value' failed in Item::send(Protocol*, String*) upon casting NULL as JSON.
test added.
2016-12-05 01:03:30 +04:00
Alexey Botchkov
f105014e9b MDEV-11464 Server crashes in mark_object upon JSON_VALID.
Depth of nested objects should be controlled.
2016-12-03 12:41:19 +04:00
Alexey Botchkov
7fca133028 MDEV-11463 Server crashes in mark_array upon JSON_VALID.
The depth of nested arrays should be controlled, as it's limited.
2016-12-03 12:36:10 +04:00
Alexey Botchkov
edc75c9c16 MDEV-11450 Assertion `!null_value' failed invirtual bool Item::send on json_search.
Item_func_json_search::val_str didn't set the null_value
        properly. So that affected the next record in the resultset.
2016-12-03 12:11:06 +04:00
Alexey Botchkov
a8467e2fab MDEV-11449 Server crashes in Item_func_or_sum::agg_item_collations.
JSON_ARRAY didn't expect 0 arguments.
2016-12-03 11:45:24 +04:00
Alexey Botchkov
eca1579051 MDEV-11444 Server crashes in String::ptr / Item_func_json_depth::val_int.
CAST AS JSON didn't set the null_value mark properly.
2016-12-03 11:32:47 +04:00
Alexey Botchkov
4ad0813a55 MDEV-11143 Server crashes in json_string_set_cs.
Some JSON functions didn't expect NULL as a path.
2016-12-03 11:22:42 +04:00
Alexey Botchkov
e8c419570f MDEV-11442 Server crashes in String::length / parse_one_or_all /Item_func_json_contains_path::val_int
Didn't expect 'one_or_all' parameter to be NULL.
2016-12-03 11:02:28 +04:00
Alexey Botchkov
b28626e842 MDEV-11441 Server crashes in String::append /Item_func_json_extract::val_str.
Wrong 'value_lengh' taken
2016-12-03 10:53:12 +04:00
Marko Mäkelä
33ed16c750 MDEV-11236 Failing assertion: state == TRX_STATE_NOT_STARTED
trx_state_eq(): Add the parameter bool relaxed=false, to
allow trx->state==TRX_STATE_NOT_STARTED where a different
state is expected, if an error has been reported.

trx_release_savepoint_for_mysql(): Pass relaxed=true to
trx_state_eq(). That is, allow the transaction to be idle
when ROLLBACK TO SAVEPOINT is attempted after an error
has been reported to the client.
2016-12-02 16:44:53 +02:00
Sergei Golubchik
cb78555f30 update test results 2016-12-02 00:39:19 +01:00
Marko Mäkelä
0b66d3f70d MDEV-11426 Remove InnoDB INFORMATION_SCHEMA.FILES implementation
MySQL 5.7 introduced WL#7943: InnoDB: Implement Information_Schema.Files
to provide a long-term alternative for accessing tablespace metadata.
The INFORMATION_SCHEMA.INNODB_* views are considered internal interfaces
that are subject to change or removal between releases. So, users should
refer to I_S.FILES instead of I_S.INNODB_SYS_TABLESPACES to fetch metadata
about CREATE TABLESPACE.

Because MariaDB 10.2 does not support CREATE TABLESPACE or
CREATE TABLE…TABLESPACE for InnoDB, it does not make sense to support
I_S.FILES either. So, let MariaDB 10.2 omit the code that was added in
MySQL 5.7. After this change, I_S.FILES will report the empty result,
unless some other storage engine in MariaDB 10.2 implements the interface.
(The I_S.FILES interface was originally created for the NDB Cluster.)
2016-12-01 13:16:25 +02:00
Jan Lindström
943baa3ba8 MDEV-11168: InnoDB: Failing assertion: !other_lock || wsrep_thd_is_BF(lock->trx->mysql_thd, FALSE) || wsrep_thd_is_BF(other_lock->trx->mysql_thd, FALSE)
Problem was that we moved lock request to head of lock queue
    even when lock request has to wait.
2016-12-01 13:07:28 +02:00
Jan Lindström
dc9f919f27 MDEV-11005: Incorrect error message when using ONLINE alter table with GIS
Corrected error message when ONLINE alter table with GIS indexes is
used on InnoDB.
2016-12-01 06:42:59 +02:00