add "PARTITION BY" and "STATS SAMPLE PAGES" to mysql reflected options

Issue #4038 new
chebee7i created an issue

Some keyword kwargs like 'mysql_partition_by' and 'mysql_stats_sample_pages' are not reflected and stored in kwargs.

import sqlalchemy as sa
m = sa.MetaData()

t = sa.Table('ti', m,
    sa.Column('id', sa.Integer),
    sa.Column('amount', sa.DECIMAL(7, 2)),
    sa.Column('tr_date', sa.Date),
    mysql_engine='InnoDB',
    mysql_partition_by='HASH( MONTH(tr_date) )',
    mysql_partitions='6'
)

engine = ...
t.create(engine)
m2 = sa.Metadata(bind=engine, reflect=True)
assert 'mysql_partition_by' in m2.tables['ti'].kwargs  # AssertionError

Comments (2)

  1. Log in to comment