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
Sergei Golubchik
reserve PATH_SYM in the same way as NAMES_SYM
Sergei Golubchik
remove LEX::make_sp_name_sql_path()

it confusingly didn't have anything to do with sql path,
so merged into LEX::make_sp_name()
Andrei Elkin
MDEV-37541 Race of rolling back and committing transaction to binlog

Two transactions could binlog their completions in opposite to how it
is done in Engine. That is is rare situations ROLLBACK in Engine of
the dependency parent transaction could be scheduled by the
transaction before its binlogging. That give a follower dependency
child one get binlogged ahead of the parent.

For fixing this bug its necessary to ensure the binlogging phase is
always first one in the internal one-phase rollback protocol.

The commit combines
1. a code polishing piece over a part of MDEV-21117 that
  made binlog handlerton always commit first in no-2pc cases and
2. the same rule now applies to the rollback.

An added test demonstrates how the child could otherwise reach binlog
before its parent.
Kristian Nielsen
Binlog-in-engine: Add mariadb-backup option to omit binlog from the backup

Signed-off-by: Kristian Nielsen <[email protected]>
Sergei Golubchik
clarify the test for triggers with different paths
Sergei Golubchik
use standard SET PATH syntax in tests
Sergei Golubchik
small cleanup
Oleg Smirnov
MDEV-38045: Implement implicit query block names for optimizer hints

This patch implements support for implicit query block (QB) names in
optimizer hints, allowing hints to reference query blocks and tables
within derived tables, views and CTEs without requiring explicit
QB_NAME hints.

Examples.
-- Addressing a table inside a derived table using implicit QB name
select /*+ no_index(t1@dt) */ *
  from (select * from t1 where a > 10) as DT;
-- this is an equivalent to:
select /*+ no_index(t1@dt) */ * from
  (select /*+ qb_name(dt)*/ * from t1 where a > 10) as DT;
-- Addressing a query block corresponding to the derived table
select /*+ no_bnl(@dt) */ *
  from (select * from t1, t2 where t.1.a > t2.a) as DT;

-- View
create view v1 as select * from t1 where a > 10 and b > 100;
-- referencing a table inside a view by implicit QB name:
select /*+ index_merge(t1@v1 idx_a, idx_b) */ *
  from v1, t2 where v1.a = t2.a;
-- equivalent to:
create view v1 as select /*+ qb_name(qb_v1) */ *
  from t1 where a > 10 and b > 100;
select /*+ index_merge(t1@qb_v1 idx_a, idx_b) */ *
  from v1, t2 where v1.a = t2.a;

-- CTE
with aless100 as (select a from t1 where b <100)
  select /*+ index(t1@aless100) */ * from aless100;
-- equivalent to:
with aless100 as (select /*+ qb_name(aless100) */ a from t1 where b <100)
  select /*+ index(t1@aless100) */ * from aless100;

Key changes:

1. Two-stage hint resolution
  - Introduced hint_resolution_stage enum (EARLY/LATE) to control
    when different hint types are resolved:
    - EARLY stage: before opening tables (QB_NAME, MERGE hints)
    - LATE stage: after opening tables (all other hints)

2. Implicit QB name support
  - Derived table/view/CTE aliases can now be used as implicit query
    block names in hint syntax: @alias, table@alias
  - Derived tables inside views can be addressed from outer queries
    using their aliases
Sergei Golubchik
improve test readability

fix confusing duplicate lines like

Invoke from Db: test, Rt: proc
Invoke from Db: test, Rt: proc
Andrei Elkin
MDEV-37541 Race of rolling back and committing transaction to binlog

Two transactions could binlog their completions in opposite to how it
is done in Engine. That is is rare situations ROLLBACK in Engine of
the dependency parent transaction could be scheduled by the
transaction before its binlogging. That give a follower dependency
child one get binlogged ahead of the parent.

For fixing this bug its necessary to ensure the binlogging phase is
always first one in the internal one-phase rollback protocol.

The commit combines
1. a code polishing piece over a part of MDEV-21117 that
  made binlog handlerton always commit first in no-2pc cases and
2. the same rule now applies to the rollback.

An added test demonstrates how the child could otherwise reach binlog
before its parent.
Sergei Golubchik
disallow SET PATH in sf or trg while parsing

but also when executing, of course
Sergei Golubchik
mysql.proc.path DEFAULT 'CURRENT_SCHEMA' NOT NULL
Sergei Golubchik
bug: `current_schema` is not current_schema

quoted `current_schema` is literally a schema name and must
but treated as such. because Sql_path stores all names unquoted
let's store the current_schema as an empty name, length=0.
No valid schema name can be empty.
Sergei Golubchik
more tests for duplicate values in path
Kristian Nielsen
Binlog-in-engine: Add mariadb-backup option to omit binlog from the backup

Signed-off-by: Kristian Nielsen <[email protected]>
Sergei Petrunia
MDEV-38164: Fix the estimates reported by TABLE::key_storage_length()

(Cherry-pick into 12.2: the fix is enabled by default,
control via @@new_mode=FIX_INDEX_LOOKUP_COST is removed)

They were based on the maximum possible length key length, which
can be much larger than the actual data.

The return value is used by handler::keyread_time(), which is used
to estimate the cost of range access.
This could cause range access not to be picked, even if it uses
the clustered PK and reads about 8% of the table.

The fix is to add KEY::stat_storage_length (next to KEY::rec_per_key) and
have the storage engine fill it in handler::info(HA_STATUS_CONST).

Currently, only InnoDB fills this based on its internal statistics:
index->stat_index_size and ib_table->stat_n_rows.

Also changed:
- In handler::calculate_costs(), use ha_keyread_clustered_time() when
  computing clustered PK read cost, not ha_keyread_time().
Sergei Golubchik
relax assert to account for recursive RETURNS TEXT functions
Sergei Golubchik
merge ErrConvMDQName into ErrConvDQName

and remove incorrect thd->db behavior
Sergei Golubchik
PATH is not a chistic, it's like sql_mode, implicitly per routine
Kristian Nielsen
Binlog-in-engine: Add mariadb-backup option to omit binlog from the backup

Signed-off-by: Kristian Nielsen <[email protected]>
Sergei Golubchik
misc
Sergei Golubchik
remove Sql_path_stack and Sql_path_push

don't create a permanent stack of paths on the heap and in THD.

Do it on the stack like for sql_mode, sctx, abort_on_warning, and
other THD properties that often need to be changed temporarily.

Fix Sql_path constructor.
Sergei Golubchik
allocate Sql_path in one memory chunk, not one per schema

because it's always allocated and freed as a whole, there is
no operation "replace one name in the middle of the path"

this needed a reworked parser to create the whole list
of names, not append one name at a time.

Fixed a bug where Sql_path::from_text() pretended it can take
a string in any charset, but was always implicitly
assuming it's in my_charset_utf8mb3_general_ci.
Sergei Golubchik
add new column mysql.proc.path at the end of the table

to simplify downgrades and to avoid breaking applications
Sergei Golubchik
free Sql_path in the destructor, perform cleanup in cleanup()
Sergei Golubchik
fix name resolution of name1.name2()

only search in thd->db of the path includes CURRENT_SCHEMA

Also, fix a bug with recursive function calls.
Sergei Petrunia
MDEV-38164: Fix the estimates reported by TABLE::key_storage_length()

They were based on the maximum possible key tuple length, which can be
much larger than the real data size.

The return value is used by handler::keyread_time(), which is used
to estimate the cost of range access.
This could cause range access not to be picked, even if it uses
the clustered PK and reads about 8% of the table.

The fix is to add KEY::stat_storage_length (next to KEY::rec_per_key) and
have the storage engine fill it in handler::info(HA_STATUS_CONST).

Currently, only InnoDB fills this based on its internal statistics:
index->stat_index_size and ib_table->stat_n_rows.

Also changed:
- In handler::calculate_costs(), use ha_keyread_clustered_time() when
  computing clustered PK read cost, not ha_keyread_time().

The fix is OFF by default and enabled by setting FIX_INDEX_LOOKUP_COST flag
in @@new_mode.
Sergei Golubchik
fix error message for assoc arrays
Sergei Golubchik
do NOT prefer itself in seemingly recursive calls, follow the path
Sergei Golubchik
disallow SET PATH DEFAULT in stored routines and triggers

also fix Sys_var_charset_collation_map where this bug was copied from
Sergei Golubchik
consistency in error message naming
Sergei Golubchik
fix --path to work

complex object sysvars (plugins, time zone, path) cannot be
set by my_getopt, they have to use NO_CMD_LINE and special
code in mysqld.cc
Sergei Golubchik
remove always-false agument
Andrei Elkin
MDEV-37541 Race of rolling back and committing transaction to binlog

Two transactions could binlog their completions in opposite to how it
is done in Engine. That is is rare situations ROLLBACK in Engine of
the dependency parent transaction could be scheduled by the
transaction before its binlogging. That give a follower dependency
child one get binlogged ahead of the parent.

For fixing this bug its necessary to ensure the binlogging phase is
always first one in the internal one-phase rollback protocol.

The commit makes sure the binlog handlerton always rollbacks as first
handlerton in no-2pc cases.

An added test demonstrates how the child could otherwise reach binlog
before its parent.
Andrei Elkin
Merge commit '2fd25d77f031f48f501344b5d77aeea62b42da88' into
bb-10.11-release with will be replace by 10.11 specific one.
Sergei Golubchik
don't backtick-quote CURRENT_SCHEMA
Sergei Golubchik
cache routines during path resolution