Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Console View


Categories: connectors experimental galera main
Legend:   Passed Failed Warnings Failed Again Running Exception Offline No data

connectors experimental galera main
Daniel Black
MDEV-39813 ST_GeomFromGeoJSON does not control recursion depth

Geometry::create_from_json reset the killedptr and the stack
depth (stack_p) every time json_scan_start was called. We save/
restore these values so that the ST_GeomFrom_GeoJSON can be killed
and incur timeout, and also so that its depth measurement is kept.

Test case an bug report thanks to byteoverride.
Daniel Black
Merge 10.6 into 10.11
Daniel Black
MDEV-39276: Assertion `0` failed in json_find_path

This was resolved with MDEV-35548, however we add
two additional test cases.
Sergei Golubchik
MDEV-40340 mariadb-import --lock-tables crashes

don't change `argv` pointer, it's needed later for --lock-tables
Dave Gosselin
MDEV-40143: st_isvalid() does not clear NULL state between rows

The st_isvalid() function evaluates nullability on every row.  Previously,
it would preserve potentially stale null state between rows, so the first
row yielding a null result for st_isvalid() would propagate to the results
for the remaining rows.

Implementation-wise, this patch changes the Item_func_isvalid::val_int
method implementation to work like Item_func_validate::val_str in that it
assumes that the method will indicate a null result for the row unless
it returns a non-null result, at which point it clears the null_value flag.
Daniel Black
MDEV-39691 wsrep.cnf contains deprecated wsrep_causal_reads

wsrep_causal_reads was deprecated in 10.1.3 and removed in 11.3.1.
Put in place the equivalent (and default) wsrep_sync_wait=0.

Amend a few early comments to show MariaDB as our product.
Dave Gosselin
MDEV-39914:  Crash in ST_SIMPLIFY used in an IN list

A geometry function writes its binary result into a buffer given by
the caller.  ST_SIMPLIFY did not set the charset of that buffer.  A
constant value in an IN list, though, is stored into the array that IN
builds for its comparisons, and that array has no charset.  Appending
the geometry then read an invalid charset and crashed the server.

Set the result buffer to the binary charset before writing the
geometry, matching what the other geometry functions already do.
Sergei Golubchik
MDEV-40312 SHOW CREATE SERVER incorrect quoting

quote protocol name and option names
Brandon Nesterenko
MDEV-39302: main.xa wrong errno ER_XAER_NOTA instead of ER_XA_RBROLLBACK

Revert some changes of bead24b7f3dff5a1fe8bcd283eccb7b654495b3e
which incorrectly removed wait_until_count_sessions.inc from xa.test.
This test relies on having fully disconnected sessions with prepared XA
transactions before progressing with the test. I.e., the prepared
transaction must be made fully recoverable before the test progresses to
try and XA COMMIT/ROLLBACK the transaction.

Signed-off-by: Brandon Nesterenko <[email protected]>
Daniel Black
MDEV-39541 mem_pressure::~mem_pressure() causes a crash on bootstrap

Fill in the anomaly shutdown paths of InnoDB to include call to
buf_mem_pressure_shutdown now that MDEV-39585 provides some
proper calls shutdown InnoDB and other plugins during the shutdown
under --bootstrap.

Alternate: destructor attribute on buf_mem_pressure_shutdown would
acheive the same thing and given Linux compilers are capabile of
this. This is possible as mem_pressure is currently implemented
in Linux only.
bsrikanth-mariadb
MDEV-39916: Crash when pushing "NOT col" from HAVING into WHERE

"NOT column" rewrites itself into "column = 0" in fix_fields().
However the rewrite is not done when the "column" is wrapped in an Item_ref.

Later, pushdown_from_having_into_where() will strip the Item_ref object
and will call
  Item_func_not(Item_field())->fix_fields(thd, ref=NULL);
This call will attempt the rewrite and crash when writing into NULL pointer.

Fixed this in two places:
* Make Ittem_func_not::fix_fields() use real_item() and so recognize fields
  wrapped in Item_ref-like objects.

* Make pushdown_from_having_into_where() pass the right pointer as
  fix_fields() argument.
bsrikanth-mariadb
MDEV-16462: explain format=json produces illegal json text

The attached_condition field of the produced json text had
"String with illegal unicode symbol" instead of the proper unicode
value.

The reason is that, the item field when being written to the json
writer in write_item(), used a String with charset my_charset_bin,
and that prevented the string from being escaped.

Solution is to change: -
1. charset to my_charset_utf8mb4_bin in sql_explain.cc.
2. Item::print_value(), handle string type specially if
  the charset is my_charset_bin by appending hex value.
Sergei Golubchik
MDEV-40311 mariadb-dump doesn't always quote identifiers

11.8 part. SHOW CREATE SERVER
Daniel Black
MDEV-39585: Support SHUTDOWN command on Windows in bootstrap

Don't perform mysqld_win_initiate_shutdown under --bootstrap when
triggered by SHUTDOWN. With this we don't perform any service
interactions.

Then the shutdown can proceeded without then hard process termination
in mysqld_win_initiate_shutdown. This previously occurred because the
handle_connections_win() was never called in --bootstrap and therefore
startup_complete() was false.

Thanks Vladislav Vaintroub for investigation and providing
implementation guidance.
Sergei Golubchik
fix plugins.feedback_os_release failure on sles-1600

just the comment at the beginning of its /etc/os-release
is already more than 256 bytes
Sergei Golubchik
CREATE SERVER: fix option parsing to support backticks properly

CREATE SERVER used to:
* support arbitrary options in backticks and not in backticks
* hard-coded historical options worked *only* without backticks
* PORT range was different when given as a number or a string

all that is fixed, unused keywords are removed
Daniel Black
MDEV-40275: plugins.auth_ed25519 test falky - dropped users with connection warning

The slow cleanup of disconnected connections means that they
may still be visible as the DROP USER is executed. Ignore these
warnings.
Daniel Black
MDEV-39585 mariadb bootstrap fails to perform plugin deinitalization

mariadbd under --bootstrap failed to preform plugin deinitialization.

The sleep(2);exit is removed and replaced to a goto termination label
to perform the same shutdown procedure of the server after all the
connection closing.

To prevent a compile error about char *user being uninitialized
this sql_print_information(ER_DEFAULT(ER_NORMAL_SHUTDOWN)) is moved to
its own block. The memory free did need to occur in the bootstrap mode
too to avoid memory leak errors.

wait_for_signal_thread_to_end(), was previously in close_connections()
however its required too for --bootstrap.
Sergei Golubchik
mysqldump: remove dead and broken code

since 2006 (3840774309bc) mysqldump tried to be smart when dumping
events - it tried to automatically detected a delimiter per event
that was not present in the event body, using ";;" by default.

This never worked, was broken since the first commit. It either used
the default ";;" or failed after trying the same ";;" delimiter
2147483646 times.

All other objects (routines, triggers, etc) used a hard-coded ";;"
for 20 years, which apparently worked fine. Let's remove the old
broken logic and dump events like all other objects,
Sergei Petrunia
MDEV-39005: Assertion failure on hint-forced Split-Materialized plan

The problem: consider a query in form:
  t1 JOIN (SELECT a FROM t2 GROUP BY a) dt ON dt.a=t1.a

After fix for MDEV-30877, the optimizer computes the number of GROUP BY
groups that we will have in the materialized derived table. It is saved
into TABLE(dt)->used_stat_records and propagates into
TABLE(dt)->opt_range_condition_rows.

On the other hand, the Split-Materialized optimization tries to compute
the number of rows it expects to find in the Split-Materialized derived
table.

These two numbers may come into disagreement: Split-Materialized may
produce a higher number, save it into JOIN_TAB::records and cause this
assertion in apply_selectivity_for_table() to fail:

    double table_records= rows2double(s->records);
    DBUG_ASSERT(table_records == 0 ||
                sel <= s->table->opt_range_condition_rows /
                table_records);

We will have sel=1.0 but opt_range_condition_rows < table_records.

Cardinality computations in Split-Materialized code omit a lot, for example
they omit the fact GROUP BY operation will reduce the number or rows.

For now, use a trivial fix: make sure Split-Materialized's estimate of
JOIN_TAB::records doesn't exceed the derived table size.
Sergei Golubchik
MDEV-40311 mariadb-dump doesn't always quote identifiers

11.8 part. SHOW CREATE SERVER
Abdelrahman Hedia
MDEV-24931: Fix Bitmap<64>::is_prefix assertion with >64-column NATURAL JOIN on derived table

When a NATURAL JOIN operates on a derived table (or view with
derived_merge=off) having more than 64 columns, the optimizer's
generate_derived_keys_for_table() would:

1) Overflow a 32-bit shift: (key_part_map)(1 << parts) when parts >= 32
2) Create a derived key with more parts than Bitmap<64>/key_part_map can hold
3) Crash on DBUG_ASSERT(prefix_size <= width) in Bitmap<64>::is_prefix(65)

Fix: cap the number of hash-join KEYUSE entries for a materialized derived
table at the handler's max_key_parts(). Excess columns are excluded from the
key, so generate_derived_keys_for_table() never builds a key with more parts
than key_part_map (64 bits) or Bitmap<64> can represent. Also fix the shift
to cast before shifting: (key_part_map) 1 << parts.
Marko Mäkelä
Merge 11.4 into 11.8
Sergei Golubchik
MDEV-40311 also fix mariadb-show and mariadb-convert-table-format
Daniel Black
MDEV-39829/MDEV-33532 s3.debug test failure

MDEV-39516 corrected the interface with curl particularly around
passing options.

After this the s3.debug actually enabled curl debugging like is
was meant to. With this enabled, there are addition s3_test_ pattens
in the result file, from the error log where curl correctly provide
debug message.

ps-protocol test also failed under MDEV-33532 where a differnet
number of entries was recored.

Correct variations by using the $database/$table rather than just the
s3_test_ pattern.

As the purpose of this test is to check if s3_debug is dynamic, the
second part of the test searches for a previously, under s3_debug=1,
table t2 interaction, where the results should be NOT_FOUND.

Remove count from the result file to allow for different curl versions
and the possibiliy of being run under ps-protocol.
bsrikanth-mariadb
MDEV-40006: Prepared Statement Crash in varchar_upper_cmp_transformer() for '?'

Item_func_in::varchar_upper_cmp_transformer() clones Item_func_in
and its arguments and doesn't check if cloning has succeed.

Item_param (PS parameter, '?') doesn't implement cloning so will return
NULL from clone(). This will cause a crash.

Fixed by making varchar_upper_cmp_transformer() check clone results for NULL.
(Adding cloning support to Item_param is out of scope of this patch).
Marko Mäkelä
Merge 10.11 into 11.4
Marko Mäkelä
Merge 11.8 into 12.3
Brandon Nesterenko
MDEV-39302: main.xa wrong errno ER_XAER_NOTA instead of ER_XA_RBROLLBACK

When a session has a prepared an XA transaction (via XA PREPARE), if it
is not yet finalized (via XA COMMIT / ROLLBACK) when the session
disconnects, there is cleanup logic by the disconnecting session to put
this hanging transaction into a recoverable state. The main.xa test
follows a pattern where it disconnects these transactions, but doesn't
wait for the session to finalize before it tries to finalize these
transactions. If the transaction hasn't yet been put into a recoverable
state, when the test tries to XA COMMIT or XA ROLLBACK the transaction,
it results in the error:

mysqltest: At line 831: query 'xa commit 'c:foo'' failed: ER_XAER_NOTA (1397): XAER_NOTA: Unknown XID

The test is fixed by waiting for the XA PREPARE'ing session
to finalize and be disconnected before trying to recover/commit/rollback
it.

Signed-off-by: Brandon Nesterenko <[email protected]>
Sergei Golubchik
MDEV-40340 mariadb-import --lock-tables crashes

don't change `argv` pointer, it's needed later for --lock-tables
Dave Gosselin
MDEV-39911:  Crash in ST_SIMPLIFY of a collection geometry

ST_SIMPLIFY of a multilinestring, polygon, multipolygon, or geometry
collection reserved space for the result header but omitted the four
byte element count that it then appends.  This resulted in a buffer
overrun.

Reserve the full header size, including the count, in each of the four
collection simplify functions, the same fix applied for MDEV-35062 and
MDEV-36042.
Daniel Black
MDEV-37615: Clang based static analysis false postive reports on UNINIT_VAR

Clang upstream bug https://github.com/llvm/llvm-project/issues/173210
shows that a "int x=x" construct will in the intermediate representation
have code to read from x. With this generated sanitizer=undefined and
static analyzers will all see the uninitialized read and write.

Because clang has a stronger implementation of following paths to
uninitialized variables, "#define UNINIT_VAR(x) x" is the which
is what our release binaries use is the ideal path for this compiler.

Clang based compilers with error during compilation if any
uninitialized behaviour is detected at compile time because of
0c80ddb519bd06efbd7ccf2a2487b2503cd16db5.

Corrects MDEV-36542 - 6fd57f478f585249bdca242b1576ac0a7bd7aacf.
Daniel Black
spelling correction: support-files/wsrep.cnf.sh

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Rucha Deodhar
MDEV-32726: Fix failing test for freebsd for json

(10.6 backport)

Json test about max statement time fails with freebsd because on some
architectures the test might execute faster and the statement may not fail.

To simulate failure regardless of architecture, introduce a wait of seconds
longer than the max_statement_time.
Daniel Black
MDEV-39763 main.innodb_mrr_cpk fails under view protocol

The rows returned by this under view protocol where inconsistent.

Under view protocol the CREATE VIEW in a different connection
was providing statistics that ended up in the result.

To normalize the output:
* include/innodb_stable_estimates.inc for the test
* Use analyze with persistent stats on the tables.

Despite the CREATE VIEW being executed under view protocol, it
always failed as most cases in the test had t1 and t2 with the same
columns names and a SELECT * FROM t1,t2 form of query. Creating a
view from this query resulting in duplicate result field names
which can't happen in a view. To make the view protocol useful
the SELECT queries where modified to return columns from both
tables with different result field names.

Thanks Rex Johnston for guidance.
Daniel Black
MDEV-28404 JSON functions don't respect KILL QUERY

Or max_statement_time limit or MAX_DEPTH.

Correct interuptability and depth checking of:
* JSON_CONTAINS
* JSON_CONTAINS_PATH
* JSON_EXISTS
* JSON_EXTRACT
* JSON_KEYS
* ST_GeomFromGeoJSON

Populate in the json library the killed as a specific
error message. As the json library has a killed_ptr
is approprate it handles it.

As json_report_error now processes the killed there's
no need of thd->check_killed().

Verified that the path after every json_scan_next, the
location of checking the killed_ptr, reports errors
correctly.
Sergei Golubchik
mysqldump: remove dead and broken code

since 2006 (3840774309bc) mysqldump tried to be smart when dumping
events - it tried to automatically detected a delimiter per event
that was not present in the event body, using ";;" by default.

This never worked, was broken since the first commit. It either used
the default ";;" or failed after trying the same ";;" delimiter
2147483646 times.

All other objects (routines, triggers, etc) used a hard-coded ";;"
for 20 years, which apparently worked fine. Let's remove the old
broken logic and dump events like all other objects,
bsrikanth-mariadb
MDEV-16462: explain format=json produces illegal json text

The attached_condition field of the produced json text had
"String with illegal unicode symbol" instead of the proper unicode
value.

The reason is that, the item field when being written to the json
writer in write_item(), used a String with charset my_charset_bin,
and that prevented the string from being escaped.

Solution is to change: -
1. charset to my_charset_utf8mb4_bin in sql_explain.cc.
2. Item::print_value(), handle string type specially if
  the charset is my_charset_bin by appending hex value.
Sergei Golubchik
MDEV-40336 SET AUTHORIZATION un-expired passwords

don't allow SET SESSION AUTHORIZATION if the password expired
Daniel Black
MDEV-30518: JSON functions cannot be killed on big-endian (backport)

Backport to 10.6 without JSON_OVERLAPS

The json_engine killed_ptr was of type uchar however the enum
in the server is dependant on the architecture. On big-endian
architectures like IBM Z, retreiving a uchar* retreived the
unmodifed part of the THD->kill enum location and was always 0.

As C++11 allows enums to inherit a type, used uint32_t as the base
class of killed_state type in the server and used uint32_t in the
json library.

reload_acl_and_cache required an expression change to avoid
the compile error:
sql/sql_reload.cc:472:24: error: enumerated and non-enumerated
type in conditional expression [-Werror=enum-conversion]
  472 |  return result || (thd ? thd->killed : 0);

Added the kill_ptr assignment the following functions can be
killed:
* Item_func_json_depth::val_int
* Item_func_json_type::val_str
* Item_func_json_length::val_int

Item_func_json_array_append::val_str, check_killed() only applied
to json_error: label and not return_null.

Item_func_json_format::val_str(), corresponding to the SQL,
json_compact, json_detailed, json_loose - add debug instrumentation
for the func_json_notembedded test.

MDEV-26726 (fcd345de485f) added a json_pause_execution sync point
however the test case used debug_max_statement_time, which doesn't
exist. Fix the sync point name in the test.