JinNo Kim wrote:
> At this time, I think you are stuck as I've been
> scripting the partition creation. To my
> knowledge, there is no auto-generation of
> partitions. See
>
http://forums.mysql.com/read.php?106,52423,52423#m
> sg-52423
>
> I suggested this as a feature a while back and I
> think it's still one of those things that will be
> fun for the team to try, but will require a
> reasonable amount of work to implement (the
> suggestion used a year as an example, but would
> extend to any logical time period - I really want
> days and a followup post by another individual
> clarified the community's desire for that
> functionality).
>
> Mikael responded that it is on their "Idea list",
> but would take a bit to work out (there's no easy
> way to get there from here)... In essence, they
> will probably need to rewrite the "Out of Range"
> error handler to do math and figure out what the
> next partition should be based upon the create
> statement, then throw an alter table and retry the
> insert... all on the fly. There's a better
> explanation of the existing behavior at
>
http://dev.mysql.com/doc/refman/5.1/en/partitionin
> g.html in the section on range partitioning, but
> the solution provided there involves creating a
> "catchall" partition, and juggling the data later.
Quite correct and this feature is still on the idea list
together with a few others worthwhile to consider for
the next few releases of MySQL. Now that the framework
for ALTER TABLE for partitions is there it should be doable
to consider this feature more in detail although as usual no
promises can be made.
Rgrds Mikael
Mikael Ronstrom
Senior Software Architect, MySQL AB
My blog:
http://mikaelronstrom.blogspot.com