Comments - is this usage of User-defined Variables guaranteed?
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
Can you initialise the row number in a separate statement and avoid the warning. This URL may help http://www.xaprb.com/blog/2006/12/02/how-to-number-rows-in-mysql/ as it seem to provide an equivalent to ROW_NUMBER() OVER PARTITION.