[Maria-developers] MYSQL_TYPE_DECIMAL type
Hello all, Under what circumstances can a table be created with MYSQL_TYPE_DECIMAL as being one of the columns? I thought MYSQL_TYPE_DECIMAL was deprecated pre 5.1. I thought all new tables use MYSQL_TYPE_NEWDECIMAL. We have a user reporting a table he wants to alter has that type. However, when I create that table, I don't get that type. As an aside, we don't support that type, mainly because I thought it was impossible to have a table created with it (I am apparently wrong). Is there a way to ensure that tables undergoing an alter convert that column to MYSQL_TYPE_NEWDECIMAL? Thanks -Zardosht
Hi, Zardosht! On Apr 26, Zardosht Kasheff wrote:
Hello all,
Under what circumstances can a table be created with MYSQL_TYPE_DECIMAL as being one of the columns? I thought MYSQL_TYPE_DECIMAL was deprecated pre 5.1. I thought all new tables use MYSQL_TYPE_NEWDECIMAL.
I've quickly checked the code and couldn't find a way to create a table with the MYSQL_TYPE_DECIMAL column. There are even asserts in the code that show it's impossible. So, I'm very interested to know how your customer managed to do it :) Please share it, if you'll find it out.
Is there a way to ensure that tables undergoing an alter convert that column to MYSQL_TYPE_NEWDECIMAL?
It's pretty difficult to test, if there's no way to create a table with MYSQL_TYPE_DECIMAL in the first place. Regards, Sergei
I think they had a 5.0 table with the old type, upgraded their system to the new binaries, then did an alter table. Apparently, the alter table preserves the old type, and does not create a table with the new type On Wed, May 8, 2013 at 5:44 AM, Sergei Golubchik <serg@askmonty.org> wrote:
Hi, Zardosht!
On Apr 26, Zardosht Kasheff wrote:
Hello all,
Under what circumstances can a table be created with MYSQL_TYPE_DECIMAL as being one of the columns? I thought MYSQL_TYPE_DECIMAL was deprecated pre 5.1. I thought all new tables use MYSQL_TYPE_NEWDECIMAL.
I've quickly checked the code and couldn't find a way to create a table with the MYSQL_TYPE_DECIMAL column. There are even asserts in the code that show it's impossible.
So, I'm very interested to know how your customer managed to do it :) Please share it, if you'll find it out.
Is there a way to ensure that tables undergoing an alter convert that column to MYSQL_TYPE_NEWDECIMAL?
It's pretty difficult to test, if there's no way to create a table with MYSQL_TYPE_DECIMAL in the first place.
Regards, Sergei
On 08.05.2013 11:44, Sergei Golubchik wrote:
I've quickly checked the code and couldn't find a way to create a table with the MYSQL_TYPE_DECIMAL column. There are even asserts in the code that show it's impossible.
So, I'm very interested to know how your customer managed to do it :) Please share it, if you'll find it out.
pre-5.0 tables can stay around with the older types as this case is not detected or handled by mysql_upgrade, see: http://bugs.mysql.com/bug.php?id=57171 and also the related http://bugs.mysql.com/bug.php?id=57166 http://bugs.mysql.com/bug.php?id=57426 -- Hartmut Holzgraefe <hartmut@skysql.com> Principal Support Engineer (EMEA) SkySQL AB - http://www.skysql.com/
participants (3)
-
Hartmut Holzgraefe
-
Sergei Golubchik
-
Zardosht Kasheff