Вы можете использовать SEQUENCE Двигатель, как ths:
select CURDATE() + INTERVAL seq day FROM seq_1_to_31;
Вот полный пример:
SELECT '2018-10-01' + interval seq day as my_date FROM seq_0_to_9999
WHERE '2018-10-01' + interval seq day <= '2019-02-21';
Подробности вы можете найти здесь: https://mariadb.com/kb/en/library/sequence-storage-engine/
Посмотрите, какие двигатели установлены
MariaDB [test]> SHOW ENGINES;
+--------------------+---------+----------------------------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+--------------------+---------+----------------------------------------------------------------------------------+--------------+------+------------+
| MRG_MyISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| CSV | YES | Stores tables as CSV files | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| MyISAM | YES | Non-transactional engine with good performance and small data footprint | NO | NO | NO |
| Aria | YES | Crash-safe tables with MyISAM heritage | NO | NO | NO |
| InnoDB | DEFAULT | Supports transactions, row-level locking, foreign keys and encryption for tables | YES | YES | YES |
| PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO |
| SEQUENCE | YES | Generated tables filled with sequential values | YES | NO | YES |
+--------------------+---------+----------------------------------------------------------------------------------+--------------+------+------------+
8 rows in set (0.006 sec)
MariaDB [test]>
Образец
MariaDB [test]> select seq FROM seq_1_to_4;
+-----+
| seq |
+-----+
| 1 |
| 2 |
| 3 |
| 4 |
+-----+
4 rows in set (0.042 sec)
MariaDB [test]> select CURDATE() + INTERVAL seq day FROM seq_1_to_31;
+--------------------------------+
| DATE(NOW()) + INTERVAL seq day |
+--------------------------------+
| 2019-02-23 |
| 2019-02-24 |
| 2019-02-25 |
| 2019-02-26 |
| 2019-02-27 |
| 2019-02-28 |
| 2019-03-01 |
| 2019-03-02 |
| 2019-03-03 |
| 2019-03-04 |
| 2019-03-05 |
| 2019-03-06 |
| 2019-03-07 |
| 2019-03-08 |
| 2019-03-09 |
| 2019-03-10 |
| 2019-03-11 |
| 2019-03-12 |
...
...
| 2019-03-22 |
| 2019-03-23 |
| 2019-03-24 |
| 2019-03-25 |
+--------------------------------+
31 rows in set (0.019 sec)
MariaDB [test]>