Paul, what version of MySQL u r using for the tests ? E.
>________________________________ > From: Paul McNett <p...@ulmcnett.com> >To: profox@leafe.com >Sent: Thursday, December 13, 2012 9:53 PM >Subject: Re: [NF] PostgreSQL x MySQL > >On 12/13/12 3:03 PM, Stephen Russell wrote: >> On Thu, Dec 13, 2012 at 4:53 PM, Paul McNett <p...@ulmcnett.com> wrote: >> >>> On 12/13/12 9:58 AM, Stephen Russell wrote: >>>> Change a data column on a a production system. Numeric width and make is >>>> smaller. MySQL will not warn you that your existing data may be >>> incorrect. >>>> It will just do it. #FAIL So 100 units will now = 99 units. Wow that >>>> is so wrong. >>> >>> The assumption is that the DBA knows what he or she is doing. Duh, >>> changing the >>> precision of a column could affect the data. >>> ----------------- >> >> >> My point was that the engine didn't warn you about truncating data. It >> just did it. VFP even tells you beforehand. > >Hm. > >mysql> create table test (test decimal (8,3)); >Query OK, 0 rows affected (0.02 sec) > >mysql> insert into test (test) values (8.03); >Query OK, 1 row affected (0.00 sec) > >mysql> select * from test; >+-------+ >| test | >+-------+ >| 8.030 | >+-------+ >1 row in set (0.00 sec) > >mysql> alter table test modify column test decimal(8,2); >Query OK, 1 row affected (0.06 sec) >Records: 1 Duplicates: 0 Warnings: 0 > >mysql> select * from test; >+------+ >| test | >+------+ >| 8.03 | >+------+ >1 row in set (0.01 sec) > >mysql> alter table test modify column test decimal(8,1); >Query OK, 1 row affected, 1 warning (0.04 sec) >Records: 1 Duplicates: 0 Warnings: 1 > >mysql> show warnings; >+-------+------+-------------------------------------------+ >| Level | Code | Message | >+-------+------+-------------------------------------------+ >| Note | 1265 | Data truncated for column 'test' at row 1 | >+-------+------+-------------------------------------------+ >1 row in set (0.00 sec) > >Paul > >_______________________________________________ >Post Messages to: ProFox@leafe.com >Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox >OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech >Searchable Archive: http://leafe.com/archives/search/profox >This message: >http://leafe.com/archives/byMID/profox/50ca6a78.80...@ulmcnett.com >** All postings, unless explicitly stated otherwise, are the opinions of the >author, and do not constitute legal or medical advice. This statement is added >to the messages for those lawyers who are too stupid to see the obvious. > > > --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/1355492295.83529.yahoomail...@web140603.mail.bf1.yahoo.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.