Commit graph

194807 commits

Author SHA1 Message Date
Oleksandr Byelkin
7fa02f5c0b Merge branch '10.4' into 10.5 2023-01-27 13:54:14 +01:00
Sergei Petrunia
c8f9bb2718 MDEV-30218: Incorrect optimization for rowid_filtering, correction
Enable use of Rowid Filter optimization with eq_ref access.
Use the following assumptions:
- Assume index-only access cost is 50% of non-index-only access cost.
- Take into account that "Eq_ref access cache" reduces the number of
  lookups eq_ref access will make.
  = This means the number of Rowid Filter checks is reduced also
  = Eq_ref access cost is computed using that assumption (see
    prev_record_reads() call), so we should use it in all cost '
    computations.
2023-01-26 16:16:43 +03:00
Marko Mäkelä
672cdcbb93 MDEV-30404: Inconsistent updates of PAGE_MAX_TRX_ID on ROW_FORMAT=COMPRESSED pages
page_copy_rec_list_start(): Do not update the PAGE_MAX_TRX_ID
on the compressed copy of the page. The modification is supposed
to be logged as part of page_zip_compress() or page_zip_reorganize().
If the page cannot be compressed (due to running out of space),
then page_zip_decompress() must be able to roll back the changes.

This fixes a regression that was introduced in
commit 56f6dab1d0 (MDEV-21174).
2023-01-26 14:47:52 +02:00
Oleksandr Byelkin
dd24fa3063 Merge branch '10.3' into 10.4 2023-01-26 10:34:26 +01:00
Marko Mäkelä
e02ed04d17 MDEV-23855 fixup: Remove SRV_MASTER_CHECKPOINT_INTERVAL 2023-01-25 13:53:10 +02:00
Jan Lindström
8bccba1d4a MDEV-30465 : Galera test galera_sr.MDEV-27615 takes 5mins
After d7d3ad69 we should use KILL_CONNECTION_HARD to interrupt
debug_sync waits. Test case uses debug_sync and then disconnects
connection from cluster.
2023-01-25 10:01:00 +02:00
Daniel Black
765291d63e CREDITS: re-instate Tencent Cloud
This was an accidential deletion looking at an outdated list.
2023-01-25 16:44:26 +11:00
Yuchen Pei
284810b3e8
MDEV-30370 Fixing spider hang when server aborts
This is Kentoku's patch for MDEV-22979 (e6e41f04f4 + 22a0097727),
which fixes 30370.

It changes the wait to a timed wait for the first sts thread, which
waits on server start to execute the init queries for spider. It also
flips the flag init_command to false when the sts thread is being
freed. With these changes the sts thread can check the flag regularly
and abort the init_queries when it finds out the init_command is
false. This avoids the deadlock that causes the problem in MDEV-30370.

It also fixes MDEV-22979 for 10.4, but not 10.5. I have not tested
higher versions for MDEV-22979.

A test has also been done on MDEV-29904 to avoid regression, given
MDEV-27233 is a similar problem and its patch caused the
regression. The test passes for 10.4-11.0.

However, this adhoc test only works consistently when placed in the
main testsuite. We should not place spider tests in the main suite, so
we do not include it in this commit. A patch for MDEV-27912 should fix
this problem and allow a proper test for MDEV-29904. See comments in
the jira ticket MDEV-30370/29904 for the adhoc testcase used for this
commit.
2023-01-25 12:12:17 +11:00
Vladislav Vaintroub
2279dddad6 MDEV-30457 Windows, signtool error "No file digest algorithm specified."
Add /fd parameter. It is now mandatory for the recent versions of
signtool
2023-01-24 20:51:53 +01:00
Andrei
7fe932444d MDEV-30323 Some DDLs like ANALYZE can complete on parallel slave out of order
ANALYZE was observed to race over a preceding in binlog order DML
in updating the binlog and slave gtid states.

Tagging ANALYZE and other admin class commands in binlog by the fixes
of MDEV-17515 left a flaw allowing such race leading to
the gtid mode out-of-order error.
This is fixed now to observe by ADMIN commands the ordered access to
the slave gtid status variables and binlog.
2023-01-24 20:18:03 +02:00
Andrei
3aa04c0deb MDEV-30010 Slave (additional info): Commit failed due to failure of an earlier commit on which this one depends Error_code: 1964
This commit merely adds is a Read-Committed version MDEV-30225 test
solely to prove the RC isolation yields ROW binlog format as it is
supposed to per docs.
2023-01-24 19:39:44 +02:00
Igor Babaev
f513d71538 MDEV-30081 Crash with splitting from constant mergeable derived table
This bug manifested itself in very rare situations when splitting
optimization was applied to a materialized derived table with group clause
by key over a constant meargeable derived table that was in inner part of
an outer join. In this case the used tables for the key to access the
split table incorrectly was evaluated to a not empty table map.

Approved by Oleksandr Byelkin <sanja@mariadb.com>
2023-01-24 08:46:41 -08:00
Brandon Nesterenko
d69e835787 MDEV-29639: Seconds_Behind_Master is incorrect for Delayed, Parallel Replicas
Problem
========
On a parallel, delayed replica, Seconds_Behind_Master will not be
calculated until after MASTER_DELAY seconds have passed and the
event has finished executing, resulting in potentially very large
values of Seconds_Behind_Master (which could be much larger than the
MASTER_DELAY parameter) for the entire duration the event is
delayed. This contradicts the documented MASTER_DELAY behavior,
which specifies how many seconds to withhold replicated events from
execution.

Solution
========
After a parallel replica idles, the first event after idling should
immediately update last_master_timestamp with the time that it began
execution on the primary.

Reviewed By
===========
Andrei Elkin <andrei.elkin@mariadb.com>
2023-01-24 08:11:35 -07:00
Sergei Petrunia
2ed598eae8 Added comments re JOIN::all_fields, JOIN::fields_list 2023-01-24 13:30:22 +02:00
Ian Gilfillan
2ba6f3d46a Update 10.5 HELP tables 2023-01-24 11:28:37 +11:00
Ian Gilfillan
c45630327c Update 10.3 HELP tables 2023-01-24 11:28:19 +11:00
Ian Gilfillan
801c0b4b47 Update 10.4 HELP tables 2023-01-24 09:52:11 +11:00
Igor Babaev
074bef4dca MDEV-30248 Infinite sequence of recursive calls when processing embedded CTE
This patch fixes the patch for bug MDEV-30248 that unsatisfactorily
resolved the problem of resolution of references to CTE. In some cases
when such a reference has the same table name as the name of one of
CTEs containing this reference the reference could be resolved incorrectly
that led to an invalid select tree where units could be mutually dependent.
This in its turn could lead to an infinite sequence of recursive calls or
to falls into infinite loops.

The patch also removes LEX::resolve_references_to_cte_in_hanging_cte() as
with the new code for resolution of CTE references the call of this
function is not needed anymore.

Approved by Oleksandr Byelkin <sanja@mariadb.com>
2023-01-23 11:51:48 -08:00
Andrei
dc646c2389 MDEV-30423 Deadlock on Replica during BACKUP STAGE BLOCK_COMMIT on XA transactions
The user XA commit execution branch was caught not have been covered
with MDEV-21953 fixes.

The XA involved deadlock is resolved now to apply the former fixes
pattern.
Along the fixes the following changes have been implemented.
- MDL lock attribute correction
- dissociation of the externally completed XA from the current
  thread's xid_state in the error branches
- cleanup_context() preseves the prepared XA
- wait_for_prior_commit() is relocated to satisfy both
  the binlog ON (log-slave-updates and skip-log-bin)
  and OFF slave execution branches.
2023-01-23 19:01:48 +02:00
Sergei Petrunia
f18c2b6c8a MDEV-15178: Filesort::make_sortorder: Assertion `pos->field != __null |
(Initial patch by Varun Gupta. Amended and added comments).

When the query has both
1. Aggregate functions that require sorting data by group, and
2. Window functions

we need to use two temporary tables. The first temp.table will hold the
join output.  Then it is passed to filesort(). Reading it in sorted
order allows to compute the aggregate functions.

Then, we need to write their values into the second temp. table. Then,
Window Function computation step can pass that to filesort() and read
them in the order it needs.

Failure to create the second temp. table would cause an assertion
failure: window function could would not find where to get the values
of the aggregate functions.
2023-01-23 18:22:21 +02:00
Thirunarayanan Balathandayuthapani
647a7232ff MDEV-30438 innodb.undo_truncate,4k fails when innodb-immediate-scrub-data-uncompressed is enabled
- InnoDB fails to clear the freed ranges during truncation of innodb
undo log tablespace. During shutdown, InnoDB flushes the freed page
ranges and throws the out of bound error.

mtr_t::commit_shrink(): clear the freed ranges while doing undo
tablespace truncation
2023-01-23 09:55:49 +05:30
Sergei Golubchik
734ad06880 MDEV-29461 AddressSanitizer: stack-buffer-overflow in strxmov 2023-01-20 19:43:40 +01:00
Sergei Golubchik
0c27559994 MDEV-26817 runtime error: index 24320 out of bounds for type 'json_string_char_classes [128] *and* ASAN: global-buffer-overflow on address ... READ of size 4 on SELECT JSON_VALID
protect from out-of-bound array access

it was already done in all other places, this one was the only one missed
2023-01-20 19:43:15 +01:00
Sergei Golubchik
fc292f42be MDEV-29199 Unique hash key is ignored upon INSERT ... SELECT into non-empty MyISAM table
disable bulk insert optimization if long uniques are used, because they
need to read the table (index_read) after every inserted now. And bulk
insert optimization might disable indexes.

bulk insert is already disabled in other cases when there are chances
that the table will be read duing the bulk insert.
2023-01-20 15:44:15 +01:00
Sergei Golubchik
db50919f97 MDEV-27631 Assertion `global_status_var.global_memory_used == 0' failed in mysqld_exit
plugin_vars_free_values() was walking plugin sysvars and thus
did not free memory of plugin PLUGIN_VAR_NOSYSVAR vars.

* change it to walk all plugin vars
* add the pluginname_ prefix to NOSYSVARS var names too,
  so that plugin_vars_free_values() would be able to find their
  bookmarks
2023-01-20 15:44:15 +01:00
Vicențiu Ciorbaru
00150ff8d4 Fix connect bson.cpp warning
The ptyp variable is unused.
2023-01-20 15:18:52 +02:00
Vicențiu Ciorbaru
244bf37c73 Fix mroonga warning of use-after-free 2023-01-20 15:18:52 +02:00
Mikhail Chalov
567b681299 Minimize unsafe C functions usage - replace strcat() and strcpy() (and strncat() and strncpy()) with custom safe_strcat() and safe_strcpy() functions
The MariaDB code base uses strcat() and strcpy() in several
places. These are known to have memory safety issues and their usage is
discouraged. Common security scanners like Flawfinder flags them. In MariaDB we
should start using modern and safer variants on these functions.

This is similar to memory issues fixes in 19af1890b5
and 9de9f105b5 but now replace use of strcat()
and strcpy() with safer options strncat() and strncpy().

However, add '\0' forcefully to make sure the result string is correct since
for these two functions it is not guaranteed what new string will be null-terminated.

Example:

    size_t dest_len = sizeof(g->Message);
    strncpy(g->Message, "Null json tree", dest_len); strncat(g->Message, ":",
    sizeof(g->Message) - strlen(g->Message)); size_t wrote_sz = strlen(g->Message);
    size_t cur_len = wrote_sz >= dest_len ? dest_len - 1 : wrote_sz;
    g->Message[cur_len] = '\0';

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the BSD-new
license. I am contributing on behalf of my employer Amazon Web Services

-- Reviewer and co-author Vicențiu Ciorbaru <vicentiu@mariadb.org>
-- Reviewer additions:
* The initial function implementation was flawed. Replaced with a simpler
  and also correct version.
* Simplified code by making use of snprintf instead of chaining strcat.
* Simplified code by removing dynamic string construction in the first
  place and using static strings if possible. See connect storage engine
  changes.
2023-01-20 15:18:52 +02:00
Oleksandr Byelkin
d9fbc6289d Merge branch 'merge-perfschema-5.7' into 10.5 2023-01-20 13:02:19 +01:00
Oleksandr Byelkin
986276f019 mysql-5.7.41 2023-01-20 12:55:21 +01:00
Jan Lindström
f3f09def23 Merge branch 'codership-10.4-fix-sst_received' into bb-10.4-MDEV-30419 2023-01-20 11:46:18 +02:00
Oleg Smirnov
b2b9d91668 MDEV-29294 Assertion `functype() == ((Item_cond *) new_item)->functype()' failed in Item_cond::remove_eq_conds on SELECT
Item_singlerow_subselect may be converted to Item_cond during
optimization. So there is a possibility of constructing nested
Item_cond_and or Item_cond_or which is not allowed (such
conditions must be flattened).
This commit checks if such kind of optimization has been applied
and flattens the condition if needed
2023-01-20 11:40:01 +02:00
Alexander Barkov
eea9f2a1e7 MDEV-27653 long uniques don't work with unicode collations
There are no source code changes in this commit!
This is an empty follow-up commit for
  284ac6f2b7
to comment what was done, as the patch itself did not have
change comments.

Problems solved in this patch:

1. The function calc_hash_for_unique() erroneously takes into account
the string length, so equal strings (in terms of the collation)
with different lengths got different hash value.

For example:
- LATIN LETTER A             - 1 byte
- LATIN LETTER A WITH ACUTE  - 2 bytes

are equal in utf8_general_ci, but as their lengths
are different, calc_hash_for_unique() returned
different hash values.

2. calc_hash_for_unique() also erroneously used val_str()
result to calculate hashes. This may not be correct for
some data types, e.g. TIMESTAMP, as its string
value depends on the session environment (e.g. @@time_zone).

Change summary:

Instead of doing Item::val_str(), we should always call
Field::hash() of the underlying Field. It properly
handles both cases (equal strings with different
lengths, as well as tricky data types like TIMESTAMP).

Detailed change description:

Non-functional changes (make the code cleaner):

- Adding a helper class Hasher, to pass hash parts
  nr1 and nr2 through function arguments easier.
- Splitting virtual Field::hash() into non-virtual
  wrapper Field::hash() and virtual Field::hash_not_null().
  This helps to get rid of duplicate code handling SQL NULL,
  as it was equal in all Field_xxx implementations.
- Adding a new method THD::my_ok_with_recreate_info().

Actual fix changes (make new tables work properly):

- Adding a virtual method Item::hash_not_null()
  This helps to handle hashes on full fields (Item_field)
  and hashes on prefix fields (Item_func_left(Item_field))
  in a polymorphic way.
  Implementing overrides for Item_field and Item_func_left.

- Rewriting Item_func_hash::val_int() to use Item::hash_not_null(),
  instead of the combination of val_str() and alc_hash_for_unique().

Backward compatibility changes (make old tables work in the new server):

- Adding a new class Item_func_hash_mariadb_100403.
  Moving the old version of Item_func_hash::val_int()
  into Item_func_hash_mariadb_100403::val_int().
  The old class Item_func_hash_mariadb_100403 is still needed,
  to open old tables before upgrade is done.

- Adding TABLE_SHARE::old_long_hash_function() and
  handler::check_long_hash_compatibility() to test
  if a table is using an old hash function.

- Adding a helper method TABLE_SHARE::make_long_hash_func()
  to instantiate either Item_func_hash_mariadb_100403 (for old
  not upgraded tables) or Item_func_hash (for new tables).

Upgrade changes (make old tables upgrade in the new server properly):

Upgrading an old table to a new hash can be done using either
of these two statements:

  ALTER IGNORE TABLE t1 FORCE;
  REPAIR TABLE t1;

!!! These statements find and filter out erreneous duplicates!!!
The table after these statements will have less records
if there were erroneous duplicates (such and A and A WITH ACUTE).

The information about filtered out records is reported in both statements.

- Adding a new class Recreate_info to return out information
  about copied and duplucate rows from these functions:
  - mysql_alter_table()
  - mysql_recreate_table()
  - admin_recreate_table()
  This helps to print a warning during REPAIR:

MariaDB [test]> repair table mdev27653_100422_text;
+----------------------------+--------+----------+------------------------------------+
| Table                      | Op     | Msg_type | Msg_text                           |
+----------------------------+--------+----------+------------------------------------+
| test.mdev27653_100422_text | repair | Warning  | Number of rows changed from 2 to 1 |
| test.mdev27653_100422_text | repair | status   | OK                                 |
+----------------------------+--------+----------+------------------------------------+
2 rows in set (0.018 sec)
2023-01-20 11:40:01 +02:00
Daniele Sciascia
ae96e21cf0 Correct assert_grep.inc params in galera gcache tests 2023-01-20 11:40:01 +02:00
Yuchen Pei
0253a2f48e MDEV-26541 Make UBSAN builds work with spider again.
When built with ubsan and trying to load the spider plugin, the hidden
visibility of mysqld compiling flag causes ha_spider.so to be missing
the symbol ha_partition. This commit fixes that, as well as some
memcpy null pointer issues when built with ubsan.

Signed-off-by: Yuchen Pei <yuchen.pei@mariadb.com>
2023-01-20 11:40:01 +02:00
Alexander Barkov
a27b8b2683 MDEV-27653 long uniques don't work with unicode collations 2023-01-20 11:40:01 +02:00
Igor Babaev
ea270178b0 MDEV-30052 Crash with a query containing nested WINDOW clauses
Use SELECT_LEX to save lists for ORDER BY and GROUP BY before parsing
WINDOW clauses / specifications. This is needed for proper parsing
of a nested WINDOW clause when a WINDOW clause is used in a subquery
contained in another WINDOW clause.

Fix assignment of empty SQL_I_List to another one (in case of empty list
next shoud point on first).
2023-01-20 09:07:02 +01:00
Oleg Smirnov
afb5deb9db MDEV-29294 Assertion `functype() == ((Item_cond *) new_item)->functype()' failed in Item_cond::remove_eq_conds on SELECT
Item_singlerow_subselect may be converted to Item_cond during
optimization. So there is a possibility of constructing nested
Item_cond_and or Item_cond_or which is not allowed (such
conditions must be flattened).
This commit checks if such kind of optimization has been applied
and flattens the condition if needed
2023-01-20 13:47:36 +07:00
Alexander Barkov
c256998b6e MDEV-27653 long uniques don't work with unicode collations
There are no source code changes in this commit!
This is an empty follow-up commit for
  284ac6f2b7
to comment what was done, as the patch itself did not have
change comments.

Problems solved in this patch:

1. The function calc_hash_for_unique() erroneously takes into account
the string length, so equal strings (in terms of the collation)
with different lengths got different hash value.

For example:
- LATIN LETTER A             - 1 byte
- LATIN LETTER A WITH ACUTE  - 2 bytes

are equal in utf8_general_ci, but as their lengths
are different, calc_hash_for_unique() returned
different hash values.

2. calc_hash_for_unique() also erroneously used val_str()
result to calculate hashes. This may not be correct for
some data types, e.g. TIMESTAMP, as its string
value depends on the session environment (e.g. @@time_zone).

Change summary:

Instead of doing Item::val_str(), we should always call
Field::hash() of the underlying Field. It properly
handles both cases (equal strings with different
lengths, as well as tricky data types like TIMESTAMP).

Detailed change description:

Non-functional changes (make the code cleaner):

- Adding a helper class Hasher, to pass hash parts
  nr1 and nr2 through function arguments easier.
- Splitting virtual Field::hash() into non-virtual
  wrapper Field::hash() and virtual Field::hash_not_null().
  This helps to get rid of duplicate code handling SQL NULL,
  as it was equal in all Field_xxx implementations.
- Adding a new method THD::my_ok_with_recreate_info().

Actual fix changes (make new tables work properly):

- Adding a virtual method Item::hash_not_null()
  This helps to handle hashes on full fields (Item_field)
  and hashes on prefix fields (Item_func_left(Item_field))
  in a polymorphic way.
  Implementing overrides for Item_field and Item_func_left.

- Rewriting Item_func_hash::val_int() to use Item::hash_not_null(),
  instead of the combination of val_str() and alc_hash_for_unique().

Backward compatibility changes (make old tables work in the new server):

- Adding a new class Item_func_hash_mariadb_100403.
  Moving the old version of Item_func_hash::val_int()
  into Item_func_hash_mariadb_100403::val_int().
  The old class Item_func_hash_mariadb_100403 is still needed,
  to open old tables before upgrade is done.

- Adding TABLE_SHARE::old_long_hash_function() and
  handler::check_long_hash_compatibility() to test
  if a table is using an old hash function.

- Adding a helper method TABLE_SHARE::make_long_hash_func()
  to instantiate either Item_func_hash_mariadb_100403 (for old
  not upgraded tables) or Item_func_hash (for new tables).

Upgrade changes (make old tables upgrade in the new server properly):

Upgrading an old table to a new hash can be done using either
of these two statements:

  ALTER IGNORE TABLE t1 FORCE;
  REPAIR TABLE t1;

!!! These statements find and filter out erreneous duplicates!!!
The table after these statements will have less records
if there were erroneous duplicates (such and A and A WITH ACUTE).

The information about filtered out records is reported in both statements.

- Adding a new class Recreate_info to return out information
  about copied and duplucate rows from these functions:
  - mysql_alter_table()
  - mysql_recreate_table()
  - admin_recreate_table()
  This helps to print a warning during REPAIR:

MariaDB [test]> repair table mdev27653_100422_text;
+----------------------------+--------+----------+------------------------------------+
| Table                      | Op     | Msg_type | Msg_text                           |
+----------------------------+--------+----------+------------------------------------+
| test.mdev27653_100422_text | repair | Warning  | Number of rows changed from 2 to 1 |
| test.mdev27653_100422_text | repair | status   | OK                                 |
+----------------------------+--------+----------+------------------------------------+
2 rows in set (0.018 sec)
2023-01-20 09:52:00 +04:00
Daniele Sciascia
c4f5128d46 Correct assert_grep.inc params in galera gcache tests 2023-01-20 07:17:28 +02:00
Yuchen Pei
a68b9dd993
MDEV-26541 Make UBSAN builds work with spider again.
When built with ubsan and trying to load the spider plugin, the hidden
visibility of mysqld compiling flag causes ha_spider.so to be missing
the symbol ha_partition. This commit fixes that, as well as some
memcpy null pointer issues when built with ubsan.

Signed-off-by: Yuchen Pei <yuchen.pei@mariadb.com>
2023-01-20 13:51:25 +11:00
Eric Herman
6fe882cd85 Add my_afree after my_alloca in early return case
The code already had a call to `my_afree` in the normal return case,
but failed to do so in the early return case.
2023-01-20 09:28:35 +11:00
Alexander Barkov
284ac6f2b7 MDEV-27653 long uniques don't work with unicode collations 2023-01-19 20:33:03 +04:00
Alexander Barkov
0ddbec40fb MDEV-23335 MariaBackup Incremental Does Not Reflect Dropped/Created Databases 2023-01-19 17:18:06 +04:00
Teemu Ollakka
beb1e230dd MDEV-30419 Fix unhandled exception thrown from wsrep-lib
Updated wsrep-lib to version in which server_state
wait_until_state() and sst_received() were changed to report
errors via return codes instead of throwing exceptions. Added
error handling accordingly.

Tested manually that failure in sst_received() which was
caused by server misconfiguration (unknown configuration variable
in server configuration) does not cause crash due to uncaught
exception.
2023-01-19 14:55:50 +02:00
Daniele Sciascia
eeb8ebb152 MDEV-29774 BF abort no longer wakes up debug_sync waiters
Since commit d7d3ad698a, "hard" kill is
required to interrupt debug sync waits.
Affected the following tests:
 - galera_var_retry_autocommit,
 - galera_bf_abort_at_after_statement
 - galera_parallel_apply_3nodes

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
2023-01-19 08:24:41 +02:00
Yuchen Pei
8d91e3f614
MDEV-30191 Remove the to-be-freed spider condition in an sp call
The condition is freed in sp_head::execute, after calling
ha_spider::reset. This commit partially reverts the change in commit
e954d9de88, so that the condition is
always freed regardless of the wide_handler->sql_command, which will
prevent access to the freed condition later.

Signed-off-by: Yuchen Pei <yuchen.pei@mariadb.com>
2023-01-19 09:39:00 +11:00
Oleksandr Byelkin
da798c9511 new PCRE2 10.42 2023-01-18 15:52:51 +01:00
Oleksandr Byelkin
86059fd10a Merge branch '10.4' into 10.5 2023-01-18 14:52:13 +01:00
Rucha Deodhar
ff72a9431a MDEV-26392: Crash with json_get_path_next and 10.5.12
Analysis:
When we skip level when path is found, it changes the state of the json
engine. This breaks the sequence for json_get_path_next() which is called at
the end to ensure json document is valid and leads to crash.
Fix:
Use json_scan_next() at the end to check if json document has correct
syntax (is valid).
2023-01-18 16:28:50 +05:30