fix daily billing under mysql, RT#10246