Re: [Maria-developers] 97f7d4a9b4d: MDEV-22726: Add check that one can't change general or slow log to a

2020-06-26 Thread Sergei Golubchik
n easily bypass this check. And, anyway, why an engine would not support log tables? Only because it's transactional? Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-develo

Re: [Maria-developers] 97f7d4a9b4d: MDEV-22726: Add check that one can't change general or slow log to a

2020-06-25 Thread Sergei Golubchik
URN(true); > +} What about InnoDB? Or RocksDB? Or any other transactional engine? > #ifdef WITH_PARTITION_STORAGE_ENGINE > if (alter_info->flags & Alter_info::ALTER_PARTITION) > { > Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org __

Re: [Maria-developers] 9bdf35e90f3: MDEV-18215: mariabackup does not report unknown command line options

2020-06-25 Thread Sergei Golubchik
mysqld > 1) > +{ > + char **argv_mysqld= _args[0]; > + if ((ho_error= handle_options(_mysqld, _mysqld, > +xb_server_options, > xb_get_one_option))) > +exit(ho_error); > +} > + > +my_handle

Re: [Maria-developers] Using JSON_TABLE to create JSON columns?

2020-06-23 Thread Sergei Golubchik
ic in MDEV-17399 code doesn't have support for dumping a > portion > of JSON document, so one gets empty strings in the price column. > > Should we support Q1 with JSON output in the price column? If yes, should we > do it within the scope of MDEV-17399 or create another task for thi

Re: [Maria-developers] 3c81ed2f564: Add mytop to Client component for rpm package

2020-06-16 Thread Sergei Golubchik
or rpm package > > Part of MDEV-22552 This is ok. But don't push it yet, let's have all commits ok to push them all at once Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-

Re: [Maria-developers] 4cbbc796dcc: MDEV-22420 DDL on temporary object is prohibited when XA is in prepare state

2020-06-16 Thread Sergei Golubchik
any syntax whose lex > lex->tmp_table() > returns false here. > > RENAME specifically does not have 'temporary' qualifier. Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~ma

Re: [Maria-developers] 4cbbc796dcc: MDEV-22420 DDL on temporary object is prohibited when XA is in prepare state

2020-06-16 Thread Sergei Golubchik
IMPLICIT_COMMIT_BEGIN). > That reads every DDL, Admin, Account that are bin-logged. I mean RENAME for temporary tables. Does it also cause an implicit commit? Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: http

Re: [Maria-developers] 4cbbc796dcc: MDEV-22420 DDL on temporary object is prohibited when XA is in prepare state

2020-06-15 Thread Sergei Golubchik
at about RENAME? What other operations are there that don't open a table? 2. check_has_uncommitted_xa() already does er_xaer_rmfail() internally, you don't need to repeat it. Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing

Re: [Maria-developers] 250bc3b6d74: Ensure that table is truly dropped when using DROP TABLE

2020-06-14 Thread Sergei Golubchik
, bool if_exists, > > >path_length= build_table_filename(path, sizeof(path) - 1, db.str, > > > alias.str, reg_ext, 0); > > > } > > > + > > > DEBUG_SYNC(thd, "rm_table_no_locks_before_delete_

Re: [Maria-developers] c48b190824a: Fixed error messages from DROP VIEW to align with DROP TABLE

2020-06-13 Thread Sergei Golubchik
please, add a test for the case when a user has no privileges on test.t1, the object existence is not leaked out (if one has no privileges to know whether t1 exists or whether t1 is a view or a table, the error message should not divulge it). (the same for tables and for sequences in your next commit) &

Re: [Maria-developers] (no subject)

2020-06-12 Thread Sergei Golubchik
egin with I want to implement: > > +, -. *, /, ++, --, <, >, ==, != if/while support ==, !=, <, <=, >, >= so you have to do at least those. And then, yes, math, +, -, *, /, %. increment/decrement are less useful, may be do them later? Don't forget query_get_value(), it's a

Re: [Maria-developers] 250bc3b6d74: Ensure that table is truly dropped when using DROP TABLE

2020-06-12 Thread Sergei Golubchik
Hi, Michael! On Jun 11, Michael Widenius wrote: > revision-id: 250bc3b6d74 (mariadb-10.5.2-390-g250bc3b6d74) > parent(s): ba2c2cfb20e > author: Michael Widenius > committer: Michael Widenius > timestamp: 2020-06-11 11:33:55 +0300 > message: > > Ensure that table is truly dropped when using

Re: [Maria-developers] 2849076672d: MDEV-16470: switch off user variables (and fixes of its support)

2020-06-12 Thread Sergei Golubchik
++ b/sql/item_func.cc > @@ -4702,10 +4702,12 @@ update_hash(user_var_entry *entry, bool set_null, > void *ptr, size_t length, > entry->unsigned_flag= unsigned_arg; >} >entry->type=type; > +#ifdef USER_VAR_TACKING TRACKING > #ifndef EMBEDDED_LIBRARY >THD *thd= current_thd

Re: [Maria-developers] 5ff9525ff86: MDEV-22722 Assertion "inited==NONE" failed in handler::ha_index_init on the slave during UPDATE

2020-06-10 Thread Sergei Golubchik
TE_ROWS_EVENT) > + table->file->prepare_for_insert(1); > + You can simplify it as table->file->prepare_for_insert(get_general_type_code() != WRITE_ROWS_EVENT); otherwise ok to push Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org

Re: [Maria-developers] 06942363ebc: MDEV-14347 CREATE PROCEDURE returns no error when using an unknown variable

2020-06-09 Thread Sergei Golubchik
) walk() method defines the general API for traversing the tree. An individual processor is the user of that API. If some user has special weird needs, I'd prefer that to be implemented in that user processor, not in the general API used by many. > But returning to Item_ref, I just realized

Re: [Maria-developers] 06942363ebc: MDEV-14347 CREATE PROCEDURE returns no error when using an unknown variable

2020-06-07 Thread Sergei Golubchik
> + if (ref && *ref) > +return (*ref)->walk(processor, walk_subquery, arg) || > + (this->*processor)(arg); > + return false; > +} > + > + > /** >Transform an Item_ref object with a transformer callback function. > Regards, Sergei VP o

Re: [Maria-developers] 7df57cc8206: MDEV-22719 Long unique keys are not created when individual key_part->length < max_key_length but SUM(key_parts->length) > max_key_length

2020-06-03 Thread Sergei Golubchik
created when individual key_part->length > < max_key_length but SUM(key_parts->length) > max_key_length > > Make UNIQUE HASH key in case when key_info->key_length > max_key_length > Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org _

Re: [Maria-developers] 0f91c62d332: MDEV-22722 Assertion "inited==NONE" failed in handler::ha_index_init on the slave during UPDATE

2020-06-03 Thread Sergei Golubchik
s was set up by Table_map_log_event::do_apply_event() > @@ -14344,6 +14345,7 @@ int Rows_log_event::find_row(rpl_group_info *rgi) > issue_long_find_row_warning(get_general_type_code(), > m_table->alias.c_ptr(), > is_index_scan, rgi); >table->default_column

Re: [Maria-developers] 1e9ea675a18: MDEV-21282 Assertion 'mariadb_table' failed in gcol.innodb_virtual_debug_purge

2020-06-03 Thread Sergei Golubchik
ebug_purge > > - commit ea37b144094a0c2ebfc6774047fd473c1b2a8658 (MDEV-16678) caused > a regression. when purge thread tries to open the table for virtual > column computation, there is no need to acquire MDL for the table. > Because purge thread already hold MDL for the table Regards, Sergei VP

Re: [Maria-developers] e2017fc3a5f: MDEV-22441 implement a generic way to change a value of a variable in scope

2020-06-03 Thread Sergei Golubchik
e > +Scope_value make_scope_value(T , const T _value) > +{ > + return Scope_value(variable, scope_value); > +} as you've seen from Sql_mode_save usage, sometimes the value is assigned later, not when it's saved. Please, add another helper that doesn't req

Re: [Maria-developers] 0552ed86782: MDEV-21804 Assertion `marked_for_read()' failed upon INSERT into table with long unique blob under binlog_row_image=NOBLOB

2020-06-03 Thread Sergei Golubchik
{ > @@ -7152,6 +7151,7 @@ void TABLE::mark_columns_needed_for_insert() >/* Mark virtual columns for insert */ >if (vfield) > mark_virtual_columns_for_write(TRUE); > + mark_columns_per_binlog_row_image(); this looks ok. >if (check_constraints) > mark_check_constraint_columns

Re: [Maria-developers] Progress report - Week 4

2020-06-02 Thread Sergei Golubchik
k [25-31 May] of > Community Bonding Period under the mentor-ship of Sergei Golubchik and > Oleksandr Byelkin for GSoC-20. The tasks taken up for this week was to > study and analyze *INSERT SELECT RETURNING* and developing a test > suite for *MULTIPLE > TABLE DELETE RETURNING.* Re

Re: [Maria-developers] fab8349af86: MDEV-21804 Assertion `marked_for_read()' failed upon INSERT into table with long unique blob under binlog_row_image=NOBLOB

2020-06-01 Thread Sergei Golubchik
); >DBUG_ASSERT(marked_for_read()); >char *blob; >memcpy(, ptr+packlength, sizeof(char*)); A couple of red flags here. First, you don't fix BINLOG_ROW_IMAGE_MINIMAL. And generally you should not modify read/write sets from val_str, if should be done earlier before the execution

Re: [Maria-developers] 070df171c1e: MDEV-16937 Strict SQL with system versioned tables causes issues

2020-05-26 Thread Sergei Golubchik
7 Strict SQL with system versioned tables causes issues > > Respect system fields in NO_ZERO_DATE mode. > > This is the subject for refactoring in MDEV-19597 > Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mai

Re: [Maria-developers] cd9cab54aac: MDEV-20015 Assertion `!in_use->is_error()' failed in TABLE::update_virtual_field

2020-05-26 Thread Sergei Golubchik
_arena(expr_arena, _arena); >bitmap_clear_all(_set); >vf->vcol_info->expr->walk(::update_vcol_processor, 0, _set); >vf->vcol_info->expr->save_in_field(vf, 0); >in_use->restore_active_arena(expr_arena, _arena); > - DBUG_RETURN(in_use->

Re: [Maria-developers] 20d54b09830: Update galera to work with independent sub transactions

2020-05-20 Thread Sergei Golubchik
wsrep_on; > + thd->variables.wsrep_on= 0; >thd->server_status&= ~(SERVER_STATUS_IN_TRANS | > SERVER_STATUS_IN_TRANS_READONLY); >thd->server_status|= SERVER_STATUS_AUTOCOMMIT; Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org __

Re: [Maria-developers] b22a28c2295: fixup! 3fe5cd5e1785e3e8de7add9977a1c2ddd403538b

2020-05-20 Thread Sergei Golubchik
> - ha_info= ha_info->next()) > -DBUG_ASSERT(ha_info->ht() != binlog_hton); > -#endif >rc= write_empty_xa_prepare(thd, cache_mngr); // normally gains > need_unlog >trans_register_ha(thd, true, binlog_hton, 0); // do it for futur

Re: [Maria-developers] c5238d7b3b7: MDEV-22545: my_vsnprintf behaves not as in C standard

2020-05-20 Thread Sergei Golubchik
t; '1...' > value found during parsing > +ERROR 22007: Illegal double > '1111

Re: [Maria-developers] acbe14b122c: Aria will now register it's transactions

2020-05-20 Thread Sergei Golubchik
(hton->commit)]; > + tmp= [MY_TEST(hton->commit && !(hton->flags & > HTON_NO_ROLLBACK))]; Why not to say that hton->rollback==NULL means no rollback? Then you won't need a new flag for that. And you'll remove redundancy, what would it mean if HTON_NO_ROLLBACK is present, but hton->ro

Re: [Maria-developers] b97e45651d1: MDEV-16937 Strict SQL with system versioned tables causes issues

2020-05-19 Thread Sergei Golubchik
; > > +++ b/mysql-test/suite/versioning/r/select.result > > > @@ -45,7 +45,7 @@ ASOF_x y > > > 7107 > > > 8108 > > > 9109 > > > -select x as FROMTO_x, y from t1 for system_time from timestamp '0-0-0 > > > 0:0:0' to ti

Re: [Maria-developers] 82b6a5cb85f: MDEV-22556: Incorrect result for window function when using encrypt-tmp-files=ON

2020-05-17 Thread Sergei Golubchik
--loose-file-key-management-filekey=FILE:$MTR_SUITE_DIR/t/filekeys-data.key this is very redundant, you include have_file_key_management_plugin.inc and it already sets all options for the file_key_management plugin to work. so you only need --encrypt-tmp_files=ON here. Regards

Re: [Maria-developers] b97e45651d1: MDEV-16937 Strict SQL with system versioned tables causes issues

2020-05-17 Thread Sergei Golubchik
if (!(field->flags & VERS_SYSTEM_FIELD)) > + error= make_empty_rec_store_default(thd, regfield, > field->default_value); will the field be initialized at all? It should have something, even bzero will do, but we shouldn't dump uninited memory to frm. > delete

Re: [Maria-developers] Progress Report - Week 1

2020-05-12 Thread Sergei Golubchik
Hi, Mohammed! On May 11, Mohammed Hammaad Mateen wrote: > Greetings, > Hope you are safe and doing great, > > This post describes the things I've done in my first week [ 4-10 May ] of > Community Bonding Period under the mentor-ship of Sergei Golubchik and > Oleksandr Byelkin

Re: [Maria-developers] 4312f382b6f: MDEV-22312: Bad error message for SET DEFAULT ROLE when user account is not granted the role

2020-05-08 Thread Sergei Golubchik
MDEV-22312 */ don't put MDEV numbers into the code, please. > +/* If the current user can see the role generate different type of > error. */ > +if(user_can_see_role) > +{ > + my_error(ER_SET_DEFAULT_ROLE_FOR_USER, MYF(0), c_usr.ptr(), rolename); > + result= 1;

Re: [Maria-developers] d08860b28f3: MDEV-22374: VIEW with security definer require FILE privilege from definer not invoker in case of INTO OUTFILE

2020-05-04 Thread Sergei Golubchik
parse.cc b/sql/sql_parse.cc --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -5204,7 +5204,8 @@ check_table_access(THD *thd, ulong requirements,TABLE_LIS> Register access for view underlying table. Remove SHOW_VIEW_ACL, because it will be checked during making view */ -table

Re: [Maria-developers] 5150dfd6ab3: MDEV-17891 Assertion failures in select_insert::abort_result_set and mysql_load upon attempt to replace into a full table

2020-04-27 Thread Sergei Golubchik
100644 > --- a/sql/sql_insert.cc > +++ b/sql/sql_insert.cc > @@ -1953,6 +1953,8 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info) >if (likely(!error)) >{ > info->deleted++; > +if (!table->file->has_transactions(

Re: [Maria-developers] 8a990ad1774: MDEV-18319 BIGINT UNSIGNED Performance issue

2020-04-27 Thread Sergei Golubchik
array. > + } >m_comparators[m_comparator_count].m_handler= tmp.type_handler(); >m_comparators[m_comparator_count].m_arg_index= value_index; >m_comparator_count++; > diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h > index 06f15503258a..4e84c3008578 100644 > --- a/sql/i

Re: [Maria-developers] 00f9df29224: MDEV-20787: Script dgcov.pl does not work

2020-04-23 Thread Sergei Golubchik
(<$_.gcov): $!"; > + } > + else > + { > +my $f=substr $_, 0, -5; > +open FH, '<', "$f.gcov" or die "open(<$f.gcov): $!"; > +undef $f; > + } I'd rather write it more compact, in two lines like my $f = $gcov_vers < 7 ? $_ : sub

Re: [Maria-developers] 7d593466a22: MDEV-20015 Assertion `!in_use->is_error()' failed in TABLE::update_virtual_field

2020-04-23 Thread Sergei Golubchik
l_field() with clear > DA since no matter how SQL command is finished it must update the > index after bulk INSERT. > Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria

Re: [Maria-developers] 784cc5970dd: MDEV-19650: Privilege bug on MariaDB 10.4

2020-04-21 Thread Sergei Golubchik
e(s) or column(s) or function(s) or > definer/invoker of view lack rights to use them This must be a bug. If one does SELECT * INTO OUTFILE FROM some.view than the current user should have FILE, not the view definer. Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.o

Re: [Maria-developers] 784cc5970dd: MDEV-19650: Privilege bug on MariaDB 10.4

2020-04-20 Thread Sergei Golubchik
t suite (not main, but I don't remember > exactly) test which require the permission otherwise I would not return and > add more rights. Where? The view is clearly not insertable-into, so INSERT privilege is meaningless. Some fields are updateable, and one can delele from it. This was more acci

Re: [Maria-developers] 784cc5970dd: MDEV-19650: Privilege bug on MariaDB 10.4

2020-04-20 Thread Sergei Golubchik
INSERT INTO global_priv SELECT * FROM tmp_user_sys WHERE NOT > > @had_sys_user; > > > +DROP TABLE tmp_user_sys; > > > > 1. This could've been simply INSERT IGNORE, I suspect > > Nope, the idea is do not insert more than needed. Why would INSERT IGNORE insert more

Re: [Maria-developers] 784cc5970dd: MDEV-19650: Privilege bug on MariaDB 10.4

2020-04-20 Thread Sergei Golubchik
> Column_name char(64) binary DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL > DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, Column_priv > set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT > '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_nam

Re: [Maria-developers] bc5c062b1d1: Don't try to open temporary tables if there are no temporary tables

2020-04-17 Thread Sergei Golubchik
Hi, Michael! On Apr 16, Michael Widenius wrote: > Hi! > > On Thu, Apr 16, 2020 at 1:17 PM Sergei Golubchik wrote: > > > > Hi, Michael! > > > > On Apr 13, Michael Widenius wrote: > > > revision-id: bc5c062b1d1 (mariadb-10.5.2-124-gbc5c062b1d1) > >

Re: [Maria-developers] 9243921c84b: Make all #sql temporary table names uniform

2020-04-17 Thread Sergei Golubchik
adow-- then any truncation will only affect the "original_name" part and it'll be fine. Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-

Re: [Maria-developers] faf8de3aa98: Fixed some assert crashes related to keyread.

2020-04-17 Thread Sergei Golubchik
Hi, Michael! On Apr 16, Michael Widenius wrote: > Hi! > > On Thu, Apr 16, 2020 at 1:17 PM Sergei Golubchik wrote: > > > > where's a test case for MDEV-22077? > > One can't use the test case in MDEV-22077 as it involves a table > created by a 32 bit MariaDB ve

Re: [Maria-developers] bf32018be96: Added support for VISIBLE attribute for indexes in CREATE TABLE

2020-04-17 Thread Sergei Golubchik
Hi, Michael! On Apr 16, Michael Widenius wrote: > On Thu, Apr 16, 2020 at 1:17 PM Sergei Golubchik wrote: > > On Apr 13, Michael Widenius wrote: > > > revision-id: bf32018be96 (mariadb-10.5.2-126-gbf32018be96) > > > parent(s): 62c2d0f3e1f > > > author: Michae

Re: [Maria-developers] 8742d176bc2: Added support for more functions when using partitioned S3 tables

2020-04-17 Thread Sergei Golubchik
rom_binary_frm_image(THD *thd, bool write, > const uchar *frm_image, > -size_t frm_length) > +size_t frm_length, > +

Re: [Maria-developers] 9243921c84b: Make all #sql temporary table names uniform

2020-04-15 Thread Sergei Golubchik
with the comment Added --temp-pool option to mysqld. This will cause temporary files created to use a small set of filenames, to try and avoid problems in the Linux kernel. And I doubt it's still an issue in 2020. Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb

Re: [Maria-developers] bf32018be96: Added support for VISIBLE attribute for indexes in CREATE TABLE

2020-04-15 Thread Sergei Golubchik
L Workbench has a configuration option whether to put this VISIBLE in the sql file or not. This is a client tool misconfiguration issue. I think the user can trivially tell his tool not to generate MariaDB-incompatible syntax and we don't have to change the server for this. Regards, Ser

Re: [Maria-developers] 62c2d0f3e1f: Added mariadb-config.1 to .gitignore

2020-04-13 Thread Sergei Golubchik
,6 +581,7 @@ man/mariadb-check.1 > man/mariadb-client-test.1 > man/mariadb-client-test-embedded.1 > man/mariadb_config.1 > +man/mariadb-config.1 > man/mariadb-convert-table-format.1 > man/mariadbd.8 > man/mariadbd-multi.1 > Regards, S

Re: [Maria-developers] bc5c062b1d1: Don't try to open temporary tables if there are no temporary tables

2020-04-13 Thread Sergei Golubchik
mporary_tables()); please, never do asserts with &&-ed conditions, this should be DBUG_ASSERT(!tl->derived); DBUG_ASSERT(!tl->schema_table); DBUG_ASSERT(has_temporary_tables()); > - if (tl->open_type == OT_BASE_ONLY || !has_temporary_tables()) > + if (

Re: [Maria-developers] fb29c886701: Handle errors from external_unlock & mysql_unlock_tables

2020-04-13 Thread Sergei Golubchik
if (error == EBUSY) > - return error; > + goto end; >} >else > error= pthread_mutex_lock(>mutex); > @@ -393,6 +394,8 @@ int safe_mutex_lock(safe_mutex_t *mp, myf my_flags, const > char *file, > } >} > > +end: > + DBUG

Re: [Maria-developers] 22fb7f8995c: Updated client and server to use new binary names in --debug traces

2020-04-13 Thread Sergei Golubchik
to use new binary names in --debug traces ok to push Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe

Re: [Maria-developers] 3cbe15bd78c: Fixed core dump in alter table if ADD PARTITION fails

2020-04-13 Thread Sergei Golubchik
t removes close_table completely, so I expect it to work for S3 just as you wanted. >{ > /* >All instances of this table needs to be closed. > Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing lis

Re: [Maria-developers] d4d332d196d: Added error message to --die in mtr

2020-04-13 Thread Sergei Golubchik
argument : > +"Explicite --die command executed"); typo. "Explicit" > break; >case Q_EXIT: > /* Stop processing any more commands */ Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org __

Re: [Maria-developers] 9941c6a3179: MDEV-17554 Auto-create new partition for system versioned tables with history partitioned by INTERVAL/LIMIT

2020-04-09 Thread Sergei Golubchik
ting one that looked at least remotely relevant" > To be continued... I've attached a proof-of-concept patch that adds a partition using fallback-and-retry mechanism of open_table(). Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org commit b5b14eaa775 Author: Sergei G

Re: [Maria-developers] 7665323d02a: MENT-202 Implement system variable that makes slow master shutdown the default behavior

2020-04-07 Thread Sergei Golubchik
E), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), > ON_UPDATE(0)); You don't need to write all this tail of the default behavior. The last line could be just DEFAULT(FALSE)); Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org _

Re: [Maria-developers] 9941c6a3179: MDEV-17554 Auto-create new partition for system versioned tables with history partitioned by INTERVAL/LIMIT

2020-04-07 Thread Sergei Golubchik
>set_query(qs); > +} > + > +if (fast_alter_partition_table(thd, table, _info, _info, > + tl, >s->db, >s->table_name)) > +{ > + push_warning(thd, Sql_condition::WARN_LEVEL_WARN, > WAR

Re: [Maria-developers] 7b03ce7af3d: MDEV-17395 REPLACE/INSERT ODKU: support WITHOUT OVERLAPS

2020-04-06 Thread Sergei Golubchik
PERIOD > > implicitly for updates and deletes. > > > Sure, option two should be chosen. I rewrote the code Why option two? Do you know use cases that would justify this behavior? Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org __

Re: [Maria-developers] a737b71295e: Cleanup mysql_inplace_alter_table()

2020-04-02 Thread Sergei Golubchik
ysql_inplace_alter_table() > > Removed redundant tdc_remove_table(TDC_RT_REMOVE_ALL). Share was marked > flushed by preceding wait_while_table_is_used() and eventually flushed by > close_all_tables_for_name(). > > Part of MDEV-17882 - Cleanup refresh version > Regards, Serg

Re: [Maria-developers] 5c26e91f755: Cleanup close_all_tables_for_name()

2020-04-02 Thread Sergei Golubchik
Hi, Sergey! okay then On Apr 02, Sergey Vojtovich wrote: > Sergei, > > On Thu, Apr 02, 2020 at 11:43:26AM +0200, Sergei Golubchik wrote: > > Hi, Sergey! > > > > On Apr 01, Sergey Vojtovich wrote: > > > revision-id: 5c26e91f755 (mariadb-10.5.0-70-g5c26e

Re: [Maria-developers] 6daf451415f: Let "FTWRL " use extra(HA_EXTRA_FLUSH)

2020-04-02 Thread Sergei Golubchik
Hi, Sergey! On Apr 02, Sergey Vojtovich wrote: > On Thu, Apr 02, 2020 at 11:43:14AM +0200, Sergei Golubchik wrote: > > Hi, Sergey! > > > > On Apr 01, Sergey Vojtovich wrote: > > > revision-id: 6daf451415f (mariadb-10.5.0-69-g6daf451415f) > > > pare

Re: [Maria-developers] df4db9a1ea1: Yet less TDC hash lookups

2020-04-02 Thread Sergei Golubchik
sh lookups > > Let auto repair table and truncate table routines flush TABLE_SHARE > directly. > > Part of MDEV-17882 - Cleanup refresh version > Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___

Re: [Maria-developers] df0de9c652d: Proper locking for mysql.gtid_slave_pos truncation

2020-04-02 Thread Sergei Golubchik
for mysql.gtid_slave_pos truncation > Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad

Re: [Maria-developers] f92e6520a62: tc_remove_all_unused_tables() cleanup

2020-04-02 Thread Sergei Golubchik
_unused_tables() cleanup > > As tc_purge() never marks share flushed, let tdc_remove_table() do it > directly. sure Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-develope

Re: [Maria-developers] eeba5b2b158: Fixed close_cached_connection_tables() flushing

2020-04-02 Thread Sergei Golubchik
+ DBUG_RETURN(close_cached_tables(thd, argument.tables, true, > + thd->variables.lock_wait_timeout)); are you sure you want to do it when argument.tables is empty? It'll do purge_tables() which seems to be a bit extreme for DROP SERVER > } > Regards

Re: [Maria-developers] 269793896c4: Split tdc_remove_table()

2020-04-02 Thread Sergei Golubchik
eference, which means we can > avoid hash lookup and flush unused TABLE instances directly. > > TDC_RT_REMOVE_UNUSED -> TDC_element::flush_unused(). Only [ab]used by > mysql_admin_table() currently. Should be removed eventually. > > Part of MDEV-17882 - Cleanup refresh

Re: [Maria-developers] 5c26e91f755: Cleanup close_all_tables_for_name()

2020-04-02 Thread Sergei Golubchik
t;{ > result= true; > break; >} > - table->file->extra(HA_EXTRA_PREPARE_FOR_FORCED_CLOSE); >close_all_tables_for_name(thd, table->s, HA_EXTRA_NOT_USED, NULL); > } the rest is fine Regards, Sergei VP of MariaDB Server Engineering and sec

Re: [Maria-developers] 6daf451415f: Let "FTWRL " use extra(HA_EXTRA_FLUSH)

2020-04-02 Thread Sergei Golubchik
gt;} > > + if (thd->lex->type & REFRESH_READ_LOCK) > + { > +for (auto table_list= all_tables; table_list; > + table_list= table_list->next_global) > +{ > + if (table_list->table->file->extra(HA_EXTRA_FLUSH)) > +goto error_re

Re: [Maria-developers] 46c66698d63: MENT-566 jUnit xml fixes

2020-04-01 Thread Sergei Golubchik
Hi, Rasmus! On Apr 01, Rasmus Johansson wrote: > Hi Serg, > > Thanks for the review. I've addressed the review comments in commit 1cedc95 > in branch 10.2-MENT-566. See below for comments. Looks good now, thanks. Ok to push Please squash these commits before pushing, though Regard

Re: [Maria-developers] 7740cb24572: Don't use plugin->data for storage engine plugins

2020-03-31 Thread Sergei Golubchik
for storage engine plugins > > Use plugin->plugin->info->hton instead. > plugin_data() replaced with plugin_hton(). > plugin_hton() must never return NULL anymore and is only good to be called > against plugins in PLUGIN_IS_READY state. Why is that? Regards, Sergei VP of

Re: [Maria-developers] 46c66698d63: MENT-566 jUnit xml fixes

2020-03-30 Thread Sergei Golubchik
l not be wrong, because your condition $test eq @sorted_tests[$#sorted_tests] can only be true once, for the very last test. So you can as well remove the whole if() and put the unconditional $xml_report .= "\t\n"; after the loop. > +} > + > +$xml_

Re: [Maria-developers] GSOC 2020 - MDEV-11263 Aggregate Window Functions

2020-03-30 Thread Sergei Golubchik
give an idea about when >will direct added be true ? In fact in all the uses for >direct_added, it is always in an unlikely branch in Item_sum.cc. This was added specifically for and is only used by the spider engine. If you run spider tests you'll probably see it being true. But I suspect you

Re: [Maria-developers] fc90a39426c: MDEV-20604: Duplicate key value is silently truncated to 64 characters in print_keydup_error

2020-03-25 Thread Sergei Golubchik
quot;, > 19, "M small buf: %M", 0); > - test_w_len("M small buf positional: 0 \"In", > + test_w_len("M small buf positional: 0 \"..", > 30, "M small buf positional: %1$M", 0); > >return exit_status(); We didn'

Re: [Maria-developers] 4b142536a24: MDEV-20604: Duplicate key value is silently truncated to 64 characters in print_keydup_error

2020-03-22 Thread Sergei Golubchik
the string. perhaps it would be simpler to move ... inside backtick_string() > >test1("Length modifiers work: 1 * -1 * 2 * 3", > "Length modifiers work: %d * %ld * %lld * %zd", 1, -1L, 2LL, > (size_t)3); > @@ -125,7 +125,7 @@ int main(void) &

Re: [Maria-developers] 5365db70cb8: Improve update handler (long unique keys on blobs)

2020-03-16 Thread Sergei Golubchik
nd wrongly call update_handler. see above. An assert is now impossible. If we wrongly call update_handler it might work, but more often than not it'll produce incorrect table content. So, no crash, but a hard to detect incorrect data corruption. > > > + > > >THD_STA

Re: [Maria-developers] cf70893ac9d: MDEV-21303 Make executables MariaDB named

2020-03-16 Thread Sergei Golubchik
Server) I don't understand that at all. 1. What does the comment "Place mysql_install_db symlink also in scripts" even mean? 2. you CONFIGURE_FILE mariadb-install-db twice. 3. Why two INSTALL(PROGRAM ? 4. You set all bindir/etc variables for mysql_install_db and it will affect C

Re: [Maria-developers] 7b03ce7af3d: MDEV-17395 REPLACE/INSERT ODKU: support WITHOUT OVERLAPS

2020-03-12 Thread Sergei Golubchik
03-04-01 1 2 2003-05-01 2003-06-01 And the same for replace, basically: replace t1 values (1,3,'2003-01-01','2003-02-01'); -> 1 3 2003-01-01 2003-02-01 1 2 2003-05-01 2003-06-01 or -> 1 3 2003-01-01 2003-02-01 1 1 2

Re: [Maria-developers] bbe056ac3fa: support NULL fields in key

2020-03-10 Thread Sergei Golubchik
+ > +if (!null_in_key && !error > +&& table->check_period_overlaps(key_info, key_info, > +new_data, record_buffer) == 0) That's strange. You compare keys in key_period_compare_bases(), why do you do NULL values here? >

Re: [Maria-developers] eea71e8b05a: MDEV-16978 Application-time periods: WITHOUT OVERLAPS

2020-03-10 Thread Sergei Golubchik
cc > index 9dbb7a15726..49e97faea22 100644 > --- a/sql/key.cc > +++ b/sql/key.cc > @@ -896,3 +897,51 @@ bool key_buf_cmp(KEY *key_info, uint used_key_parts, >} >return FALSE; > } > + > + > +/** > + Compare base parts (not including the period) of keys with

Re: [Maria-developers] Please review MDEV-17832 Protocol: extensions for Pluggable types and JSON, GEOMETRY

2020-03-04 Thread Sergei Golubchik
Hi, Alexander! On Feb 26, Alexander Barkov wrote: > Hi, Sergei, Georg, > > Please review a fixed version of the patch for MDEV-17832. > > There are two files attached: > - mdev-17821.v18.diff (server changes) Here you are: > diff --git a/include/mysql.h b/in

Re: [Maria-developers] Seeking Guidance to contribute to the organization

2020-03-03 Thread Sergei Golubchik
guide me about where and how to start so that I can > contribute to this organization. Looking forward to get the guidance > as soon as possible and to work with this organization. Regards, Sergei VP of MariaDB Server Engineering and secur

Re: [Maria-developers] 9aace068f0c: MDEV-21743 Split up SUPER privilege to smaller privileges

2020-03-01 Thread Sergei Golubchik
BUG_ASSERT(my_count_bits(want_access) <= 1); I think you can remove SUPER_ACL from the userstat plugin and uncomment the assert above. Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~mari

Re: [Maria-developers] 5365db70cb8: Improve update handler (long unique keys on blobs)

2020-03-01 Thread Sergei Golubchik
nt i=0; i < parts; i++) > + > + /* Correct the key & key_parts if this function has been called before > */ > + key= table->key_info + key_index; > + key->key_part= key_part; > + > + for (uint i=0; i < parts; i++, key_part++) >

Re: [Maria-developers] 256753e8ae8: Clean up and speed up interfaces for binary row logging

2020-02-28 Thread Sergei Golubchik
e.cc b/sql/sql_table.cc > index 102416ec0a6..9e40c2ae8c8 100644 > --- a/sql/sql_table.cc > +++ b/sql/sql_table.cc > @@ -10506,10 +10506,10 @@ do_continue:; > No additional logging of query is needed >*/ >binlog_done= 1; > + DBUG_ASSERT(new_table->fi

Re: [Maria-developers] 5ae74b4823a: mysqld --help will now load mysqld.options table

2020-02-28 Thread Sergei Golubchik
s engine name in the plugin_array[] (note, all builtin plugins are already there) * initialize it and (if successful) load mysql.plugin table It only concerns the sql_plugin.cc part of your commit. Your aria part of the commit is still needed, because a good-behaving engine has to be read-o

Re: [Maria-developers] 044dfaff670: Replace handler::primary_key_is_clustered() with handler::ha_is_clustered_key()

2020-02-28 Thread Sergei Golubchik
y is a clustered and a reference key". Just "clustered" is marked with HA_CLUSTERED_INDEX. So, 1. You've renamed the method but the name does not match the semantics. It is called is_clustering_key() but it really means "clustered AND reference key" 2. What other engine ca

Re: [Maria-developers] 4c263b6d30b: MDEV-20632: Recursive CTE cycle detection using CYCLE clause

2020-02-26 Thread Sergei Golubchik
Hi, Oleksandr! On Feb 26, Oleksandr Byelkin wrote: > On Wed, Feb 26, 2020 at 1:44 PM Sergei Golubchik wrote: > > > Hi, Sanja! > > > > _some_ comments are below. > > > > The main thing, I still don't understand your changes in sql_select.cc. > > > &g

Re: [Maria-developers] ec1a860bd09: MDEV-21743 Split up SUPER privilege to smaller privileges

2020-02-26 Thread Sergei Golubchik
+ if (opt_init_connect.length && > + (sctx->master_access & IGNORE_INIT_CONNECT_ACL) == NO_ACL) dunno, I kind of like !(access & SOME_ACL) why not to keep privilege_t -> bool? >{ > execute_init_command(thd, _init_connect, _sys_init_connect); >

Re: [Maria-developers] 4c263b6d30b: MDEV-20632: Recursive CTE cycle detection using CYCLE clause

2020-02-26 Thread Sergei Golubchik
> spec_start - query_start)) >MYSQL_YYABORT; > +if ($7) > +{ > + elem->set_cycle_list($7); > +} > } > ; > > +opt_cycle: > + /* empty */ >

Re: [Maria-developers] 8790c095ab0: MDEV-21704 Add a new JSON field "version_id" into mysql.global_priv.priv

2020-02-20 Thread Sergei Golubchik
a wrong" --source include/search_pattern_in_file.inc this will print that there were 4 matches. Alternatively you can use four very specific SEARCH_PATTERN, one for each expected error. It's easier than what you've used, keeps the error log in one file, and doesn't run unnecessary sql on th

Re: [Maria-developers] bd98ef106c8: MDEV-17554 Auto-create new partition for system versioned tables with history partitioned by INTERVAL/LIMIT

2020-02-19 Thread Sergei Golubchik
Hi, Aleksey! On Feb 18, Aleksey Midenkov wrote: > On Mon, Feb 17, 2020 at 8:23 PM Sergei Golubchik wrote: > > On Feb 17, Aleksey Midenkov wrote: > > > On Sat, Nov 9, 2019 at 12:03 AM Sergei Golubchik wrote: > > > > > > > > 1. > > > >

Re: [Maria-developers] bd98ef106c8: MDEV-17554 Auto-create new partition for system versioned tables with history partitioned by INTERVAL/LIMIT

2020-02-17 Thread Sergei Golubchik
Hi, Aleksey! On Feb 17, Aleksey Midenkov wrote: > Hi Sergei! > > On Sat, Nov 9, 2019 at 12:03 AM Sergei Golubchik wrote: > > > > Hi, Aleksey! > > > > 1. > > It should be possible to enable/disable auto-creation. For example, > > CREATE TABLE ...

Re: [Maria-developers] 6887f16b61a: MDEV-17399 Add support for JSON_TABLE.

2020-02-06 Thread Sergei Golubchik
::ON_ERROR; > + } > +; > + > +table_function: > + JSON_TABLE_SYM '(' expr ',' TEXT_STRING_sys difficult to see what you're parsing without a syntax specs in the commit comment. > + { > +Tab

Re: [Maria-developers] 9d2c63d45e4: MDEV-20076: SHOW GRANTS does not quote role names properly

2020-01-19 Thread Sergei Golubchik
gt; +--echo # End of 10.3 tests please add few tests when sql_quote_show_create=0. Like 1. sql_quote_show_create=0, role name is not reserved (e.g. foo) 2. sql_quote_show_create=0, role name is reserved (e.g. fetch) 3. sql_quote_show_create=0, role name is not

Re: [Maria-developers] edc9059c31b: MDEV-18027: Running out of file descriptors and eventual crash

2020-01-19 Thread Sergei Golubchik
/* > If we have requested too much file handles than we bring >max_connections in supported bounds. Still leave at least Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.

Re: [Maria-developers] 10670133744: MDEV-16978 Application-time periods: WITHOUT OVERLAPS

2020-01-14 Thread Sergei Golubchik
t > handler->position fix to unique blobs. The reason is that > main.long_unique_bugs test fails, and I did not find a quick solution for > that :( Monty is rewriting the code around long uniques and the update_handler. We'll have to wait until he's done. > On Tue, 17 De

Re: [Maria-developers] c91ec05e01b: MDEV-20865 Store foreign key info in TABLE_SHARE

2020-01-07 Thread Sergei Golubchik
Hi, Aleksey! On Jan 05, Aleksey Midenkov wrote: > On Wed, Jan 1, 2020 at 4:07 PM Sergei Golubchik wrote: > > On Jan 01, Aleksey Midenkov wrote: > > > On Fri, Dec 27, 2019 at 8:22 PM Sergei Golubchik wrote: > > > > On Dec 22, Aleksey Midenkov wrote: > > &g

Re: [Maria-developers] [DISCUSS] Don't see ARM release information in MariaDB download page

2020-01-07 Thread Sergei Golubchik
sent out an > > discussion to maria-docs, but didn't get some help. So I think I may > > get something in dev channel. Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-develope

<    1   2   3   4   5   6   7   8   9   10   >