Re: [Maria-developers] 56e2cd20ed3: MDEV-31033 ER_KEY_NOT_FOUND upon online COPY ALTER on a partitioned table

2023-05-28 Thread Sergei Golubchik
Hi, Nikita, See, e.g. handler::is_clustering_key() or handler::ha_rnd_pos_by_record() On May 28, Nikita Malyavin wrote: > On Wed, 24 May 2023 at 18:32, Sergei Golubchik wrote: > > > > +bool handler::is_root_handler() const > > > +{ > > > + return this == tab

Re: [Maria-developers] 56e2cd20ed3: MDEV-31033 ER_KEY_NOT_FOUND upon online COPY ALTER on a partitioned table

2023-05-28 Thread Sergei Golubchik
rtainly leaf" one by comparing it with ha_resolve_by_name outputs > for "myisam" and "innodb". > Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-developers Po

Re: [Maria-developers] MTR fails on undefined {cpus} array in My/SysInfo.pm on armhf and armel

2023-05-26 Thread Sergei Golubchik
not, could you share it, please? 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.net/~maria

Re: [Maria-developers] MTR fails on undefined {cpus} array in My/SysInfo.pm on armhf and armel

2023-05-26 Thread Sergei Golubchik
ot; cpu with 2000 bogomips. if you'll simply hack num_cpus() to return 1, it'll fail later on something like $self->{cpus}[0]->{bogomips} Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://lau

Re: [Maria-developers] 56e2cd20ed3: MDEV-31033 ER_KEY_NOT_FOUND upon online COPY ALTER on a partitioned table

2023-05-24 Thread Sergei Golubchik
gt; --- a/storage/myisam/ha_myisam.cc > +++ b/storage/myisam/ha_myisam.cc > @@ -983,6 +983,7 @@ int ha_myisam::close(void) > > int ha_myisam::write_row(const uchar *buf) > { > + DBUG_ASSERT(is_root_handler() || table->file->ht != ht); >

Re: [Maria-developers] c75f774d278: MDEV-31058 ER_KEY_NOT_FOUND upon concurrent CHANGE column autoinc and DML

2023-05-24 Thread Sergei Golubchik
> + > +drop table t; lots of unvisible spaces at line ends, please remove them > + > +--echo # MDEV-31172 Server crash or ASAN errors in online_alter_check_autoinc > +create table t (a int, b int, c char(8), key(a,b,c)); > +alter table

Re: [Maria-developers] c457f237511: MDEV-30984 Online ALTER table is denied with non-informative error messages

2023-05-23 Thread Sergei Golubchik
hild(fk.delete_method) > +|| fk_modifies_child(fk.update_method)) > +{ > + reason= "Tables with CASCADE/SET NULL foreign keys are"; > + goto unsupported; > +} > + } > + > + if (!online_alter_check_autoinc(thd, alter_info, table)) > + { > +reason=

Re: [Maria-developers] Regression in crossbuilding MariaDB

2023-05-19 Thread Sergei Golubchik
y. Right, it's also future proof, no more zlib issues ever. Users will get a smaller source download too. bindled zlib is only needed for our bintar builds, never for debs. Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org _

Re: [Maria-developers] Regression in crossbuilding MariaDB

2023-05-16 Thread Sergei Golubchik
at zlib detection is part of cmake, not something we've changed, so it's could be caused by a change in your build environment. Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-develo

Re: [Maria-developers] da5a72f32d4: MDEV-31033 ER_KEY_NOT_FOUND upon online COPY ALTER on a partitioned table

2023-05-09 Thread Sergei Golubchik
t; > Alternatively, we could introduce some bool handler::root_handler just > now, without waiting for a demand, but I'm afraid it could become > another source for bugs. So better later on demand. > Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org _

Re: [Maria-developers] da5a72f32d4: MDEV-31033 ER_KEY_NOT_FOUND upon online COPY ALTER on a partitioned table

2023-05-08 Thread Sergei Golubchik
Hi, Nikita, On May 08, Nikita Malyavin wrote: > On Fri, 5 May 2023 at 20:46, Sergei Golubchik wrote: > > > > #ifdef HAVE_REPLICATION > > > - if (unlikely(!error && table->s->online_alter_binlog)) > > > + if (unlikely(!error && table-

Re: [Maria-developers] 24c653be25a: unpack_row: unpack a correct number of fields

2023-05-05 Thread Sergei Golubchik
: "not ", > - (*field_ptr)->field_name.str, > - (long) (field_ptr - begin_ptr))); > + dbg->field_name.str, > + (long) ())); eh? you surely meant `(long) fidx` ? how did it ev

Re: [Maria-developers] c5ce597f06a: MDEV-31043 ER_KEY_NOT_FOUND upon concurrent ALTER and transaction

2023-05-05 Thread Sergei Golubchik
else add // trans engine, end of statement > +{ > + DBUG_ASSERT(!is_ending_transaction); > + cache.store_prev_position(); > +} Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpa

Re: [Maria-developers] da5a72f32d4: MDEV-31033 ER_KEY_NOT_FOUND upon online COPY ALTER on a partitioned table

2023-05-05 Thread Sergei Golubchik
to filter out individual partitions and have your binlog_log_row_online_alter called only for the main ha_partition handler. > error= binlog_log_row_online_alter(table, before_record, after_record, > log_func); > #endif // HAVE_REPLICATION Regards, Sergei

Re: [Maria-developers] c5ce597f06a: MDEV-31043 ER_KEY_NOT_FOUND upon concurrent ALTER and transaction

2023-05-03 Thread Sergei Golubchik
(); > } > -else if (!is_ending_transaction) > +else if (!commit) // rollback > +{ > cache.restore_prev_position(); > +} > +else add // trans engine, end of statement > +{ > + DBUG_ASSERT(!is_ending_transaction); > + cache.store_prev_p

Re: [Maria-developers] d67c3f88883: MDEV-27744 InnoDB: Failing assertion: !cursor->index->is_committed() in row0ins.cc (from row_ins_sec_index_entry_by_modify) | Assertion `0' failed in row_upd_sec_in

2023-04-26 Thread Sergei Golubchik
> +} > -Item *LEX::make_item_func_substr(THD *thd, Item *a, Item *b, Item *c) > -{ > - return (thd->variables.sql_mode & MODE_ORACLE) ? > -new (thd->mem_root) Item_func_substr_oracle(thd, a, b, c) : > -new (thd->mem_root) Item_func_substr(thd, a, b, c); >

Re: [Maria-developers] 940d028521f: MDEV-30164 System variable for default collations

2023-03-10 Thread Sergei Golubchik
Hi, Alexander, On Mar 10, Alexander Barkov wrote: > On 3/7/23 2:20 PM, Sergei Golubchik wrote: > > I'm sorry it took a while. > > > > I'm still thinking about the whole thing, it's a rather big change > > for a really fringe functionality. But I failed to come up with

Re: [Maria-developers] 8c1ad2a9fe9: MDEV-30633 DATETIME to TIMESTAMP conversion to return maximum timestamp on overflow

2023-03-08 Thread Sergei Golubchik
> +*/ > +if (my_time_tmp && > +(my_time_tmp != TIMESTAMP_MAX_VALUE || > + error_code != ER_WARN_DATA_OUT_OF_RANGE)) why `my_time_tmp != TIMESTAMP_MAX_VALUE` ? shouldn't error_code check be sufficient? >to_tz->gmt_sec_to_TIME(ltime, m

Re: [Maria-developers] 940d028521f: MDEV-30164 System variable for default collations

2023-03-07 Thread Sergei Golubchik
he bit, like used_default_coll_mapping |= 1 << i; and then, again, print affected collations, if any. Most often used_default_coll_mapping will likely be zero one more question. In, say, 10.10->11.1 replication master and slave will have different default collations, but thd-&g

Re: [Maria-developers] 6e28a576913: move alloca() definition from all *.h files to one place

2023-02-10 Thread Sergei Golubchik
ude > +#endif > + > #ifdef __cplusplus > extern "C" { > #endif > > #ifndef MYSQL_ABI_CHECK why not to put #include here? > #ifdef _WIN32 > -#include > #ifndef __cplusplus > #define inline __inline > #endif > -#else > -#include I s

Re: [Maria-developers] ceb75e9bd9e: MDEV-30203: Move mysql symlinks to different package (fixes)

2023-02-09 Thread Sergei Golubchik
RPM_client_PACKAGE_CONFLICTS > - "MariaDB-server < 10.6.0") > + "MariaDB-server < 11.0.0") because of resolve-stack-dump, ok > SETA(CPACK_RPM_common_PACKAGE_CONFLICTS > - "MariaDB-server < 10.6.1") > + "MariaDB-server < 11.0.0"

Re: [Maria-developers] dcd69cbd19a: MDEV-29447 MDEV-26285 Refactor spider_db_mbase_util::open_item_func

2023-01-22 Thread Sergei Golubchik
(or discussed, if you disagree) before pushing. Other comments apply to the old spider code that this patch moved. If you'd like you can say "I'm just moving spider code around" and ignore all comments of that kind. /Sergei On Jan 22, Yuchen Pei wrote: > commit dcd69cbd19a > Author: Yu

Re: [Maria-developers] 06ce67c644b: MDEV-27653 long uniques don't work with unicode collations

2023-01-15 Thread Sergei Golubchik
;open_options|= extra_open_options; > -result_code= admin_recreate_table(thd, table); > +result_code= admin_recreate_table(thd, table) ? HA_ADMIN_FAILED : > +HA_ADMIN_OK; good catch > thd->open_options&=

Re: [Maria-developers] 0bef50e50b5: MDEV-20501: Assertion `maybe_null || !null_value' failed in Item_func_round::date_op

2023-01-13 Thread Sergei Golubchik
Hi, Sergei, On Jan 13, Sergei Petrunia wrote: > revision-id: 0bef50e50b5 (mariadb-10.4.27-33-g0bef50e50b5) > parent(s): 5db970fc760 > author: Sergei Petrunia > committer: Sergei Petrunia > timestamp: 2023-01-04 16:50:12 +0300 > message: > > MDEV-20501: Assertion `m

Re: [Maria-developers] 5dcde8f6523: MDEV-27653 long uniques don't work with unicode collations

2023-01-06 Thread Sergei Golubchik
; >} > - Item_func_hash *hash_item= new(mem_root)Item_func_hash(thd, > *field_list); > + > + Item_func_hash *hash_item= make_unique_hash_func(thd, mem_root, > + > table->s->mysql_version, > +

Re: [Maria-developers] 92ff948d021: MDEV-29231 View returns wrong value with SQL_MODE 'NO_BACKSLASH_ESCAPES'

2023-01-06 Thread Sergei Golubchik
ape_item(THD *thd, Item *escape_item, > String *tmp_str, > if (escape_str) > { >const char *escape_str_ptr= escape_str->ptr(); > - if (escape_used_in_parsing && ( > - (((thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES)

Re: [Maria-developers] 6ff49e48e4f: MDEV-26161: fix of view protocol

2023-01-06 Thread Sergei Golubchik
10); > ---error ER_CANT_CREATE_GEOMETRY_OBJECT > +--error ER_CANT_CREATE_GEOMETRY_OBJECT,ER_INTERNAL_ERROR > select st_distance_sphere(x'010300040004', > multipoint(point(124,204)), 10); > ---error ER_CANT_CREATE_GEOMETRY_OBJECT > +--error ER_CANT_CREATE_GEOMETRY_OBJECT,ER_I

Re: [Maria-developers] 6a8268b7893: MDEV-28915: mysql_upgrade fails due to old_mode="", with "Cannot load from mysql.proc. The table is probably corrupted"

2022-12-28 Thread Sergei Golubchik
t; +SELECT name, body_utf8, body FROM mysql.proc WHERE name like 'sp1'; > + > +SET GLOBAL event_scheduler=ON; > + > +SELECT name, body_utf8, body FROM mysql.event; > +CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (1, > 'abc'); > +SELECT name, body_

Re: [Maria-developers] 4ddf606debf: MDEV-30151 parse error 1=2 not between/in

2022-12-28 Thread Sergei Golubchik
); > if (unlikely($$ == NULL)) >MYSQL_YYABORT; >} > -| expr comp_op predicate %prec '=' > +| boolean_test comp_op predicate %prec '=' >{ > $$= (*$2)(0)->create(thd, $1, $3); > if (unlikely($$ == NULL)) >

Re: [Maria-developers] 4d9f8a3c31e: MDEV-28669 addendum: additional tests and mtr changes

2022-12-27 Thread Sergei Golubchik
e whole commit is about fixing the test? How can I see that the test works? > diff --git > a/mysql-test/suite/galera/r/galera_sst_rsync_innodb__innodb_dir,debug.rdiff > b/mysql-test/suite/galera/r/galera_sst_rsync_innodb__innodb_dir,debug.rdiff > new file mode 100644 > index 000

Re: [Maria-developers] f984f49fba7: MDEV-30203 - deb fix piuparts

2022-12-20 Thread Sergei Golubchik
; usr/bin/mariadb-backup > > > usr/bin/mbstream > > > -usr/share/man/man1/mariabackup.1 > > but this man link is removed. why did you remove this man symlink? I thought Debian is pretty strict on having manpages for everything > > you forgot to move symlinks to man pages >

Re: [Maria-developers] f984f49fba7: MDEV-30203 - deb fix piuparts

2022-12-19 Thread Sergei Golubchik
ty requirements). I suggest to keep those symlinks in the mariadb-test package. Your other PR will add a warning. And eventually we drop them. Optional/Recommended/Suggested - sounds like too much toubles for a *test* package. > diff --git a

Re: [Maria-developers] MDEV-14443 test cases only

2022-12-19 Thread Sergei Golubchik
%' to database 'some_db' > +show tables from some_db; > +ERROR 42000: Access denied for user 'foo'@'%' to database 'some_db' > +# > +# bar user has access to the database (no denies present) > +# > +connect con2,localhost,bar,,; > +use some_db; > +show tables from some_db;

[Maria-developers] Review input for MDEV-21092, 21095, 29997

2022-11-27 Thread Sergei Petrunia
Hi Rex, Please find below review input for the collection of patches for these MDEVs. First, please try to have each piece of functionality in its own commit. You can use "git rebase -i" to make your last commits be one commit, as well as re-order them. Then, you can do a carefully considered

Re: [Maria-developers] 52f489ebccb: MDEV-29069 follow-up: support partially suitable keys

2022-11-01 Thread Sergei Golubchik
Hi, Nikita, On Nov 01, Nikita Malyavin wrote: > On Mon, 31 Oct 2022 at 21:22, Sergei Golubchik wrote: > > > > I hope RPL_TABLE_LIST can be preserved between the events. Is it > > > so? > > > > Yes, it appears to be created in Table_map_log_event and removed

Re: [Maria-developers] 52f489ebccb: MDEV-29069 follow-up: support partially suitable keys

2022-10-31 Thread Sergei Golubchik
Hi, Nikita, On Oct 31, Nikita Malyavin wrote: > On Mon, 31 Oct 2022 at 14:08, Sergei Golubchik wrote: > > On Oct 31, Nikita Malyavin wrote: > > > > > > > Also, I've looked at your latest branch. What were you > > > > optimizing with the commit 3afa3288

Re: [Maria-developers] 52f489ebccb: MDEV-29069 follow-up: support partially suitable keys

2022-10-31 Thread Sergei Golubchik
e same table and all events have full rows. There is no need to recalculate the key per event. Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-develo

Re: [Maria-developers] 52f489ebccb: MDEV-29069 follow-up: support partially suitable keys

2022-10-30 Thread Sergei Golubchik
Hi, Nikita, On Oct 18, Nikita Malyavin wrote: > On Tue, 18 Oct 2022 at 01:01, Sergei Golubchik wrote: > > > > > > diff --git a/sql/log_event_server.cc b/sql/log_event_server.cc > > > > > index 422d496d5c3..25705d13641 100644 > > > > >

Re: [Maria-developers] b2800c06b22: MDEV-28545 MyISAM reorganize partition corrupt older table format

2022-10-25 Thread Sergei Golubchik
ter partitions and change column data types at the same > + time. > +*/ > +Create_field::upgrade_data_types(alter_info->create_list); > + } > + >if (create_info->check_fields(thd, alter_info, > table_list->table_name, table_list

Re: [Maria-developers] 152295d1cb1: rpl: extra DEFAULTs should not be UPDATEd

2022-10-24 Thread Sergei Golubchik
tes m_curr_row_end */ > + error= unpack_current_row(rgi, _cols_ai); > + m_table->default_field= default_field; > + > + if (unlikely(error)) > goto err; > Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Ma

Re: [Maria-developers] 39e20ca7e28: MDEV-29748 ASAN errors or server crash in File_parser::parse upon concurrent view operations

2022-10-21 Thread Sergei Golubchik
ith a working server, I do not think > that our server will survive if something out of the server will > change frms. May be not, but it doesn't mean we need to introduce intentionally more places that can cause a crash. What will happen if you would not set share->tabledef_version.length= 0

Re: [Maria-developers] 99dcf061c8c: MDEV-29481 mariadb-upgrade prints confusing statement

2022-10-21 Thread Sergei Golubchik
ct per-segment > flags that were calculated during the table CREATE time, no matter > what the old (CREATE time) and new (ALTER TIME) per-index compression > flags are, and no matter if they are equal or not. > > All other engine ignore key compression flags, so this change > is saf

Re: [Maria-developers] 39e20ca7e28: MDEV-29748 ASAN errors or server crash in File_parser::parse upon concurrent view operations

2022-10-20 Thread Sergei Golubchik
Hi, Oleksandr, On Oct 19, Oleksandr Byelkin wrote: > On Wed, Oct 19, 2022 at 5:09 PM Sergei Golubchik wrote: > > On Oct 19, Oleksandr Byelkin wrote: > > > > > >if (share->view_def->parse((uchar *) >tabledef_version, NULL, > > >

Re: [Maria-developers] 39e20ca7e28: MDEV-29748 ASAN errors or server crash in File_parser::parse upon concurrent view operations

2022-10-19 Thread Sergei Golubchik
r, both of the same TABLE_SHARE? > return TRUE; > + } >DBUG_ASSERT(share->tabledef_version.length == > MICROSECOND_TIMESTAMP_BUFFER_SIZE-1); > + >return FALSE; > } Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org _

Re: [Maria-developers] 52f489ebccb: MDEV-29069 follow-up: support partially suitable keys

2022-10-17 Thread Sergei Golubchik
Hi, Nikita, On Oct 17, Nikita Malyavin wrote: > Hello Sergei! > > On Tue, 4 Oct 2022 at 21:02, Sergei Golubchik wrote: > > > Hi, Nikita, > > > > This review applies to the combined diff e2f8dff^..52f489e > > > > On Oct 04, Nikita Malyavin wrote: &g

Re: [Maria-developers] c83f87ece4a: MDEV-15990 REPLACE on a precise-versioned table returns duplicate key error (ER_DUP_ENTRY)

2022-10-15 Thread Sergei Golubchik
goto ok_or_after_trg_err; >} > + if (table->versioned(VERS_TIMESTAMP) && table->vers_write) > + { > +store_record(table, record[2]); > +error = vers_insert_history_row(table); if you do that, you shouldn't have been doin

Re: [Maria-developers] 19772f9c277: MDEV-29748 ASAN errors or server crash in File_parser::parse upon concurrent view operations

2022-10-13 Thread Sergei Golubchik
elongs? > + mysql_mutex_lock(>LOCK_share); > >if (!(share->tabledef_version.str= > (uchar*) alloc_root(>mem_root, > MICROSECOND_TIMESTAMP_BUFFER_SIZE))) Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org _

Re: [Maria-developers] b1b38b64598: MDEV-29181 Potential corruption on FK update on a table with vcol index

2022-10-10 Thread Sergei Golubchik
Hi, Marko, On Oct 10, Marko Mäkelä wrote: > On Sun, Oct 9, 2022 at 2:03 PM Sergei Golubchik wrote: > > I've spent more time on this issue, and it looks like there is no > > structure in InnoDB with the life time till the end of the statement > > (or, at least, nothing easil

Re: [Maria-developers] b1b38b64598: MDEV-29181 Potential corruption on FK update on a table with vcol index

2022-10-09 Thread Sergei Golubchik
Hi, Nikita, On Sep 01, Sergei Golubchik wrote: > > > This new solution simply does the following: > > * Sets up a referenced table list in TABLE instance (sql_base.cc) > > * Iterates through it along with dict_table_t::referenced_set > > (row_upd_check_reference

Re: [Maria-developers] b1b38b64598: MDEV-29181 Potential corruption on FK update on a table with vcol index

2022-10-05 Thread Sergei Golubchik
Hi, Nikita, On Sep 27, Nikita Malyavin wrote: > Sergei, I have reworded the commit message, please see it here: > https://github.com/MariaDB/server/commit/3a3064e355bac20ed56ae807e790068e16dd16f3 Same thing. I still cannot understand from the comment what the problem was. >> > Th

Re: [Maria-developers] dcfc60ea2ee: MDEV-29481 mariadb-upgrade prints confusing statement

2022-10-05 Thread Sergei Golubchik
ask) != (new_key->flags & key_flag_mask)) > return Compare_keys::NotEqual; > > - if ((table_key->flags & HA_KEYFLAG_MASK) != > - (new_key->flags & HA_KEYFLAG_MASK)) > + if (table_key->algorithm != new_key->algorithm) > return Compare_ke

Re: [Maria-developers] 52f489ebccb: MDEV-29069 follow-up: support partially suitable keys

2022-10-04 Thread Sergei Golubchik
)) >continue; > > -tmp= key->rec_per_key[last_part]; > +tmp= key->rec_per_key[parts_suit - 1]; > if (best_key_nr == MAX_KEY || (tmp > 0 && tmp < best_rec_per_key)) > { >best_key_nr= i; > best_key= key; >bes

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

2022-09-28 Thread Sergei Golubchik
(tabledef_version.length && ... that is, if m_table_ref_version matches, then you don't need to do any further checks, the table is fine. If m_table_ref_version differs, meaning, the table was reopened, then you check tabledef_version and triggers. Perhaps the simplest fix would be to remove r

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

2022-09-27 Thread Sergei Golubchik
> +MICROSECOND_TIMESTAMP_BUFFER_SIZE))) > +return TRUE; > + share->tabledef_version.length= 0; // safety if the drfinition file is > brocken > > + DBUG_ASSERT(share->view_def != NULL); > + if (share->view_def->parse((uchar *) >table

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-09-26 Thread Sergei Golubchik
_time_to_time, hr_time_from_time > > > > What do you mean by "made for events" ? > > It request val field from passed object (I mean the macro), and I am > not sure if rewriting that macro a good idea. it works with my_hrtime_t values, so if you store high-resolutio

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-09-26 Thread Sergei Golubchik
ues. > > > +timestamp.second_part= trigger->ms_create_time % 100; > > > > hrtime_to_time() and hrtime_sec_part() > > they made for events, so I made hr_time_to_time, hr_time_from_time What do you mean by "made for events" ? Regards, Sergei VP of MariaDB

Re: [Maria-developers] f5a8327d016: MDEV-29458: Role grant commands do not propagate all grants

2022-09-12 Thread Sergei Golubchik
t; + /* all grants must be revoked from this role by now. propagate this */ > + propagate_role_grants(acl_role, PRIVS_TO_MERGE::ALL); > + >my_hash_delete(_roles, (uchar*) acl_role); >DBUG_RETURN(1); > } > Regards, Sergei VP of MariaDB Server Engine

Re: [Maria-developers] e0e75de899f: MDEV-26715 Windows/installer - allow passwordless login for root

2022-09-11 Thread Sergei Golubchik
ot;No AUTH_GSSAPI plugin" unless $ENV{AUTH_GSSAPI_SO}; > +return "No AUTH_GSSAPI plugin" unless ($ENV{AUTH_GSSAPI_SO} or ($^O eq > 'MSWin32')); The second condition normally is something like or $::mysqld_variables{gssapi} eq "ON"; > > retu

Re: [Maria-developers] 3f9e6c9c111: MDEV-22133 handle_fatal_signal (sig=11) on optimized builds in handle_grant_table instead of ERROR | Buffer overflow (on optimized builds)

2022-09-09 Thread Sergei Golubchik
p: >if (p_table) > @@ -10041,6 +10046,8 @@ static int handle_grant_data(THD *thd, Grant_tables& > tables, bool drop, >} > >/* Handle stored routines table. */ > + if (tables.procs_priv_table().table_exists()) > + { This is ok, but also, please, check that a

Re: [Maria-developers] 68ebe0e2f5e: MDEV-29446 Change SHOW CREATE TABLE to display default collation

2022-09-09 Thread Sergei Golubchik
set()->name); >} Note that in 10.10 you need to fix json_table code inside a big if() condition: ... (!(m_explicit_cs->state & MY_CS_PRIMARY) && (str->append(STRING_WITH_LEN(" COLLATE ")) || str->append(_explicit_cs->

Re: [Maria-developers] 489a7fba324: MDEV-29322 ASAN heap-use-after-free in Query_log_event::do_apply_event

2022-09-02 Thread Sergei Golubchik
mal patch to show the fix, practically I'd accompany it with a small cleanup patch) Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org On Sep 02, Andrei Elkin wrote: > > > Query_log_event cannot just randomly use some > > options_written_to_bi

Re: [Maria-developers] 489a7fba324: MDEV-29322 ASAN heap-use-after-free in Query_log_event::do_apply_event

2022-09-01 Thread Sergei Golubchik
event has to remember options_written_to_bin_log itself, there's not much we can do about it. Or it can apply the mask in the constructor and store not flags2 but the new value of thd->variables.option_bits. Or it can extend flags2 to cove

Re: [Maria-developers] b1b38b64598: MDEV-29181 Potential corruption on FK update on a table with vcol index

2022-09-01 Thread Sergei Golubchik
prebuilt, I mean. I couldn't find it (it's a complex patch, so I couldn've missed it). As far as I can see, it's only used to store a pointer to TABLE. So it seems to me than a simpler fix for this bug could be: * remove vc_templ caching (mysql_table and mysql_table_query_id) * store TABLE* in upd_n

Re: [Maria-developers] ed477a6d30c: MDEV-29056 Replica thread reports error on ALTER ONLINE after LOCK WRITE

2022-08-27 Thread Sergei Golubchik
, so the replica node > remains unaware of it. > > The solution would be to guess on the replica side on the mode used by > master. To make a deduction reliable, master's locked_tables_mode state > is passed for query log events. Regards, Sergei VP

Re: [Maria-developers] e2f8dffc056: MDEV-29069 ER_KEY_NOT_FOUND on online autoinc addition + concurrent DELETE

2022-08-27 Thread Sergei Golubchik
ity >if (get_flags(STMT_END_F)) > status_var_increment(thd->status_var.com_stat[SQLCOM_DELETE]); > > + const uchar *curr_row_end= m_curr_row_end; > + unpack_row(rgi, m_table, m_width, m_curr_row, _cols, > + _row_

Re: [Maria-developers] 5154e224a97: MDEV-5215 Granted to PUBLIC

2022-08-25 Thread Sergei Golubchik
op database testdb; > + > +--echo # > +--echo # bug with automatically added PUBLIC role > +--echo # > + > +--echo # automaticly added PUBLIC > +delete from mysql.global_priv where user="PUBLIC"; > +flush privileges; > +GRANT SELECT on test.* to PUBLIC; > + >

Re: [Maria-developers] bcfc424d859: MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite

2022-08-25 Thread Sergei Golubchik
e: remove test and test_* database hacks in the test > suite let's say, it's ok. Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@list

Re: [Maria-developers] 1c3182a99e5: MDEV-5215 prerequisite of prerequisite: if DB is not mentioned in connect ignore errors of switching to it

2022-08-25 Thread Sergei Golubchik
modify mysqltest in a way that would avoid the need of changing tests. > connection con0; > select hex(@a); Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-developers P

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

2022-08-24 Thread Sergei Golubchik
# NOTE: having row_start=0 might be useful and can mean > # "there is no information on when the history was started" (an opposite to > row_end=MAX_TIMESTAMP) > > Maybe we should allow it? Just to make the user not invent some values > for this purpose (like

Re: [Maria-developers] a507f126b03: MDEV-29159 Patch for MDEV-28918 introduces more inconsistency than it solves, breaks usability

2022-08-05 Thread Sergei Golubchik
Hi, Alexander, > > -ERROR HY000: Illegal parameter data types inet6 and int for operation 'SET' > > +ERROR HY000: Unknown CAST(int AS inet6) in assignment of 'target' sorry, forgot to add, let's also add a db/table name here? and use the proper backtick quoting for identifiers Reg

Re: [Maria-developers] a507f126b03: MDEV-29159 Patch for MDEV-28918 introduces more inconsistency than it solves, breaks usability

2022-08-05 Thread Sergei Golubchik
HERE COLUMN_NAME='source' > AND TABLE_NAME='t1' > @@ -47,6 +52,7 @@ INSERT INTO t3 VALUES > (2, > (SELECT source FROM t2 ORDER BY id LIMIT 1), > (SELECT source FROM t2 ORDER BY id LIMIT 1)); > +ERROR 22003: Cannot get geometry object from data you send to t

Re: [Maria-developers] f3fc58149dd: MDEV-29159 Patch for MDEV-28918 introduces more inconsistency than it solves, breaks usability

2022-08-03 Thread Sergei Golubchik
false; > +} > my_error(ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION, MYF(0), > type_handler()->name().ptr(), from->name().ptr(), "SET"); > return true; if you wouldn't want to change the error message in a followup commit, I'd suggested somethin

Re: [Maria-developers] Review: MDEV-29075 Changing explicit_defaults_for_timestamp within stored procedure works inconsistently

2022-07-30 Thread Sergei Golubchik
Hi, Alexander, On Jul 29, Alexander Barkov wrote: >Hello Sergei, > > I have a couple of suggestions: > > > commit 7b8304045272111a6f4d44196d6b37cbfef06f37 > > Author: Sergei Golubchik > > Date: Wed Jul 20 17:31:48 2022 +0200 &g

Re: [Maria-developers] review for (MDEV-28632) bugfix: DEFAULT NULL was allowed for NOT NULL columns

2022-07-29 Thread Sergei Golubchik
Hi, Alexander, I added tests and created an MDEV. Specific replies below: On Jul 29, Alexander Barkov wrote: >Hello Sergei, > > > commit 5a362d486b30fdaf3c7a360737331767154b4ee8 > > Author: Sergei Golubchik > > Date: Mon Jul 18 22:53:27 2022 +0200 > >

Re: [Maria-developers] ce5cc8fb905: MDEV-29021 ALTER TABLE fails when a stored virtual column is dropped+added

2022-07-13 Thread Sergei Golubchik
Hi, Nikita, Sure, as you like On Jul 13, Nikita Malyavin wrote: > I did, in rpl_alter_extra_persistent.test. > > Btw, maybe also rename this file, into something not referring to > PERSISTENT? > > On Wed, 13 Jul 2022 at 23:41, Sergei Golubchik wrote: > > > Hi,

Re: [Maria-developers] ce5cc8fb905: MDEV-29021 ALTER TABLE fails when a stored virtual column is dropped+added

2022-07-13 Thread Sergei Golubchik
Hi, Nikita, Please, add a test case for DEFAULT in replication, something like I described below. On Jul 13, Nikita Malyavin wrote: > On Thu, 7 Jul 2022 at 16:05, Sergei Golubchik wrote: > > > Hi, Nikita, > > > > This is good, but I think fill_extra_persistent_columns

Re: [Maria-developers] 3e2d297830b: MDEV-29013 ER_KEY_NOT_FOUND/lock timeout upon online alter with long unique

2022-07-07 Thread Sergei Golubchik
ot delete it! Even though MERGE tables do not have their children > @@ -11854,8 +11857,11 @@ copy_data_between_tables(THD *thd, TABLE *from, > TABLE *to, > > // We'll be filling from->record[0] from row events > bitmap_set_all(from->write_set); > -//

Re: [Maria-developers] 73c4fd41afc: Do not ignore sql_mode when replicating

2022-07-07 Thread Sergei Golubchik
t know the code. I'd suggest to add method, like struct Rpl_table_data { ... bool is_online_alter() { return copy_fields != NULL; } ... }; btw, it fits very well in your Rpl_table_data simplification. > + | MODE_NO_AUTO_VALUE_ON_ZERO; Regards, Serg

Re: [Maria-developers] ce5cc8fb905: MDEV-29021 ALTER TABLE fails when a stored virtual column is dropped+added

2022-07-07 Thread Sergei Golubchik
ns > - */ > - if (unlikely(error= fill_extra_persistent_columns(table, cols->n_bits))) > -DBUG_RETURN(error); > - >/* > We should now have read all the null bytes, otherwise something is > really wrong. Regards, Sergei VP of MariaDB Server Engineering

Re: [Maria-developers] How to know when a FUNCTION is AGGREGATE?

2022-06-15 Thread Sergei Golubchik
> > With regards, > > Martijn Tonies > Upscene Productions > https://www.upscene.com > Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-developers Post to

Re: [Maria-developers] 8c2c0e6079a: MDEV-27265 Improve contraction performance in UCA collations

2022-06-11 Thread Sergei Golubchik
> 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 > in the end of the list. > Regards, Serg

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

2022-06-08 Thread Sergei Golubchik
t; +*/ > > > > if it's generated, do you need to check it in? > > perhaps it should be generated during the build? > > you've checked in allkeys1400.txt anyway. > > Right, we can consider it. > > Btw, I've checked it all versions: > > $ ls mysql-test/st

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

2022-05-06 Thread Sergei Golubchik
+ } > + void restore_binlog_vars(my_bool _log_bin) this doesn't need to be a reference, just a normal pass-by-value will do. > + { > +do_log_bin= thd->variables.sql_log_bin; > +thd->variables.sql_log_bin= sav_log_bin; > +thd->set_binlog_bit(); > + } >

Re: [Maria-developers] 4ba5b444b4b: MDEV-28437: Assertion `!eliminated' failed in Item_subselect::exec

2022-05-04 Thread Sergei Golubchik
Hi, Sergei, On May 04, Sergei Petrunia wrote: > revision-id: 4ba5b444b4b (mariadb-10.2.43-97-g4ba5b444b4b) > parent(s): 70555454b4c > author: Sergei Petrunia > committer: Sergei Petrunia > timestamp: 2022-05-04 12:24:48 +0300 > message: > > MDEV-28437: Assert

Re: [Maria-developers] 85cc56875e9: MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ...

2022-05-03 Thread Sergei Golubchik
Hi, Sergei, The solutions looks fine Two comments below, about the implementation. ok to push after addressing them On May 03, Sergei Petrunia wrote: > revision-id: 85cc56875e9 (mariadb-10.2.43-75-g85cc56875e9) > parent(s): 3b6c04f44c4 > author: Sergei Petrunia > committer: Ser

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

2022-04-26 Thread Sergei Golubchik
Hi, Rucha, Looks good. please also check that row_number values match what's in a warning, and then ok to push! On Apr 26, Rucha Deodhar wrote: > On Tue, Apr 26, 2022 at 12:41 AM Sergei Golubchik wrote: > > what if you combine it with union? > > create table t (a char(1)) v

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

2022-04-25 Thread Sergei Golubchik
)->lim.get_select_limit()) >break; > -int rc= > - result->send_data_with_check(*elem, sl->master_unit(), send_records); > +rc= result->send_data_with_check(*elem, sl->master_unit(), send_records); you don't need to do that anymore (it was needed

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

2022-04-25 Thread Sergei Golubchik
> + my_printf_error(ER_INVALID_ROLE, "User %`s@%`s has not been > granted role %`s", > + MYF(0), user, host, rolename); >} >else >{ Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org __

Re: [Maria-developers] 5f8ffc7271a: MDEV-20207: Assertion `! is_set()' failed in Diagnostics_area::set_eof_status upon HANDLER READ

2022-04-25 Thread Sergei Golubchik
e. But whether you move `int res` declaration inside or not - it's ok to push, no need to ask for another review. Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org On Apr 25, Rucha Deodhar wrote: > revision-id: 5f8ffc7271a (mariadb-10.2.40-251-g5f8ffc7271a) > p

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

2022-04-20 Thread Sergei Golubchik
Hi, Aleksey, ok to push, thanks! On Apr 20, Aleksey Midenkov wrote: > Sergei, > > I updated the branch accordingly. There is your patch fa444975d0f > where I added log_current_statement(). > > On Wed, Apr 20, 2022 at 1:12 PM Sergei Golubchik wrote: > > > > H

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

2022-04-20 Thread Sergei Golubchik
Hi, Aleksey, Okay, sure. I was going to push it after the release. And in 10.3 to simplify future merges. On Apr 20, Aleksey Midenkov wrote: > Hi Sergei! > > On Tue, Apr 19, 2022 at 11:13 AM Sergei Golubchik wrote: > > > > Hi, Aleksey, > > > >

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

2022-04-19 Thread Sergei Golubchik
gt; > Where is your patch? It's really just renaming, almost nothing else. But here it is, attached. Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org commit 0593fd1926f Author: Sergei Golubchik Date: Mon Apr 11 22:06:21 2022 +0200 cleanup: log_curre

Re: [Maria-developers] 96b40a5e2f5: MDEV-27744 InnoDB: Failing assertion: !cursor->index->is_committed() in row0ins.cc (from row_ins_sec_index_entry_by_modify) | Assertion `0' failed in row_upd_sec_in

2022-04-18 Thread Sergei Golubchik
> +*/ > +next_state= MY_LEX_IDENT_OR_QUALIFIED_SPECIAL_FUNC; I don't understand why you did it in the lexer and not in the parser, like - | REPLACE '(' expr ',' expr ',' expr ')' + | opt_schema REPLACE '(' expr ',' expr ',' expr '

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

2022-04-17 Thread Sergei Golubchik
binlog (or binlog trx cache) even if it otherwise wouldn't be. So, two flags. Clear names and semantics. "vers_created_partitions" fits into the second use case, so one should use OPTION_BINLOG_THIS_STMT for it. Regards, Sergei VP of MariaDB Server Engineering and secur...@mar

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

2022-04-16 Thread Sergei Golubchik
ay. But I have a fix for this different bug already, in bb-10.3-serg-MDEV-24176 So, go ahead and push, then I'll merge with 10.2 and push my fix too. Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://laun

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

2022-04-15 Thread Sergei Golubchik
rk-in-progress" commit that removes init_lex_with_single_table and CONTEXT_ANALYSIS_ONLY_VCOL_EXPR. Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-developers Post to

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

2022-04-13 Thread Sergei Golubchik
NLY_VCOL_EXPR (it's set inside init_lex_with_single_table()) is wrong, what you're doing is not "context analysys only", you're preparing items for evaluation. Let's wait for Sanja to close his MDEV-25638, and then I'll check this test case again. Regards, Sergei VP of MariaDB Server Eng

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

2022-04-12 Thread Sergei Golubchik
ode(thd, killed_status == NOT_KILLED); > +StatementBinlog stmt_binlog(thd, > thd->binlog_need_stmt_format(trans_table)); > res= thd->binlog_query(THD::ROW_QUERY_TYPE, > thd->query(), thd->query_length(), > t

Re: [Maria-developers] e3e59c9e38d: MDEV-28266 Crash in Field_string::type_handler when calling procedures

2022-04-10 Thread Sergei Golubchik
== with the commit comment saying that "on_table_fill_finished() should always be done at the end of open(), even if result is not Select_materialize, but, for example, Select_fetch_into_spvars" Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org

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

2022-04-07 Thread Sergei Golubchik
ist); > + > + if (table->pos_in_table_list->security_ctx) > thd->security_ctx= tl->security_ctx; > - bool res= fix_session_vcol_expr(thd, vcol); > + > + inited= true; > + return false; > +} > + Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.

  1   2   3   4   5   6   7   8   9   10   >