I guess I don't understand how does the subject work.
I have a MySQL table with such columns:
some_data1, some_data2, date
I expect large volumes, so I want this table to be partitioned based on year and quarter, so I want the data to be inserted in a new partition each quarter.
I have such criteria for partitioning:
HASH(YEAR(date) * 100 + QUARTER(date))
Which to my understanding is supposed to be calculated like 2021001 to first quarter of 2021, 2021002 to second quarter of 2021, and so on. And of course I expect it to do what I want it to do: to insert data into partitions based on this criteria: year and quarter.
But what it actually does - it ignores year. So data with dates
2021-01-01, 2010-02-03, 3000-03-02, etc.
goes exactly to one and only partition.
Another part of this question is - I guess MySQL doesn't automatically create new partition for each new calculated hash criteria, right? What if I clear some old data from such table, leaving some particular partition empty. Will new data with new calculated hash go to this empty partition or should I - like usual - do dirty work and create partition manually again? Which will leave a whole bunch of empty partitions...
(I am using PhpMyadmin, just in case)
So...Which part of my head matches potato most? :)