Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

MySQL Version 5, out of range value

Posted on 2006-07-17
3
Medium Priority
?
871 Views
Last Modified: 2009-12-16
Hello Experts!

Are there any option to config MySQL 5 that abort out of range value like MySQL4.1..
e.g. in MySQL4.1 I insert to integer field with value of 18446744073709551551, It replace by 2147483647 of limit (not error).
in MySQL 5, It raise error "Out of range value adjusted for column 'aaa' at row 1"

Thanks in advanced!
0
Comment
Question by:HuyBD
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 35

Accepted Solution

by:
Raynard7 earned 1000 total points
ID: 17120521
There is no setting to do this,

I would not advise washing over errors anyway - however in MySql 5 you now have triggers

BEFORE INSERT ON table_name
or AFTER INSERT ON table_name
or BEFORE UPDATE ON table_name
or AFTER UPDATE ON table_name
or BEFORE DELETE ON table_name
or AFTER DELETE ON table_name

What you can do is Before Insert say if the value is > than the integer limit then insert 2147483647 which would work just as well.
0
 
LVL 8

Assisted Solution

by:Yuval_Shohat
Yuval_Shohat earned 1000 total points
ID: 17120851
if you need those BIG BIG numbers, I would consider using Decimal(X,Y) insted of Integer and bigint...
Keeping that in mind I'd sugget reading:
http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html
read it to the end, there is some refrance as to how mysql behaves in different modes.

-=Yuval=-
0
 
LVL 17

Author Comment

by:HuyBD
ID: 17127757
Thank both of you!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question