You should not partition tables like this. Instead, consider putting it all in a unified table, with columns for month and index OR create a table with month and index columns, and reference a row id in your other table:
Option 1: unified table:
CREATE TABLE Unified (
month CHAR(3) NOT NULL,
ix INT NOT NULL DEFAULT 1,
[...],
PRIMARY (month, ix, somethingMore),
CHECK month IN (
'jan', 'feb', 'mar', 'apr', 'may', 'jun',
'jul', 'aug', 'sep', 'oct', 'nov', 'dec')
);
SELECT * FROM Unified where month = 'jan' AND ix = 1;
// select only tables with a "jan" prefix... or "1" suffix.
SELECT * FROM Unified where month = 'jan' OR ix = 1
Option 2: Use a foreign key:
CREATE TABLE Partitions (
id INT AUTO_INCREMENT PRIMARY,
month CHAR(3) NOT NULL,
ix INT NOT NULL DEFAULT 1,
CHECK month IN (
'jan', 'feb', 'mar', 'apr', 'may', 'jun',
'jul', 'aug', 'sep', 'oct', 'nov', 'dec'),
INDEX (month, ix)
)
CREATE TABLE Stuff (
partition INT NOT NULL,
[...],
PRIMARY KEY (partition, somethingMore),
FOREIGN KEY fk_Stuff_Partitions (partition) REFERENCES Partitions (id)
)
SELECT * FROM Stuff
INNER JOIN Partitions ON Stuff.partition = Partitions.id
WHERE Partition.month = 'jan' AND Partition.ix = 2;
// select only tables with a "jan" prefix... or "1" suffix.
SELECT DISTINCT * FROM Stuff
INNER JOIN Partitions ON Stuff.partition = Partitions.id
WHERE Partition.month = 'jan' OR Partition.ix = 1;