There's a lot of misinformation and outdated information about MySQL on the
web. It's similar to opinions people write about FoxPro based on something
they heard about FoxBase a decade or two ago, or many Foxer's opinion of
Access :)

It's important to understand the architecture of MySQL, too: MySQL has a
shell that receives message from the outside world: ODBC queries,
commandline commands, other interfaces, does some pre-processing, and hands
the queries off to one of several engines: ISAM is the deprecated engine
responsible for lots of MySQL's bad reputation, MyISAM is a fairly
primitive data store without a lot of relational functionality (like Fox
2.x tables) while InnoDB (oracle) or XtraDB (maria) has a full complement
of relational syntax. There's also a number of other specialized storage
engines, like archive (write-once record into a ZIP-like format),
blackhole, etc.

Depending on different engines (and your configuration), you can see
different results, so it's quite possible field truncation without warning
is/once was true.

Caveat emptor.


On Fri, Dec 14, 2012 at 8:38 AM, Eurico Chagas Filho <[email protected]
> wrote:

> Paul, what version of MySQL u r using for the tests ?
>
> E.
>
>
>
> >________________________________
> > From: Paul McNett <[email protected]>
> >To: [email protected]
> >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 <[email protected]> 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
> >
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
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/cacw6n4snzjpbxheodh0y-mq8htw5wefayyyb0owt+it12ic...@mail.gmail.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.

Reply via email to