Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: DBI mysql truncation best practice?

by nmerriweather (Friar)
on Mar 25, 2006 at 00:10 UTC ( #539122=note: print w/replies, xml ) Need Help??

in reply to DBI mysql truncation best practice?

As stated above, strict mode is the only way for it to happen (mysql 5 only)

<quote>"but both methods involve me doing work that the database should be able to do much better (since it is doing the conversion"</quote> that's why i switched to postgres. mysql4 has no way to stop that from happening, and throws no warnings. mysql5 has the strict mode, but it can be overridden unless you're a beast about security policy on the server ( which is annoying, as mysql starts with a very loose policy, and makes you tighten most every option )

the error messages from mysql are fairly worthless too - they're mostly error codes with a generic descriptor. its impossible to bugfix without googling their online documentation. on the other hand, postgres throws verbose errors with detailed descriptions.

a lot of people love mysql, i used to be one of them. then 3gbs of data got destroyed by truncation, bad foreign key support, and i went crazy trying to decipher the server messages. now i'm in the postgres camp and completely love it.

if you're on mysql4, consider switching to postgres (since you'd have to install a new db anyways). its got a steeper learning curve, but its totally worth it.

as far as the speed differences between the two - unless you're getting slashdotted , you shouldn't really notice anything.
  • Comment on Re: DBI mysql truncation best practice?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://539122]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2018-06-18 06:38 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (109 votes). Check out past polls.