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
s a > "certainly 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/

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

2023-05-26 Thread Sergei Golubchik
*empty* ? If 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://launc

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

2023-05-26 Thread Sergei Golubchik
't, it already defaults to 1 "unknown" 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 _

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

2023-05-24 Thread Sergei Golubchik
b7fadd86a23 100644 > --- 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->fil

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

2023-05-24 Thread Sergei Golubchik
nderstand > + > +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)); > +a

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

2023-05-23 Thread Sergei Golubchik
k_list); > + for (auto &fk: fk_list) > + { > +if (fk_modifies_child(fk.delete_method) > +|| fk_modifies_child(fk.update_method)) > +{ > + reason= "Tables with CASCADE/SET NULL foreign keys are"; > + goto unsupported; > +} > + } >

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
te that 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.ne

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

2023-05-09 Thread Sergei Golubchik
d. > > 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
conv_field ? "" : "not ", > - (*field_ptr)->field_name.str, > - (long) (field_ptr - begin_ptr))); > + dbg->field_name.str, > + (long) ())); eh? you surely meant `(lo

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

2023-05-05 Thread Sergei Golubchik
re_prev_position(); > +} > +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

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

2023-05-05 Thread Sergei Golubchik
able->file condition 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_REPL

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

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

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
efine a function with the same name as a native function in any db. E.g. create test.replace(a int) returns int and it'll be callable as test.replace(1) So ER_FUNCTION_NOT_DEFINED is wrong here. But note that even though test.substr() is possible, it should not allow substr() special syntax. >

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 t

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

2023-03-08 Thread Sergei Golubchik
#x27;t perform the conversion in case the source DATETIME was above > + TIMESTAMP_MAX_VALUE (and was truncated to TIMESTAMP_MAX_VALUE). why not? > +*/ > +if (my_time_tmp && > +(my_time_tmp != TIMESTAMP_MAX_VALUE || > + error_code != ER_WARN

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

2023-03-07 Thread Sergei Golubchik
l_mapping; and in find_elem_by_charset() you set the 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 h

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

2023-02-10 Thread Sergei Golubchik
#include > +#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

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
to be fixed (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 dc

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

2023-01-15 Thread Sergei Golubchik
ables */ > thd->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 >

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
gt; @@ -1267,7 +1286,11 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, > TABLE *table, >list_item= new (mem_root) Item_field(thd, keypart->field); > field_list->push_back(list_item, mem_root); >} > - Item_func_hash *hash_item= new(mem_root)Item_fu

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

2023-01-06 Thread Sergei Golubchik
;('); > +args[1]->print(str, query_type); > +str->append(STRING_WITH_LEN(") escape ")); no, this is wrong. Don't just force parentheses there. Instead, fix the precedence, so that the parentheses would be printed automatically when needed. > es

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

2023-01-06 Thread Sergei Golubchik
0', > multipoint(point(124,204)), 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_GEOME

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
ECT name, body_utf8, body FROM mysql.proc WHERE name like 'sp1'; > +CALL sp1(); > +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

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

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

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

2022-12-27 Thread Sergei Golubchik
reasons > pxc-421: wsrep_provider is read-only for security reasons > +galera_sst_rsync_innodb_nest : MDEV-29591 nesting innodb subdirectories in > datadir causes SST to fail Why do you disable it if the whole commit is about fixing the test? How can I see that the test works? >

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

2022-12-20 Thread Sergei Golubchik
gt; > > 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 symlin

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

2022-12-19 Thread Sergei Golubchik
ver used in production, so no immutability 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

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

2022-12-19 Thread Sergei Golubchik
"`mysql`.`global_priv`.`user`", "access": 1}], "version_id": VERSION_ID} > +# > +# But when Bar is active, denies can not be ignored any more. > +# > +set role bar; > +select JSON_EXTRACT(priv, '$.deny') from mysql.global_priv where user = &

[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 "g

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 3af

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

2022-10-31 Thread Sergei Golubchik
ne alter all events are for the 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-develop

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
ot alter 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

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

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

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
ng frm file with 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-&

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

2022-10-21 Thread Sergei Golubchik
er-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 *) &share->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
alid? Can it succeed for one TABLE and fail for another, 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...

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 be

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
true); where it logically belongs? > + mysql_mutex_lock(&share->LOCK_share); > >if (!(share->tabledef_version.str= > (uchar*) alloc_root(&share->mem_root, > MICROSECOND_TIMESTAMP_BUFFER_SIZE))) Regards, Sergei VP of MariaDB Ser

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

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
+ if ((table_key->flags & key_flag_mask) != (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_k

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

2022-10-04 Thread Sergei Golubchik
& tmp < best_rec_per_key)) > { >best_key_nr= i; >best_key= key; >best_rec_per_key= tmp; > + m_key_parts_suit= parts_suit; > } >} > > @@ -8494,12 +8568,20 @@ Delete_rows_log_event::do_before_row_operations(const >

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
amp; (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

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
.str= > +(uchar*) alloc_root(&share->mem_root, > +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-

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
delete_dynamic(&acl_role->role_grants); ? > + > + /* all grants must be revoked from this role by now. propagate this */ > + propagate_role_grants(acl_role, PRIVS_TO_MERGE::ALL); > + >my_hash_delete(&acl_roles, (uchar*) acl_role); >DBUG_RETURN(1); > } > Regard

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"; >

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
nd_unlock_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

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

2022-09-09 Thread Sergei Golubchik
d->charset()->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->appe

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

2022-09-02 Thread Sergei Golubchik
n intentionally minimal 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 > &

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

2022-09-01 Thread Sergei Golubchik
the Query_log_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 e

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

2022-09-01 Thread Sergei Golubchik
ywhere? As a 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_tabl

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

2022-08-27 Thread Sergei Golubchik
licated, 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. Rega

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

2022-08-27 Thread Sergei Golubchik
efore_row_operations(const > Slave_reporting_capability >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, &m_cols

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

2022-08-25 Thread Sergei Golubchik
estuser,,); > +connection testuser; > + > +alter function testdb.f1 comment "A stupid function"; > +--error ER_PROCACCESS_DENIED_ERROR > +select testdb.f1(); > + > +connection default; > + > +use test; > +disconnect tes

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-devel

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
be checked too. Also, please note this comment: > > # 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 us

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 quo

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

2022-08-05 Thread Sergei Golubchik
type= (SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS > WHERE 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 i

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

2022-08-03 Thread Sergei Golubchik
; > +} > 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 suggeste

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 > > &g

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, Ni

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
t two. >/* > Close the intermediate table that will be the new table, but do > not 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 fil

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

2022-07-07 Thread Sergei Golubchik
who don'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_Z

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

2022-07-07 Thread Sergei Golubchik
ra slave persistent columns > - */ > - 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 M

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

2022-06-15 Thread Sergei Golubchik
bout this. > > > 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-deve

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,

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

2022-06-08 Thread Sergei Golubchik
n '14.0.0' > >> +*/ > > > > 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 chec

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

2022-05-06 Thread Sergei Golubchik
> +thd->set_binlog_bit(); > + } > + void restore_binlog_vars(my_bool &sav_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; > +t

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: Assertion

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(

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

2022-04-25 Thread Sergei Golubchik
ords >= sl->master_unit()->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 nee

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

2022-04-25 Thread Sergei Golubchik
e */ > + 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
ialization is very expensive. 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-

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_

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
> +mariadb_schema.TRIM('a') > + - Or an identifier otherwise. No keyword lookup is done, > +all keywords are treated as identifiers. > +*/ > +next_state= MY_LEX_IDENT_OR_QUALIFIED_SPECIAL_FUNC; I don't understand why

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

2022-04-17 Thread Sergei Golubchik
written to 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 a

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
first? Okay. 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 lis

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
be rebased on top of them after they're merged into 10.3) and the "work-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 _

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
CONTEXT_ANALYSIS_ONLY_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 agai

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

2022-04-12 Thread Sergei Golubchik
= query_error_code(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(), >

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

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
n_table_list; > + DBUG_ASSERT(table->pos_in_table_list); > + > + 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; > +} > +

  1   2   3   4   5   6   7   8   9   10   >