Re: [Maria-developers] 2792940391a: MDEV-23327 Can't uninstall UDF if the implementation library file doesn't exist

2020-10-11 Thread Sergei Golubchik
Hi, Oleksandr!

On Oct 11, Oleksandr Byelkin wrote:
> > > +  // Pre-check without protection
> > > +  if (!find_udf_everywhere(thd, udf_name->str, udf_name->length, table))
> >
> > you cannot check the udf_hash without a lock
> 
> I made an attempt of a fast check under read protection (because it
> looks like old code had pre-check).

As far as I can see, the old code was was using find_udf() that was
taking a read lock too.

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-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-developers] 2792940391a: MDEV-23327 Can't uninstall UDF if the implementation library file doesn't exist

2020-10-11 Thread Oleksandr Byelkin
HI, Sergei!

On Sat, Oct 10, 2020 at 11:16 PM Sergei Golubchik  wrote:

> Hi, Oleksandr!
>
> Mostly ok, one problem below:
>
> On Oct 10, Oleksandr Byelkin wrote:
> > revision-id: 2792940391a (mariadb-10.2.31-343-g2792940391a)
> > parent(s): 2107e3bb9c0
> > author: Oleksandr Byelkin 
> > committer: Oleksandr Byelkin 
> > timestamp: 2020-07-29 21:54:24 +0200
> > message:
> >
> > MDEV-23327 Can't uninstall UDF if the implementation library file
> doesn't exist
> >
> > Made cleanup of DROP (udf) FUNCTION procedure and also check of
> mysql.func (not only loaded udf).
> >
> > @@ -606,43 +648,54 @@ int mysql_create_function(THD *thd,udf_func *udf)
> >  }
> >
> >
> > -int mysql_drop_function(THD *thd,const LEX_STRING *udf_name)
> > +enum drop_udf_result mysql_drop_function(THD *thd, const LEX_STRING
> *udf_name)
> >  {
> >TABLE *table;
> > -  TABLE_LIST tables;
> >udf_func *udf;
> >DBUG_ENTER("mysql_drop_function");
> >
> > +  if (!(table= open_udf_func_table(thd)))
> > +DBUG_RETURN(UDF_DEL_RESULT_ERROR);
> > +
> > +  // Pre-check without protection
> > +  if (!find_udf_everywhere(thd, udf_name->str, udf_name->length, table))
>
> you cannot check the udf_hash without a lock
>

I made an attempt of a fast check under read protection (because it looks
like old code had pre-check).


> > +  {
> > +close_mysql_tables(thd);
>
> 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-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-developers] Unsubscribe

2020-10-11 Thread Ramanand Perianayagam
Please Unsubscribe

From: Maria-developers 

 On Behalf Of TINKU BANSAL
Sent: Sunday, October 11, 2020 11:06 AM
To: maria-developers@lists.launchpad.net
Subject: [Maria-developers] Unsubscribe

Hi there,

Please Unsubscribe me to this mailing list.

Thanks
Caution: Please do not click links or open attachments unless you recognize the 
sender and know the content is safe.


 Disclaimer: This message and the information contained herein is proprietary 
and confidential and subject to the Tech Mahindra policy statement, you may 
review the policy at http://www.techmahindra.com/Disclaimer.html externally 
http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra. 

___
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp