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
improve test readability

fix confusing duplicate lines like

Invoke from Db: test, Rt: proc
Invoke from Db: test, Rt: proc
Sergei Golubchik
change Sql_path::from_text() to take a String, not LEX_CSTRING

* use str->c_ptr() for the error message
* pass correct charset
* remove redundant parsing Table_triggers_list::check_n_load
Sergei Golubchik
use standard SET PATH syntax in tests
Sergei Golubchik
PATH is not a chistic, it's like sql_mode, remembered implicitly per routine
Sergei Golubchik
relax assert to account for recursive RETURNS TEXT functions
sts-kokseng.wong
MDEV-34391 SET PATH statement

Definition
==========
Implement the SET PATH statement.
```
SET PATH 'schema1, schema2, schema3';
```

Function
--------
In MariaDB, the SQL-path will also be used to lookup packages in
package routine invocations, so the following script:

  SET PATH 'sys';
  SELECT UTL_ENCODE.BASE64_DECODE('data');

invokes SYS.UTL_ENCODE.BASE64_DECODE('data'), i.e. the function
BASE64_DECODE() in the packge UTL_ENCODE in the database SYS
(if such package and package routine exist).

MariaDB implementation details
------------------------------
The ticket's requirement stated the grammar should support delimited
identifiers with backticks or double quotes within the string quote,
ie: the single tick. A simple parser was implemented to handle this
requirement in Sql_path::from_text.

Only 16 schemas are supported per session - we do not want too many
schemas in the path anyway since it will impact performance. This also
means that the path cache is a simple static array for easier memory
management.
Sergei Golubchik
do NOT prefer itself in seemingly recursive calls, follow the path
Sergei Golubchik
free Sql_path in the destructor, perform cleanup in cleanup()
Sergei Golubchik
MDEV-37815 table engine attributes in partitioning is broken

remove copying of part_elem->option_struct to table->s->option_struct.
It meant that most of the time a handler had no access to its options
(that's why some handlers resorted to a complex process of guessing the
correct partition) and couldn't work concurrenty. Instead

* introduce handler::option_struct which will point to
  table->s->option_struct or part_elem->option_struct as appropriate,
  the handler can use it any time as needed. A handler should not use
  table->s->option_struct unless it really knows what it's doing and has
  verified that it doesn't break partitioning
* rename option_struct in table->s to option_struct_table and in
  part_elem to option_struct_part to emphasize it's semantics and
  prevent incorrect usage.
* fix engines accordingly.
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()
Sergei Golubchik
mysql.proc.path DEFAULT 'CURRENT_SCHEMA' NOT NULL
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
sporadic failure in galera.MDEV-35511
Sergei Golubchik
cleanup: remove #ifdef MYSQL_VERSION_ID

remove conditional compilation for old MariaDB versions.
Some were as old as MYSQL_VERSION_ID > 32300

Didn't touch engines hosted externally, like connect, mroonga,
and columnstore
Sergei Golubchik
parsing of table/index/field attributes: auto-alias all boolean values

also allow TRUE/FALSE for booleans
Sergei Golubchik
don't backtick-quote CURRENT_SCHEMA
Sergei Golubchik
cleanup: remove HTON_CAN_READ_CONNECT_STRING_IN_PARTITION

only set in spider, but not used even there.
no behavior changes.
Sergei Golubchik
remove unused arguments
Sergei Golubchik
cleanup: partition_element_iterator

reduce code duplication by introducing an iterator that
walks all partitions and subpartitions
Sergei Golubchik
MDEV-37815 field and index engine attributes in partitioning are broken

just like table attributes, field and index attributes must
be parsed using the underlying engine, not ha_partition.
Sergei Golubchik
MDEV-38523 Freeing unallocated data THD::set_db when path-resolved routine in trigger

add a test case
Sergei Golubchik
fix error message for assoc arrays
Sergei Golubchik
MDEV-37815 connect_string in partitioning is broken

let's simplify the code by removing copying of part_elem->connect_string
to table->s->connect_string. Move CONNECTION support from he server into
engines, engines define TOPTION("CONNECTION") if they want to support it,
it's stored in the option_struct and handled by the option_struct fix.
Problems:

* Mroonga used CONNECTION for something but there were no tests for it.
  Removed Mroonga support for CONNECTION as requested by the maintainer
  in MDEV-38530
* DROP/ALTER SERVER command used to close all tables using the server
  in question, avoiding the need for FLUSH TABLES. This functionality
  never worked for partitioned tables anyway and is now removed. Will be
  done properly in MDEV-37827.
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
add new column mysql.proc.path at the end of the table

to simplify downgrades and to avoid breaking applications
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
clarify the test for triggers with different paths
Sergei Golubchik
cleanup

* rename to follow the standard vprintf name convention
* remove `(LEX_CSTRING*) &lex_string` casts
* remove some redundant casts too
* LEX_CSTRING -> Lex_ident_db in path
* Hash_set<Sroutine_hash_entry>
* move assert out of the loop
* some comments and whitespace changes
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
fix name resolution of name1.name2()

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

Also, fix a bug with recursive function calls.
Sergei Golubchik
fix printing of per-partition engine options

paritioning has its own method for printing engine options,
it wasn't consistent with how table options were printed - didn't
use quotes, ignored sql_mode, so wasn't future and dump/import safe.

let's get rid of it and use the same method that prints per-table
engine options.
Sergei Golubchik
Don't implicitly search in CURRENT_SCHEMA

the intention was not to, but some code paths weren't fixed yet
Sergei Golubchik
more tests for duplicate values in path
Sergei Golubchik
old view doesn't store the path, need the same fallback as for triggers
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
disallow SET PATH in sf or trg while parsing

but also when executing, of course
Sergei Golubchik
consistency in error message naming
Sergei Golubchik
ubsan error, memcpy(dst, NULL, 0)
Sergei Golubchik
reserve PATH_SYM in the same way as NAMES_SYM
Sergei Golubchik
merge ErrConvMDQName into ErrConvDQName

and remove incorrect thd->db behavior