Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8583897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:38:39+00:00 2026-06-11T21:38:39+00:00

I am playing around with mysql 5.6. Im especially interested in the possibility: A

  • 0

I am playing around with mysql 5.6.
Im especially interested in the possibility:
A DATETIME or TIMESTAMP value can include a trailing fractional seconds part in up to microseconds (6 digits) precision.

What i would like is to partition a table using such a timestamp.

Example:

CREATE TABLE `VALUE_BIS` (
  `TSTAMP` timestamp(3) NOT NULL,
  `ATTRIBUTE_ID` int(11) NOT NULL,
  `VAL` int(11) unsigned NOT NULL,
  PRIMARY KEY (`ATTRIBUTE_ID`,`TSTAMP`)
)  PARTITION BY RANGE (UNIX_TIMESTAMP(TSTAMP))
     (PARTITION p_s18 VALUES LESS THAN (UNIX_TIMESTAMP('2012-09-18 00:00:00')),
     PARTITION p_s19 VALUES LESS THAN (UNIX_TIMESTAMP('2012-09-19 00:00:00')),
     PARTITION p_Max VALUES LESS THAN (UNIX_TIMESTAMP('2020-09-26 00:00:00' )));

==>ERROR 1491 (HY000): The PARTITION function returns the wrong type

*I think its normal as it returns unixtimestamp_seconds.microseconds which is not an integer*

If add the miliseconds like

PARTITION p_s18 VALUES LESS THAN (UNIX_TIMESTAMP('2012-09-18 00:00:00.000')

==> ERROR 1697 (HY000): VALUES value for partition ‘p_s18’ must have type INT

OK same story as before

If i change the definition of my tstamp column and do not use miliseconds

`TSTAMP` timestamp

==> It works just fine but i wont store my milliseconds and its not what i want.

Any idea?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T21:38:41+00:00Added an answer on June 11, 2026 at 9:38 pm

    MySQL still has some trouble partitioning tables with timestamps, like this one, which can cause a InnoDB crash. They’ve done a few changes in the behaviour of timestamp with fractional seconds in the past.

    My first guess is that the way the fractual seconds are stored and used collides with the unix_timestamp. Therefore the partitioning can’t be created properly (because wrong type) … and therefore generate the error messages you encounter.

    A workaround would be to add a second field which only contains the timestamp without fractual seconds and use this instead as your range identifier.

    Either way, you should report the bug.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been playing around with indexes on MySQL (5.5.24, WinXP), but I can't
i've playing around with mysql's full text search and I'm not sure if it
I am playing around with a Spring MVC + Hibernate + MySQL Hello World
Been playing around with this for a couple of hours and can't seem to
I'm starting with Databases. I've been playing around with MySQL and Informix, but never
I'm playing around with the Lahman Baseball Database in a MySQL instance. I want
I'm playing around with MySQL stored procedures and I need a little help wrapping
I'm playing around with mysql and I found two ways to define Foreign keys:
So I've been playing around with MySQL lately, and being a long time MSSQL
I'm frequently facing this issue, as an Oracle user, playing around with MySql. Be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.