Commit graph

202647 commits

Author SHA1 Message Date
ecb55ff49a 2025-03-05 14:12:56 2025-03-05 14:12:56 +07:00
2172a67359 2025-03-05 14:02:19 2025-03-05 14:02:20 +07:00
Sergei Petrunia
80067a69fe MDEV-36057: Assertion failure on 2nd execution of parameterized PS
Followup to fix for MDEV-35318: In Prepared_statement::execute_loop(),
if we enter this function with lex->needs_reprepare=true, we need to
re-prepare the statement.
We also need to call set_parameters() to get PS parameter values. We
failed to do this and that's the bug.

Note that we need to also handle the other reprepare scenario: when
we get into Prepared_statement::execute_loop(), call set_parameters()
and then hit a "DDL was changed" error with reprepare_observer,
we should NOT call set_parameters() again.
The parameters have already been transferred to the reprepared statement
in Prepared_statement::reprepare()|swap_parameter_array().
2025-02-11 18:33:44 +02:00
Sergei Golubchik
2d971709a8 MDEV-36026 Problem with INSERT SELECT on NOT NULL columns while having BEFORE UPDATE trigger
MDEV-8605 and MDEV-19761 didn't handle INSERT (columns) SELECT

followup for a69da0c31e
2025-02-10 15:26:08 +01:00
Sergei Golubchik
2b17265ae2 MDEV-35186 IGNORED attribute has no effect on vector keys 2025-02-10 12:22:05 +01:00
Sergey Vojtovich
55d1f6c229 MDEV-35069 IMPORT TABLESPACE does not work for tables with vector, although allowed
Propagate discard/import tablespace request to hlindexes.

Let FLUSH TABLES ... FOR EXPORT open/lock hlindexes, so that InnoDB
prepares hlindexes for export.

Moved reset_hlindexes() to external_lock(F_UNLCK), so that hlindexes
are available for export until UNLOCK TABLES.

Closes #3631
2025-02-10 12:22:05 +01:00
Sergei Golubchik
e240da3b19 MDEV-35146 Vector-related error messages worth improving when possible
use THD::push_warning_truncated_value_for_field() to push the
truncated warning consistently with other data types
2025-02-10 12:22:05 +01:00
Sergei Golubchik
a37eb6d013 MDEV-35792 Adding a regular index on a vector column leads to invalid table structure
don't create a prefix key for types that don't support prefix keys
2025-02-10 12:22:05 +01:00
Sergei Golubchik
1ea79d1774 MDEV-35317 Server crashes in mhnsw_insert upon using vector key on a Spider table
don't allow VECTOR indexes in SPIDER tables
2025-02-10 12:22:05 +01:00
Sergei Golubchik
40d39b1176 MDEV-35221 Vector values do not survive mariadb-dump / restore
force --hex-dump for fields of GEOMETRY, BIT, and VECTOR types.

Until MDEV-35831 is fixed, vector type is detected by name.
2025-02-10 12:22:05 +01:00
Sergei Golubchik
a2f0234c82 MDEV-36011 Server crashes in Charset::mbminlen / Item_func_vec_fromtext::val_str upon mixing vector type with string 2025-02-06 21:47:01 +01:00
Sergei Golubchik
6fc75e0868 MDEV-35922 Server crashes in mhnsw_read_first upon using vector key with views 2025-02-06 21:47:01 +01:00
Sergei Golubchik
69041af67d only enforce innodb_force_primary_key when a table is created
not when a hlindex table is auto-discovered internally
2025-02-06 21:47:01 +01:00
Sergei Golubchik
5b8c087e84 MDEV-36005 Server crashes when checking/updating a table having vector key after enabling innodb_force_primary_key
if creating a hlindex table failed, it should not unlock
main table's plugin
2025-02-06 21:47:01 +01:00
Sergey Vojtovich
e928bf1c0e MDEV-35292 - ALTER TABLE re-creating vector key is no-op with non-copying alter algorithms (default)
ALTER TABLE didn't recognize VECTOR index options change and kept table
intact.

VECTOR indexes have their own options_struct, let ALTER TABLE use it.
2025-02-06 21:47:01 +01:00
Sergei Golubchik
c453391187 MDEV-35834 Server crash in FVector::distance_to upon concurrent SELECT
a start node in the shared context must be atomically assigned
to a valid and fully initialized node otherwise a concurrent
thread might use it before it's safe
2025-02-06 21:47:01 +01:00
Sergei Golubchik
44d0f5864e fix the test case 2025-02-06 16:48:07 +01:00
Sergei Golubchik
adc1beb868 relax the assert
it is possible (rocksdb_rpl.mdev12179) to have innobase_xa_prepare
called and then innobase_commit, not innobase_commit_ordered,
in autocommit mode. for example, with two XA-capable engines
and no binlog.

Or (galera.galera_as_master), WSREP_EMULATE_BINLOG() enables
binlogging but SQL_BIN_LOG=0 disables write_transaction_to_binlog().
2025-02-06 16:48:00 +01:00
Sergei Golubchik
fe31424e00 fix sporadic test failures caused by InnoDB #record estimation 2025-02-06 16:47:52 +01:00
Sergei Golubchik
ba01c2aaf0 Merge branch '11.4' into 11.7
* rpl.rpl_system_versioning_partitions updated for MDEV-32188
* innodb.row_size_error_log_warnings_3 changed error for MDEV-33658
  (checks are done in a different order)
2025-02-06 16:46:36 +01:00
Sergei Petrunia
14a80f0929 MDEV-35318 Assertion `tl->jtbm_subselect' failed... - PART 2
After the fix in the previous commit, we should never end up in a
situation where select_lex->first_cond_optimization=false (i.e, "it's done")
but select_lex->leaf_tables_saved==false ("not done").

So, in setup_tables(), revert the the condition added in the fix for
MDEV-25008. Add an assert instead.
2025-02-04 18:27:24 +02:00
Sergei Petrunia
0e21ff8ca4 MDEV-35318 Assertion `tl->jtbm_subselect' failed in JOIN::calc_allowed_top_level_tables
Alternative, more general fix, Variant 2.

The problem was as follows: Suppose we are running a PS/SP statement and
we get an error while doing optimization that is done once per statement
life. This may leave the statement data structures in an undefined state,
where it is not safe to execute it again.

The fix: introduce LEX::needs_reprepare and set it in such cases.
Make PS and SP runtime check it and re-prepare the statement before
executing it again.

We do not use Reprepare_observer, because it turns out it is tightly tied
to watching versions of statement's objects. For example, it must not be
used when running the statement for the first time, exactly when the
once-per-statement-lifetime optimizations are done.
2025-02-04 18:27:24 +02:00
Sergey Vojtovich
491e2b17a9 MDEV-35081 - Assertion `!n_mysql_tables_in_use' failed after error upon binary logging of DML involving vector table
InnoDB is limited to row-logging when transaction isolation level is
READ COMMITTED or READ UNCOMMITTED. This limitation is enforced by
a check within ha_innobase::external_lock().

InnoDB also expects number of "successful external locks" to match
number of "external unlocks", which is controlled by the assertion
in subject.

However "unlock" was called even after failing "lock" for high-level
indexes.

Fixed by calling "unlock" only after "successful lock".
2025-02-03 19:41:33 +01:00
ParadoxV5
697b88bf75 SHOW REPLICA STATUS: mark columns as unsigned
Update all integer columns of SHOW REPLICA STATUS (technically
INFORMATION_SCHEMA.SLAVE_STATUS) to unsigned because, well, they are (:.

Some `uint32` ones were accidentally using the `Field::store(double nr)`
overload because they forgot the `, true` for
`Field::store(longlong nr, bool unsigned_val)`.
The mistake’s harmless, fortunately, as `double` supports over 15
significant decimal digits, well over `uint32`’s 9-and-a-half.
2025-01-31 20:56:41 -07:00
ParadoxV5
aaa02f6aa3 MDEV-35693: Improve SHOW REPLICA STATUS column sizes
Resize the types and widths of SHOW REPLICA STATUS
(technically `INFORMATION_SCHEMA.SLAVE_STATUS`)
columns to better match their possible values

In case of intentionally but absurdly long lists,
text columns that list an uncapped number of elements
have expanded to accept as many bytes as we could support.

Particularly, the first-gen `Replicate_` filters were
incorrectly typed as singlular `Name()`s during MDEV-33526.
Under `Name`s’ 64-char limit, they could overflow
(read: truncate) even before their lengths got absurd.

In response to `‘MAX_SLAVE_ERRMSG’ was not declared in this scope` in
Embedded builds, a new `#ifdef HAVE_REPLICATION` guard wraps
`slave_status_info` to skip this unused data in Replication-less builds.

For testing, this commit forward-ports a modified cherry-pick of #3795
(the latter targets our oldest maintained LTS as part of MDEV-35948).

> Assert that 1st-gen `replicate_*` filter variables display
> their input – including long but reasonable lists –
> correctly (without truncation) in
> * direct SELECT
> * [semi-new] INFORMATION_SCHEMA.GLOBAL_VARIABLES.VARIABLE_VALUE
> * [new] SHOW REPLICA STATUS

Reviewed-by: Brandon Nesterenko <brandon.nesterenko@mariadb.com>
2025-01-31 20:56:41 -07:00
Sergei Golubchik
0771110266 MDEV-33658 1/2 FULLTEXT and SPATIAL keys are not "too long"
max_key_length applies only to PRIMARY/UNIQUE/MULTIPLE keys,
but not to FULLTEXT/SPATIAL/VECTOR keys.

this fixes main.partition_geometries test

followup for ecaedbe299
2025-01-30 18:48:50 +01:00
Sergei Golubchik
7d657fda64 Merge branch '10.11 into 11.4 2025-01-30 12:01:11 +01:00
Sergei Golubchik
e69f8cae1a Merge branch '10.6' into 10.11 2025-01-30 11:55:13 +01:00
Sergei Golubchik
0459517562 MDEV-35169 cleanup after the test
followup for f6e00abda0
2025-01-30 11:54:34 +01:00
Sergei Golubchik
5be38d14fc ColumnStore 23.10.3-1 2025-01-29 23:57:22 +01:00
Sergei Golubchik
92a6789638 C/C 3.4.4 2025-01-29 23:57:17 +01:00
Sergei Golubchik
04bd6ed44c MDEV-35368 Validation of SSL certificate fails for mariadb-backup
Just like in CONC-712, disable hostname checks for connections
over unix socket. Even for not self-signed certificates.
2025-01-29 23:56:54 +01:00
Sergei Golubchik
066e8d6aea Merge branch '10.5' into 10.6 2025-01-29 11:17:38 +01:00
Sergei Golubchik
a89e734fcb ColumnStore 6.4.10-1 2025-01-29 10:44:18 +01:00
Sergei Golubchik
d0c2a007ee C/C 3.3.14 2025-01-29 10:44:18 +01:00
Sergei Golubchik
17e31abd8b compilation failure on CentOS 7 2025-01-29 10:44:02 +01:00
Sergei Golubchik
38d3b6027b MDEV-35943 ASAN errors in Query_arena::free_items / fill_schema_table_from_frm
shouldn't try to close the table if open failed.

followup for deb20fb751
2025-01-29 10:43:34 +01:00
Sergei Golubchik
03d2328785 MDEV-35944 DELETE fails to notice transaction abort, violating ACID
Process errors of read_record().

Also, add an assert that Marko requested
2025-01-29 10:43:29 +01:00
Marko Mäkelä
d5e7bce14b MDEV-35966 galera.galera_as_master crashes in debug builds
innobase_commit(): When Galera is used with SET SQL_LOG_BIN=OFF,
some debug assertions that had been added in
commit ddd7d5d8e3 (MDEV-24035)
would fail. Let us relax those assertions for Galera transactions,
to allow an implicit commit after an internally executed XA PREPARE.

Note that trx_undo_report_row_operation() only allows undo log records
to be added to ACTIVE transactions (not after XA PREPARE). Hence, this
relaxation should be safe with respect to writes.
2025-01-29 10:42:57 +01:00
Marko Mäkelä
3cfffb4de6 MDEV-35962 CREATE INDEX fails to heal a FOREIGN KEY constraint
commit_cache_norebuild(): Replace any newly added indexes in
the attached foreign key constraints.
2025-01-29 09:04:50 +02:00
Sergei Golubchik
7eded23be6 ColumnStore 5.6.9-1 2025-01-28 19:31:29 +01:00
Sergei Golubchik
1fec4fc4f8 more C API methods in the service_sql
for columnstore
2025-01-28 19:31:29 +01:00
Sergei Golubchik
ffff702623 C/C 3.1.27 2025-01-28 19:31:29 +01:00
Sergei Golubchik
fafa10dbc4 update HeidiSQL to 12.10
also, switch to https
2025-01-28 19:31:29 +01:00
Sergei Golubchik
66cf3c6974 MDEV-35612 fix for system-versioning
only ignore fully invisible fields
2025-01-28 19:31:29 +01:00
Sergei Golubchik
c1933b46e4 MDEV-33285 make the test deterministic
need to clear old signals
before waiting for new signals with the same name
2025-01-28 19:31:29 +01:00
Sergei Golubchik
caec03cb79 MDEV-35907 debian-start script fails when using non-standard socket path
consistently use --defaults-extra-file for all command-line tools
2025-01-28 19:29:54 +01:00
Sergei Golubchik
9a0ac0cdf7 MDEV-35911 Assertion `marked_for_write_or_computed()' failed in bool Field_new_decimal::store_value(const my_decimal*, int*)
disable the assert.

also, use the same check for check_that_all_fields_are_given_values()
as it's used in not_null_fields_have_null_values() - to avoid
issuing the same warning twice.
2025-01-28 19:29:54 +01:00
Thirunarayanan Balathandayuthapani
f6e00abda0 MDEV-35169 ALTER TABLE...IMPORT TABLESPACE does not work with INDEX DESC
Problem:
=======
- Import tablespace fails to check the index fields descending
property while matching the schema given in cfg file with the
table schema.

Fix:
===
row_quiesce_write_index_fields(): Write the descending
property of the field into field fixed length field.
Since the field fixed length uses only 10 bits,
InnoDB can use 0th bit of the field fixed length
to store the descending field property.

row_import_cfg_read_index_fields(): Read the field
descending information from field fixed length.
2025-01-28 11:56:35 +05:30
Dave Gosselin
b8b77177c2 MDEV-35964 fix cast warnings on mac in mysql_file.h
Cast create_flags to mode_t when passing to my_create and
my_create_with_symlink
2025-01-28 11:19:52 +11:00