← Back to team overview

maria-developers team mailing list archive

Re: bb-10.2-compatibility - Updatable cursor

 

Hello Jerome,

On 03/10/2017 05:21 PM, jerome brauge wrote:
> Hello Alexander,
> Nice to hear you again.
> You can find description here :
> https://mariadb.com/kb/en/sql-99/positioned-update-statement/
> https://mariadb.com/kb/en/sql-99/positioned-delete-statement/
> 
> I attached an example (positioned_update.sql).
> It's a useful feature to update or delete rows in a table without unique key and lock all records when cursor is open.

I can add tasks, but I'm afraid this is something not doable in short terms.

MariaDB cursors are materialized. I.e. a temporary table is created and
populated during OPEN cursor, so FETCH is actually done from this
temporary table rather than the original table.

If the table does not  have a unique key, then we have troubles with
"WHERE CURRENT OF" referring the original table.

Implementing "WHERE CURRENT OF" seems to need adding of
non-materialized cursors first.

> 
> Regards,
> Jérôme.
> 
> 
>> -----Message d'origine-----
>> De : Alexander Barkov [mailto:bar@xxxxxxxxxxx]
>> Envoyé : vendredi 10 mars 2017 11:24
>> À : jerome brauge
>> Cc : MariaDB Developers (maria-developers@xxxxxxxxxxxxxxxxxxx)
>> Objet : Re: bb-10.2-compatibility - Updatable cursor
>>
>> Hello Jerome,
>>
>> can you please give examples?
>>
>> Thanks!
>>
>>
>> On 03/08/2017 07:33 PM, jerome brauge wrote:
>>> Hello Alexander,
>>>
>>> Can you add a task for updatable cursor  (for positioned update and
>> delete).
>>>
>>>
>>>
>>> Regards,
>>>
>>> Jérôme.
>>>


Follow ups

References