I know that, there is no support for sequences in MySql. We can use Auto increment column for that. But in my scenario, in our application we gives user privilege to create sequence in database which is used for sequencing the file list on disk.
For example, following configuration will create files as shown:
<character-renaming-operation>
<query>select lpad(SEQ_FILENO.nextval,5, '0') from dual</query>
</character-renaming-operation>
This will create my files on disc as per following [considering seq start from 1].
output_file_00001.csv
output_file_00002.csv
output_file_00003.csv
...
We cannot use any Java logic for this global sequence, as we have multiple JVM running for single Database. So how I can achieve same with single query in mysql?