Re: [Maria-developers] 93493a0e9b5: MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if()

2022-04-06 Thread Sergei Golubchik
Hi, Aleksey, Thanks. I'll send a separate review email, there will be only replies here: On Apr 05, Aleksey Midenkov wrote: > Hi, Sergei! > > > > @@ -5709,8 +5708,6 @@ bool Item_field::fix_fields(THD *thd, Item > > > **reference) > > >} > > > #e

Re: [Maria-developers] 14cc679c95e: MDEV-27831 Let the SQL SERVICE user set the current user name.

2022-04-04 Thread Sergei Golubchik
user only. > In this case the DEFINER of the view/procedure is going to be empty > if not explicitly specified. > Though don't see any advantage to what is now. USER() is purely informational. CURRENT_USER() is not, it has a clearly defined meaning, it's t

Re: [Maria-developers] 93493a0e9b5: MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if()

2022-03-31 Thread Sergei Golubchik
p_session_expr(); > + > + vcol_cleanup_list.empty(); > + > + DBUG_ASSERT(!result || thd->get_stmt_da()->is_error()); > + return result; > } > > > @@ -2939,14 +3072,17 @@ static bool fix_and_check_vcol_expr(THD *thd, TABLE > *table, > */ > my

Re: [Maria-developers] a10facb656b: MDEV-27065 Partitioning tables with custom data directories moves data back to default directory

2022-03-29 Thread Sergei Golubchik
OPT="VAL, PARTITION p1 VALUES LESS THAN (100) OPT="VAL, PARTITION p2 VALUES LESS THAN (1000) OPT="VAL); Is that correct? > CREATE TABLE tsp (a INT, b VARCHAR(55), PRIMARY KEY (a)) DATA DIRECTORY = > 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = > 'MYS

Re: [Maria-developers] 3be1e491fb5: MDEV-27743 Remove Lex::charset

2022-03-22 Thread Sergei Golubchik
olumn `COLLATE DEFAULT` and table `COLLATE > some_non_default_collation` > MDEV-28067 Multiple conflicting column COLLATE clauses are not rejected > MDEV-28118 Wrong collation of `CAST(.. AS CHAR COLLATE DEFAULT)` > MDEV-28119 Wrong column collation on MODIFY + CONVERT > Regards, Sergei

Re: [Maria-developers] 026e52bad84: MDEV-27743 Remove Lex::charset

2022-03-21 Thread Sergei Golubchik
lized memory over a non-initialized > memory is better. > > So I'd like to avoid non-initialized variables like this: > > struct charset_info_st my_collation_contextually_typed_binary; > > I agree that full detailed initializing, similar to my_charset_bin, > is not really

Re: [Maria-developers] d8e915a88fc: MDEV-26009 Server crash when calling twice procedure using FOR-loop

2022-03-20 Thread Sergei Golubchik
oved, one has to set query_tables_last to point to the end of the list. The fact that it wasn't done was clearly an omission. That is, existing code and existing comments document it pretty well, your comment looks redundant and even confusing to me. So, please, remove the comment and ok to push

Re: [Maria-developers] 026e52bad84: MDEV-27743 Remove Lex::charset

2022-03-18 Thread Sergei Golubchik
+ } ... > diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c > index bb746ad90b0..a5c9129ebea 100644 > --- a/strings/ctype-bin.c > +++ b/strings/ctype-bin.c > @@ -630,3 +630,69 @@ struct charset_info_st my_charset_bin = > _charset_handler, > _collation_binary_

Re: [Maria-developers] 2467eb2d314: MDEV-27743 Remove Lex::charset

2022-03-16 Thread Sergei Golubchik
#define BINCMP_FLAG 131072U /* Intern: Used by sql_yacc */ > > In the client library: > > libmariadb/include/mariadb_com.h > #define BINCMP_FLAG 131072 > > The client library defines, but does not actually use it. > Should we rename it in the client

Re: [Maria-developers] 75aa95ada6b: Tricky static asserts did not compile on some platforms. Commenting out.

2022-03-16 Thread Sergei Golubchik
ST); > + */ > protected: >uint32 m_length; >uint8 m_dec; > - uint8 m_collation_type:collation_type_bits; > + uint8 m_collation_type:2; /*collation_type_bits;*/ >bool m_has_explicit_length:1; >bool m_has_explicit_de

Re: [Maria-developers] e90062c20f1: MDEV-27266 Improve UCA collation performance for utf8mb3 and utf8mb4

2022-03-16 Thread Sergei Golubchik
- > strings/ctype-uca.ic | 30 ++ I thought all *.ic files were renamed to *.inl ? > unittest/strings/strings-t.c | 2 +- > 5 files changed, 660 insertions(+), 12 deletions(-) Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org _

Re: [Maria-developers] 6a3201d3769: MDEV-27265 Improve contraction performance in UCA collations

2022-03-16 Thread Sergei Golubchik
-02-28 14:05:08 +0400 > message: > > MDEV-27265 Improve contraction performance in UCA collations > > Adding a hash table for contractions. > > The old code iterated through all items in MY_CONTRACTIONS, > and was much slower, especially for those contractions > i

Re: [Maria-developers] 49ecf935415: MDEV-27009 Add UCA-14.0.0 collations

2022-03-16 Thread Sergei Golubchik
+else > +{ > + /* > +EXPLICIT + CONTEXT > +CHAR(10) COLLATE latin1_bin .. COLLATE DEFAULT not possible yet > +CHAR(10) COLLATE latin1_bin .. COLLATE uca1400_as_ci > + */ > + > + const LEX_CSTRING context_cl_name= cl.collation_name_cont

Re: [Maria-developers] c67789f63c8: MDEV-27009 Add UCA-14.0.0 collations - adding version aware implicit weight handling

2022-03-14 Thread Sergei Golubchik
DEV-27009 Add UCA-14.0.0 collations - adding version aware implicit weight > handling > Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-

Re: [Maria-developers] c1010fdfac2: MDEV-27009 Add UCA-14.0.0 collations - dump logical positions and contractions

2022-03-14 Thread Sergei Golubchik
DEV-27009 Add UCA-14.0.0 collations - dump logical positions and contractions > Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launch

Re: [Maria-developers] ab62059bbd4: MDEV-27009 Add UCA-14.0.0 collations - Adding implicit weight handling for Unicode-14.0.0

2022-03-14 Thread Sergei Golubchik
int level) > { >switch (level) { >case 0: > -return my_uca_520_implicit_weight_primary(code); > +return my_uca_implicit_weight_primary(version, code); >case 1: > return my_uca_implicit_weight_secondary(); >case 2: do you mean that secondary/te

Re: [Maria-developers] 5fe33342399: MDEV-27009 Add UCA-14.0.0 collations - adding uca-dump into build targets

2022-03-14 Thread Sergei Golubchik
ight routines in ctype-uca.c and uca-dump.c > - Adding handling of command line arguments to uca-dump > - Fixing some compile-time warnings in uca-dump.c > Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list:

Re: [Maria-developers] 2467eb2d314: MDEV-27743 Remove Lex::charset

2022-03-13 Thread Sergei Golubchik
4 > --- a/sql/field.h > +++ b/sql/field.h > @@ -5493,6 +5492,22 @@ class Column_definition: public Sql_alloc, >{ return compression_method_ptr; } > >bool check_vcol_for_key(THD *thd) const; > + > + void set_lex_collation(const Lex_collation_st )

Re: [Maria-developers] 61b72ed3dde: MDEV-27712 Reduce the size of Lex_length_and_dec_st from 16 to 8

2022-03-11 Thread Sergei Golubchik
; { > - int err; > - ulonglong tmp_length= my_strtoll10($2.length(), NULL, ); > - if (unlikely(err || tmp_length > PRECISION_FOR_DOUBLE)) > + ulonglong tmp_length= $2.length(); you don't really need tmp_length here any

Re: [Maria-developers] 880e92a48ba: MDEV-27760 event may non stop replicate in circular semisync setup

2022-03-07 Thread Sergei Golubchik
d it's not 'just the same'. > > I am recomming the patch, assuming that you'll be fine with the Gtid time > only flag computation. > Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://la

Re: [Maria-developers] 880e92a48ba: MDEV-27760 event may non stop replicate in circular semisync setup

2022-03-06 Thread Sergei Golubchik
+ > >>mysql_mutex_lock(>data_lock); > >> > >>switch (buf[EVENT_TYPE_OFFSET]) { > >> @@ -6722,6 +6724,11 @@ static int queue_event(Master_info* mi, const uchar > >> *buf, ulong event_len) > >> > >> ++mi->events_queued_sinc

Re: [Maria-developers] 14cc679c95e: MDEV-27831 Let the SQL SERVICE user set the current user name.

2022-03-04 Thread Sergei Golubchik
ht be ok. Setting @@proxy_user or @@external_user is even better, if your audit plugin can show them. @@external_user would be the best, I think it's purely informational. Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Maili

Re: [Maria-developers] 5d8838a79d5: MDEV-24920: Merge "old" SQL variable to "old_mode" sql variable

2022-03-02 Thread Sergei Golubchik
S", but now I'm, like, "what does it mean?". Let's discuss it on slack INDEX_HINT_MASK_JOIN - this seems to be easier, what about INGORE_INDEX_ONLY_FOR_JOIN ? That's a bit long, but shorter than NO_DUP_KEY_WARNINGS_WITH_IGNORE. Regards, Sergei VP of MariaDB Server Engineering and secur..

Re: [Maria-developers] 0402f6dcb67: MDEV-25477 Auto-create breaks replication when triggering event was not replicated

2022-03-02 Thread Sergei Golubchik
pl.create_or_replace_mix > rpl.create_or_replace_row > rpl.create_or_replace_statement Indeed, I see. Can you use OPTION_KEEP_LOG instead? Or transaction->stmt.modified_non_trans_table ? I hate it that there're so many ways to force binlogging a statement, and they're all, of course, are subtly differen

Re: [Maria-developers] 9d6be81c0da: MDEV-27832 disable binary logging for SQL SERVICE.

2022-03-02 Thread Sergei Golubchik
_ctx= ctx_orig; > +p->restore_binlog_vars(log_bin_orig, option_bits_orig); >} >if (skip_check) > result= 0; > @@ -6391,6 +6414,9 @@ extern "C" MYSQL *mysql_real_connect_local(MYSQL *mysql) > new_thd->security_ctx->skip_grants();

Re: [Maria-developers] 880e92a48ba: MDEV-27760 event may non stop replicate in circular semisync setup

2022-03-01 Thread Sergei Golubchik
lse >if ((s_id == global_system_variables.server_id && > !(mi->rli.replicate_same_server_id || > - (do_accept_own_server_id= rpl_semi_sync_slave_enabled))) || > + do_accept_own_server_id)) || >event_that_should_be_ignored(buf) || >

Re: [Maria-developers] MDEV-16329 ALTER ONLINE TABLE

2022-02-27 Thread Sergei Golubchik
_info rli(false); > +rpl_group_info rgi(); > +RPL_TABLE_LIST rpl_table(to, TL_WRITE, from, table_event.get_table_def(), > + copy, copy_end); > +Cache_flip_event_log *binlog= from->s->online_alter_binlog; > +rgi.thd= thd; > +

Re: [Maria-developers] MDEV-16329 ALTER ONLINE TABLE

2022-02-21 Thread Sergei Golubchik
-table case does not apply to online alter. Are there other cases when a separate stmt_cache might be needed? > > > + binlog_cache_mngr *const cache_mngr= thd->binlog_get_cache_mngr(); > > > + /* > > > +cache_mngr can be NULL in case if binlog logging is disa

Re: [Maria-developers] 592f57e25a5: MDEV-27760 event may non stop replicate in circular semisync setup

2022-02-17 Thread Sergei Golubchik
ould_be_ignored(buf) || >/* > the following conjunction deals with IGNORE_SERVER_IDS, if set > @@ -7006,7 +7013,7 @@ static int queue_event(Master_info* mi, const uchar > *buf, ulong event_len) >} >else >{ > -if (do_accept_own_server_id) > +

Re: [Maria-developers] b3844107287: MDEV-16546 System versioning setting to allow history modification

2022-02-15 Thread Sergei Golubchik
t;} >else > @@ -8534,7 +8535,8 @@ fill_record(THD *thd, TABLE *table_arg, List > , List , > if (table->next_number_field && > rfield->field_index == table->next_number_field->field_index) >table->auto_increment_field_not_null= TRUE; &g

Re: [Maria-developers] 0402f6dcb67: MDEV-25477 Auto-create breaks replication when triggering event was not replicated

2022-02-11 Thread Sergei Golubchik
stmt_format(transactional_table)); I know that's not part of this patch, but still. Just trying to understand. Why did it change to statement-based if VERS_TRX_ID? > /* > [binlog]: If 'handler::delete_all_rows()' was called and the > storage engine does not inject t

Re: [Maria-developers] 349283c5e7a: MDEV-17124: mariadb 10.1.34, views and prepared statements: ERROR 1615 (HY000): Prepared statement needs to be re-prepared

2022-01-27 Thread Sergei Golubchik
reate_time/100)); > -/* timestamp is with 6 digits */ > -timestamp.second_part= (trigger->create_time % 100) * 1; > + (my_time_t) > + (trigger->ms_create_time/ > + 1

Re: [Maria-developers] 673ea509e2c: MDEV-26870 --skip-symbolic-links does not disallow .isl file creation

2022-01-21 Thread Sergei Golubchik
latter case, I think, InnoDB technically still could use DATA DIRECTORY, even if MyISAM cannot. Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-developers Post to : mari

Re: [Maria-developers] 673ea509e2c: MDEV-26870 --skip-symbolic-links does not disallow .isl file creation

2022-01-20 Thread Sergei Golubchik
N_IGNORED), "DATA DIRECTORY"); Archive does if (create_info->data_file_name) my_error(WARN_OPTION_IGNORED, MYF(ME_WARNING), "DATA DIRECTORY"); I suggest you do one of the above too. > + } else if (!create_option_data_directory_is_val

Re: [Maria-developers] 99e2a49acfc: MDEV-27018 IF and COALESCE lose "json" property

2022-01-20 Thread Sergei Golubchik
Hi, Alexander, On Jan 18, Alexander Barkov wrote: > > Here's a new patch: > > https://github.com/MariaDB/server/commit/0478f474020466c16bfcbc9c7d0ed582a40e4fb8 Thanks! This is ok to push Regards, Sergei VP of MariaDB Server Engineering and secur...

Re: [Maria-developers] e4ea1544097: MDEV-17124: mariadb 10.1.34, views and prepared statements: ERROR 1615 (HY000): Prepared statement needs to be re-prepared

2022-01-20 Thread Sergei Golubchik
view_md5_parameters, 1, > + _parser_dummy_hook)) > +return TRUE; > + DBUG_ASSERT(share->tabledef_version.length == VIEW_MD5_LEN); > + return FALSE; > +} I don't like using md5 as a uuid. md5 collisions are very m

Re: [Maria-developers] 93493a0e9b5: MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if()

2022-01-17 Thread Sergei Golubchik
lds at the beginning of a statement. Just like for normal non-persistent items. For every vcol that needs it. This way they can safely use execution arena. Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https

Re: [Maria-developers] 99e2a49acfc: MDEV-27018 IF and COALESCE lose "json" property

2022-01-17 Thread Sergei Golubchik
ype_handler *m_b; > ... > }; why did you do it this way? You create an object. Then in the loop you create a new object, copying the old one. Then you conditionally assign m_a->type_handler_base(). Then you diff then to see if any condition from the previous step has succeeded. Why not, like class Type_

Re: [Maria-developers] 99e2a49acfc: MDEV-27018 IF and COALESCE lose "json" property

2022-01-14 Thread Sergei Golubchik
!(hres= c->aggregate_for_result(m_type_handler, other))) > -hres= type_handler_data-> > -m_type_aggregator_for_result.find_handler(m_type_handler, other); > - if (!hres) > -return true; > - m_type_handler= hres; > - return false; > + Recursive_type_pair_iter

Re: [Maria-developers] 8f8e7ad5c80: MDEV-27217 DELETE partition selection doesn't work for history partitions

2022-01-13 Thread Sergei Golubchik
rror(error, errflag); > +DBUG_VOID_RETURN; > + } this seems to be redundant, the else branch at the end covers it. >else if (error == HA_ERR_ROW_IN_WRONG_PARTITION) >{ Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org

Re: [Maria-developers] ef70e809a40: MDEV-27217 DELETE partition selection doesn't work for history partitions

2022-01-12 Thread Sergei Golubchik
RROR HY000: Not allowed for system-versioned table `test`.`t1` it seems to be quite clear. Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@l

Re: [Maria-developers] 7a746072a5e: MDEV-26878: Query failing with syntax error sets ROW_NUMBER to non-zero

2022-01-12 Thread Sergei Golubchik
Hi, Rucha! On Jan 12, Rucha Deodhar wrote: > On Tue, Jan 11, 2022 at 11:49 PM Sergei Golubchik wrote: > > > +--error ER_PARSE_ERROR > > > +INSERT INTO t1 VALUES XXX (1),(2); > > > > > diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy > > > index 8e

Re: [Maria-developers] 9ea85a70a75: MDEV-24654 GTID event falsely marked transactional

2022-01-11 Thread Sergei Golubchik
Hi, Kristian! On Jan 11, Kristian Nielsen wrote: > Sergei Golubchik writes: > > >> To the question of the usage of trX cache by non-trX let me answer > >> broadly to mention @@binlog_direct_non_transactional_update = false > >> leads to aggregation of mixed, s

Re: [Maria-developers] 9ea85a70a75: MDEV-24654 GTID event falsely marked transactional

2022-01-11 Thread Sergei Golubchik
Hi, Andrei! On Jan 11, Andrei Elkin wrote: > On Tue, Jan 11, 2022 at 1:06 PM Sergei Golubchik wrote: > > > Hi, Andrei! > > > > On Jan 11, Andrei Elkin wrote: > > > Howdy, Sergei! > > > > > > To the question of the usage of trX cach

Re: [Maria-developers] 7a746072a5e: MDEV-26878: Query failing with syntax error sets ROW_NUMBER to non-zero

2022-01-11 Thread Sergei Golubchik
LEX *lex= Lex; > +if (lex->sql_command == SQLCOM_INSERT) > + thd->get_stmt_da()->inc_current_row_for_warning(); > if (!(sel= lex->alloc_select(TRUE)) || lex->push_select(sel)) >MYSQL_YYABORT; better not to have an if() in th

Re: [Maria-developers] 8e21b91fd31: MDEV-26875: Wrong user in SET DEFAULT ROLE error

2022-01-11 Thread Sergei Golubchik
thd->security_ctx->priv_host, rolename); That's strange. you'll use `user` and `thd->security_ctx->priv_host` ? They generally correspond to two different accounts. Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org __

Re: [Maria-developers] b14b6f31fa2: MDEV-26843: Inconsistent behavior of ROW_NUMBER upon resignalling from function Analysis: ROW_NUMBER should be 0 because the error produced is not related to statem

2022-01-11 Thread Sergei Golubchik
6 +2033,7 @@ sp_head::execute_function(THD *thd, Item **argp, uint > argcount, >*/ >if (argcount != m_pcont->context_var_count()) >{ > +thd->get_stmt_da()->reset_current_row_for_warning(0); > /* >Need to use my_error here, or it will

Re: [Maria-developers] 394bb653b0b: MDEV-26695: Number of an invalid row is not calculated for table value constructor

2022-01-11 Thread Sergei Golubchik
sl->master_unit(), send_records); > if (!rc) >send_records++; > else if (rc > 0) > - DBUG_RETURN(true); > + goto reset_counter_and_exit; break here too? >} > > +reset_counter_and_exit: > + cur_thd->get_stmt_da()->reset_current

Re: [Maria-developers] 9ea85a70a75: MDEV-24654 GTID event falsely marked transactional

2022-01-11 Thread Sergei Golubchik
Hi, Andrei! On Jan 11, Andrei Elkin wrote: > Howdy, Sergei! > > To the question of the usage of trX cache by non-trX let me answer > broadly to mention @@binlog_direct_non_transactional_update = false > leads to aggregation of mixed, say innodb + myisam, events in trx > cache.

Re: [Maria-developers] ce69e0c8e78: MDEV-24920: Merge "old" SQL variable to "old_mode" sql variable

2022-01-10 Thread Sergei Golubchik
DATETIME) will be "-00-00 ", that is zero date CHECKSUM_FORMATTING and INDEX_MASKING is unclear. For CHECKSUM_FORMATTING I'd suggest CHECKSUM_SLOW_NULLS (see the commit that introduced this behavior: 496741d5761f) "INDEX_MASKING" was introduced in the commit 79542930ea1c,

Re: [Maria-developers] 9ea85a70a75: MDEV-24654 GTID event falsely marked transactional

2022-01-10 Thread Sergei Golubchik
entry->using_trx_cache && has_xid, commit_id)) > DBUG_RETURN(ER_ERROR_ON_WRITE); > >if (entry->using_stmt_cache && !mngr->stmt_cache.empty() && > Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org

Re: [Maria-developers] 88f8aa20bba: MDEV-23486 RBR can bypass secure_timestamp=YES

2022-01-09 Thread Sergei Golubchik
you don't trust the master, you cannot trust its TM_SYSTEM_VERSIONED flag either. Even if the table was system versioned on the master, the master could've had secure_timestamp=NO and a completely fake history. Regards, Sergei VP of MariaDB Serv

Re: [Maria-developers] ce507903d0c: MDEV-22742 UBSAN: Many overflow issues in strings/decimal.c - runtime error: signed integer overflow: x * y cannot be represented in type 'long long int' (on optimi

2022-01-09 Thread Sergei Golubchik
_MAX%DIG_BASE This took me a while. Personally I find it easier to understand an exclusive condition, like x > ULONGLONG_MAX/DIG_BASE || (x == ULONGLONG_MAX/DIG_BASE && *buf > (dec1) (ULONGLONG_MAX%DIG_BASE)) but it's equivalent to your version, so ok to push. Did you chec

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

2022-01-09 Thread Sergei Golubchik
3. (not part of MDEV-22441) See how SCOPE_EXIT is implemented in rocksdb, perhaps we should do it similarly? It's used like SCOPE_EXIT { mem_heap_free(heap); } Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Maili

Re: [Maria-developers] 93493a0e9b5: MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if()

2022-01-06 Thread Sergei Golubchik
; > 8. cleanup_excluding_fields_processor() removed. It was just a quick > hack to exclude wrongly working Item_field from processing. Now it > works due to correct execution environment (Vcol_expr_context). > Related to MDEV-10355. > Regards, Sergei VP of MariaDB Server Engineering

Re: [Maria-developers] 3617add6975: MDEV-27208: Extend CRC32() and implement CRC32C()

2022-01-03 Thread Sergei Golubchik
Hi, Marko! On Jan 03, Marko Mäkelä wrote: > revision-id: 3617add6975 (mariadb-10.6.1-252-g3617add6975) > parent(s): bc90f5d6967 > author: Marko Mäkelä > committer: Sergei Golubchik > timestamp: 2021-12-15 19:54:34 +0100 > message: > > MDEV-27208: Extend CRC32() and im

Re: [Maria-developers] 734aee3cd3c: MDEV-27018 IF and COALESCE lose "json" property

2022-01-03 Thread Sergei Golubchik
se()+m_b.base(), and this >combination is found in Type_collection_std, I'd expect it to find VARCHAR/JSON+TEXT/JSON right away. It would've naturally preserved the json property. Otherwise you'd need to do an extra json propagation. Here, of course, I mean not Item_func_plus, but, say, COALESCE

Re: [Maria-developers] 8a84f5a40c1: MDEV-24176 Preparations

2022-01-03 Thread Sergei Golubchik
ning it up. Re-preparing vcols after every DML that happened to use table aliases - that's not lazy, that's too much work. As far as MDEV-25672 is concerned - making ALTER TABLE to check that existing vcols refer to the correct table - that's too much work too, we already know they do. Only n

Re: [Maria-developers] 803b977229c: MDEV-26698: Incorrect row number upon INSERT .. SELECT from the same table: rows are counted twice

2021-12-31 Thread Sergei Golubchik
;table->reginfo.lock_type= TL_UNLOCK; > >bool in_first_read= true; > + > + /* > + Reset the counter before copying rows from internal temporary table to > + INSERT table. > + */ > + join_tab->join->thd->get_stmt_da()->reset_current_row_for_warning(); >while

Re: [Maria-developers] 4774601a3cd: MDEV-26698: Incorrect row number upon INSERT .. SELECT from the same table: rows are counted twice

2021-12-31 Thread Sergei Golubchik
Hi, Rucha! On Dec 29, Rucha Deodhar wrote: > On Wed, Dec 29, 2021 at 12:50 AM Sergei Golubchik wrote: > > > Why did put your fix here in a common code path in select, and not > > in, say, select_insert::send_data() ? > > Yes, the counter can be incremented in select

Re: [Maria-developers] 4774601a3cd: MDEV-26698: Incorrect row number upon INSERT .. SELECT from the same table: rows are counted twice

2021-12-28 Thread Sergei Golubchik
urrent_row_for_warning(); >while (rc == NESTED_LOOP_OK) >{ > int error; > @@ -26968,6 +26972,8 @@ AGGR_OP::end_send() > else > { >rc= evaluate_join_record(join, join_tab, 0); > + /* Increment the counter after copying rows. */ > +

Re: [Maria-developers] 734aee3cd3c: MDEV-27018 IF and COALESCE lose "json" property

2021-12-28 Thread Sergei Golubchik
ny_blob_json("tinyblob/json"); > + > +Named_type_handler > + type_handler_blob_json("blob/json"); > + > +Named_type_handler > + type_handler_medium_blob_json("mediumblob/json"); > + > +Named_type_handler > + type_handler_long_blob_json("longblob/js

Re: [Maria-developers] 8a84f5a40c1: MDEV-24176 Preparations

2021-12-27 Thread Sergei Golubchik
Hi, Aleksey! On Oct 18, Aleksey Midenkov wrote: > On Sun, Oct 17, 2021 at 4:55 PM Sergei Golubchik wrote: > > On Oct 17, Aleksey Midenkov wrote: > > > commit 8a84f5a40c1 > > > Author: Aleksey Midenkov > > > Date: Thu May 27 17:00:14 2021 +0300 >

Re: [Maria-developers] Review for: MDEV-26938 Support descending indexes internally in InnoDB (server part)

2021-12-11 Thread Sergei Golubchik
Tue, Dec 07, 2021 at 07:01:45PM +0300, Sergey Petrunia wrote: > > == Issue #1: ordered index scan is not handled in ha_partition == > > I've hit this again when trying to get range optmizer to work. Please find the > patch below. It follows MySQL-8's approach. > Regards, Sergei

Re: [Maria-developers] Review for: MDEV-26938 Support descending indexes internally in InnoDB (server part)

2021-12-11 Thread Sergei Golubchik
Hi, Sergey! All fixed, thanks! On Dec 07, Sergey Petrunia wrote: > Hi Serg, > > There is some non-trivial input too, after all. Please find below. > > > commit da2903f03de039693354176fda836e6642d6d0f0 > > Author: Sergei Golubchik > > Date: Wed Nov 24 16:50:2

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

2021-12-06 Thread Sergei Golubchik
eans, "skip". That is vers_skip_create must be of query_id_t. You set it with tables->vers_skip_create= thd->query_id; And on the next statement it automatically expires. This semantics is a bit more complex than boolean, so it'd need a comment, like /* Protect single thre

Re: [Maria-developers] a5fca9a6e30: MENT-651 [6/8] store cache managers in a list

2021-11-26 Thread Sergei Golubchik
Hi, Nikita! On Nov 24, Nikita Malyavin wrote: > On Mon, 15 Nov 2021 at 13:52, Sergei Golubchik wrote: > > > Hi, Nikita! > > > > On Nov 14, Nikita Malyavin wrote: > > > revision-id: a5fca9a6e30 (mariadb-10.5.2-478-ga5fca9a6e30) > > > parent(s):

Re: [Maria-developers] Squash aaed3436 MENT-651 [4/8] ALTER ONLINE TABLE

2021-11-25 Thread Sergei Golubchik
Malyavin wrote: > I mean, I'd just put the reference to the head in the commit message, i. e. > now the last commit is > >- test progress reporting f1af51e4 > > I'd add a line: > See unsquashed history at f1af51e4 > > In the final commit message > > On

Re: [Maria-developers] Squash aaed3436 MENT-651 [4/8] ALTER ONLINE TABLE

2021-11-24 Thread Sergei Golubchik
Hi, Nikita! Sorry, I meant what did you mean by > I would also embed a reference to the original unsquashed branch. It > seems to me as a good idea in sense of helping the reader investigate > the code Regards, Sergei VP of MariaDB Server Engineering and secur...@ma

Re: [Maria-developers] Squash aaed3436 MENT-651 [4/8] ALTER ONLINE TABLE

2021-11-24 Thread Sergei Golubchik
Hi, Nikita! On Nov 24, Nikita Malyavin wrote: > Sergei, I think all the commits starting from [4/8] ALTER ONLINE TABLE > should be squashed. > > I will also add a better description in the commit message covering our > latest discussions. > > I would also embed a refe

Re: [Maria-developers] 4af7a583802: Refactor MYSQL_BIN_LOG: extract Event_log ancestor

2021-11-24 Thread Sergei Golubchik
in Event_log, > or just admit the cost of duplication for a better read comfort. I'd > leave it as it is now. What I mean is, you moved get_log_lock() to MYSQL_LOG class. You don't need a second copy here, it's redundant. Except that MYSQL_LOG is private her

Re: [Maria-developers] f3603cbfaeb: report progress

2021-11-24 Thread Sergei Golubchik
stage change there, maybe > > I wasn't sure should it be another stage or the same one. > > Added in the new commit Okay, good. You cannot have a progress going from 0% to 100% and then again fron 0% to 100% all in the same stage, that's not what users expect from a progress meter. Reg

Re: [Maria-developers] 9277b838aad: Forbid savepoints setup while ONLINE ALTER goes on

2021-11-24 Thread Sergei Golubchik
Let's keep it as a lower-priority task, though, for after the rest is done. On Nov 24, Nikita Malyavin wrote: > On Mon, 15 Nov 2021 at 16:07, Sergei Golubchik wrote: > > > Hi, Nikita! > > > > On Nov 15, Nikita Malyavin wrote: > > > revision-id: 9277b838aad (mari

Re: [Maria-developers] 903ae1c03ae: Fix running without binlog

2021-11-24 Thread Sergei Golubchik
; it. Maybe that's wrong > > But what about sourcing a .test file? That's okay. There're tests in mysql-test that use inc, there're tests that include other tests. Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___

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

2021-11-23 Thread Sergei Golubchik
> --- a/sql/sql_base.cc > +++ b/sql/sql_base.cc > @@ -4203,6 +,15 @@ bool open_tables(THD *thd, const DDL_options_st > , > } > >thd->current_tablenr= 0; > + > +#ifdef WITH_PARTITION_STORAGE_ENGINE > + if (!thd->stmt_arena->is_conventional())

Re: [Maria-developers] c80991c79f7: MDEV-25785 Add support for OpenSSL 3.0

2021-11-21 Thread Sergei Golubchik
n't understand what you mean, I didn't touch SHAx topic at all. >> >I think we should rather deprecate DES_ENCRYPT and DES_DECRYPT >> >functions. It should've been done long time ago. > >> Ok, but there is also a deprecation procedure for us. We can’t remove >> th

Re: [Maria-developers] c80991c79f7: MDEV-25785 Add support for OpenSSL 3.0

2021-11-19 Thread Sergei Golubchik
double the number of #ifdef's If this is the case then, indeed, better to wait, say, 5 years, as you suggest, for OpenSSL 1.x to reach EOL > Note- there does not seem to be an non-deprecated replacement for > DES_set_key_unchecked, so we have to have this anti-deprecate setting > this or that

Re: [Maria-developers] c80991c79f7: MDEV-25785 Add support for OpenSSL 3.0

2021-11-18 Thread Sergei Golubchik
x1010L) > + ENDIF() This is just postponing the inevitable. They'll drop the old API eventually. As far as I understand the internals were changed in a way that doesn't fit the old API. Is there some safe subset of OpenSSL API that works both in 1.0 and in 3.0 ? It might be

Re: [Maria-developers] 4492c869f31: MDEV-26238: Remove inconsistent behaviour of --default-* options in my_print_defaults

2021-11-18 Thread Sergei Golubchik
lts-file=$MYSQLTEST_VARDIR/tmp/tmp1.cnf > --defaults-extra-file=$MYSQLTEST_VARDIR/tmp/tmp2.cnf --mysqld Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-developers Post to : ma

Re: [Maria-developers] 9277b838aad: Forbid savepoints setup while ONLINE ALTER goes on

2021-11-15 Thread Sergei Golubchik
NLINE ALTER goes on Why is that? 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.ne

Re: [Maria-developers] 37b6f5cb8ef: decouple commit/rollback code from binlog hton

2021-11-15 Thread Sergei Golubchik
from binlog hton let's squash it with "[6/8] store cache managers in a list" Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-develope

Re: [Maria-developers] f3603cbfaeb: report progress

2021-11-15 Thread Sergei Golubchik
relay_log.description_event_for_exec) >delete ev; > +thd_progress_report(thd, my_b_tell(log_file) > + / > rgi->tables_to_lock->m_conv_table->s->reclength, > +thd->progress.max_counter); >} >

Re: [Maria-developers] 903ae1c03ae: Fix running without binlog

2021-11-15 Thread Sergei Golubchik
on_warning= false; > thd->set_n_backup_active_arena(_arena, _arena); > error= ev->apply_event(rgi); > thd->restore_active_arena(_arena, _arena); > +thd->abort_on_warning= abort_on_warning; > > event_arena.free_items(); > free_root(_mem_root, MYF(MY_KE

Re: [Maria-developers] a5fca9a6e30: MENT-651 [6/8] store cache managers in a list

2021-11-15 Thread Sergei Golubchik
che_mngr in the > table > +itself -- because it can happen to be not existing. > +Still in case if tables are left opened > + */ > + binlog_online_alter_cleanup(thd->online_alter_cache_list, is_ending_trans); still don't understand that comment either :( Regard

Re: [Maria-developers] ad6e7b87107: introduce cache flipping

2021-11-13 Thread Sergei Golubchik
0); > +mysql_mutex_lock(get_log_lock()); > +reinit_io_cache(current, READ_CACHE, 0, 0, 0); > +current= alt; > +mysql_mutex_unlock(get_log_lock()); > +alt= tmp; > + > +return alt; > + } > + > + IO_CACHE *get_log_file() overr

Re: [Maria-developers] 4af7a583802: Refactor MYSQL_BIN_LOG: extract Event_log ancestor

2021-11-12 Thread Sergei Golubchik
er(uchar* buf,uint len); > @@ -918,7 +968,6 @@ class MYSQL_BIN_LOG: public TC_LOG, private MYSQL_LOG >uint next_file_id(); >inline char* get_index_fname() { return index_file_name;} >inline char* get_log_fname() { return log_file_name; } > - inline char* get_name(

Re: [Maria-developers] 80749146b7d: MDEV-26238: Remove inconsistent behaviour of --default-* options in my_print_defaults

2021-11-07 Thread Sergei Golubchik
ups. Or my_print_defaults --defaults-extra-file=var/my.cnf But my_print_defaults --no-defaults doesn't do it. Doesn't behave like other *defaults* options. We can easily preserve the inconsisent "if --no-defaults, no group is required" behavior with, like if (my_no_defaults) cleanup_a

Re: [Maria-developers] 50f43d46299: MDEV-14938 make buildbot to include galera into bintars

2021-11-05 Thread Sergei Golubchik
ectory inside the tarball matches the pattern above. And that the tarbal name does too. > + > +INSTALL(FILES > + ${GALERA_PATH}/AUTHORS > + ${GALERA_PATH}/COPYING > + ${GALERA_PATH}/README > + DESTINATION docs/galera/doc > + COMPONENT Server > + ) > + > +INSTALL(FIL

Re: [Maria-developers] 80749146b7d: MDEV-26238: Remove inconsistent behaviour of --default-* options in my_print_defaults

2021-11-04 Thread Sergei Golubchik
if (my_defaults_group_suffix) > - arguments[count++]= make_args("--defaults-group-suffix=", > - my_defaults_group_suffix); > -arguments[count]= 0; > - } > - >nargs= argc + 1; >if (opt_mysqld) > nargs+= array_elements(

Re: [Maria-developers] bb1737b0482: MDEV-12459: The information_schema tables for getting temporary tables info is missing, at least for innodb there is no INNODB_TEMP_TABLE_INFO

2021-11-01 Thread Sergei Golubchik
uot;), cs); what about INTERNAL_TMP_TABLE and SYSTEM_TMP_TABLE? > else > { >DBUG_ASSERT(share->tmp_table == NO_TMP_TABLE); > @@ -9032,7 +9096,6 @@ ST_FIELD_INFO tables_fields_info[]= > NO

Re: [Maria-developers] 85aa3f8cf66: MDEV-26102: dgcov: add support for *.gcda.gcov.json.gz files of gcov 9.1+

2021-10-30 Thread Sergei Golubchik
> @@ -62,12 +62,15 @@ my $res; > + > +my $gcc_version= `gcc -dumpversion`; > +$gcc_version=~ s/(\d).*$/$1/; > > find(\_one_file, $root); > find(\_coverage, $root) if $opt_generate; Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org _

Re: [Maria-developers] 2c8f52ea53d: MDEV-23328 Server hang due to Galera lock conflict resolution

2021-10-29 Thread Sergei Golubchik
12:00:41 +0300 > message: > > MDEV-23328 Server hang due to Galera lock conflict resolution Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-developers Post t

Re: [Maria-developers] 778d88ea2d9: MDEV-23328 Server hang due to Galera lock conflict resolution

2021-10-29 Thread Sergei Golubchik
THD *thd) > { >mysql_mutex_unlock(>LOCK_thd_data); > + mysql_mutex_unlock(>LOCK_thd_kill); > } > > extern "C" void wsrep_thd_kill_LOCK(const THD *thd) > @@ -295,8 +301,6 @@ extern "C" my_bool wsrep_thd_is_aborting(const MYSQL_T

Re: [Maria-developers] 002192b92cf: MDEV-23328 Server hang due to Galera lock conflict resolution

2021-10-27 Thread Sergei Golubchik
lock conflict resolution This 10.3 version is also ok to push when you have 10.4 and 10.5 versions ready. Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-developers Post t

Re: [Maria-developers] d0e18d694f0: MDEV-23328 Server hang due to Galera lock conflict resolution

2021-10-27 Thread Sergei Golubchik
lock conflict resolution This commit is ok to push, thanks! 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] d1ec0231553: MDEV-26732 Assertion `0' failed in Item::val_native

2021-10-26 Thread Sergei Golubchik
ing. Could there be a universal solution that uses memcpy and doesn't need Item_copy variant for every new type? Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-developers

Re: [Maria-developers] d1ec0231553: MDEV-26732 Assertion `0' failed in Item::val_native

2021-10-25 Thread Sergei Golubchik
ve() here, because that Item_copy_string uses Type_handler_inet6? > Fix: > > - Adding a new class Item_copy_inet6, which implements val_native(). > - Fixing Type_handler::create_item_copy() to make Item_copy_inet6 > instead of Item_copy_string. > Regards, Sergei VP of MariaDB Server Engi

Re: [Maria-developers] d1ec0231553: MDEV-26732 Assertion `0' failed in Item::val_native

2021-10-25 Thread Sergei Golubchik
a INET6); > +INSERT INTO t1 VALUES ('::'),('::'); > +SELECT IF(1, '::', a) AS f FROM t1 GROUP BY 'foo' HAVING f != ''; > +f > +Warnings: > +Warning 1292Incorrect inet6 value: '' > +SELECT IF(1, '::', a) AS f FROM t1 GROUP BY 'foo' HAVING f != '::'; > +f > +S

Re: [Maria-developers] 6d0c1f3ae12: MDEV-23328 Server hang due to Galera lock conflict resolution

2021-10-25 Thread Sergei Golubchik
Hi, Jan! On Oct 25, Jan Lindström wrote: > Hi Sergei, > > > > --- a/sql/sql_parse.cc > > > +++ b/sql/sql_parse.cc > > > @@ -2159,6 +2159,7 @@ bool dispatch_command( > > > } > > > DBUG_PRINT("quit",("Got shutdown command

Re: [Maria-developers] 5c4db10d6ff: MDEV-25114: Crash: WSREP: invalid state ROLLED_BACK (FATAL)

2021-10-24 Thread Sergei Golubchik
re were some merge related changes. To revert it properly you need to look at affected files before the corresponding 10.2->10.3 merge. Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net

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