Unix Technical Forum

Table definitions not accepting data as defined...

This is a discussion on Table definitions not accepting data as defined... within the MySQL General forum forums, part of the MySQL category; --> OK - this has me TOTALLY stumped. I am running into cases where table definitions are somehow not working. ...


Go Back   Unix Technical Forum > Database Server Software > MySQL > MySQL General forum

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 06:46 AM
Mike Morton
 
Posts: n/a
Default Table definitions not accepting data as defined...

OK - this has me TOTALLY stumped. I am running into cases where table
definitions are somehow not working.

I have a variable in a table defined:
price decimal(5,2)

Recently we moved servers, all of a sudden, this definition seems to read
that the TOTAL length of that field is 5, not the pre-decimal place!
Meaning, I get only a definition of 3,2!

I thought this was an isolated incident, some quirk of the server move, and
just increased the decimal definition and went on with life, however a more
serious "bug" of some sort has popped up.

I have a variable definition of:
large_title varchar(50)

That field however, will accept ONLY 36 characters, no more. I have
eliminated the possibility of the bug being in the code, and have run all
the integrity checks on the database - no problems there. The ONLY thing
that I can see that could possibly affect this is that the Collation for the
fields is latin1_swedish_ci - but that was the same on the old server to.
This has only been occuring on the new server. The new server is running
MYSQL 5.0.22, wheras the old server was V 4.something.

Is there some nuance of the Collation that I am missing that would cause a
50 character definition to only accept 36? Some sort of massive DB failure
happening that I should be checking on? Am I just seeing things? Has
anyone else run into this, and does anyone have any suggestions to fix this?

I have tried editing the field (through phpMyAdmin) to force the 50
characters, in case there was some weird thing happening where the
characters defined was messed up or something - but no luck. My worry is
that it is a symptom of a wider failure that I need to be aware of.

Any help is mucho appreciated. The table definition for the latest table
affected with this: (note - I have already changed that "large_title" field
to 75 chars to accommodate the customers need for the 50 characters here -
this is provided in case I missed something about the table that is
important...)

CREATE TABLE `email_updates` (
`id` int(10) unsigned NOT NULL auto_increment,
`month` char(2) default NULL,
`year` varchar(4) default NULL,
`large_title` varchar(75) NOT NULL,
`small_title` varchar(30) NOT NULL default '',
`image_1` varchar(50) default NULL,
`image_1_caption` varchar(100) default NULL,
`image_2` varchar(50) default NULL,
`image_2_caption` varchar(100) default NULL,
`english` text,
`spanish` text,
`active` char(1) default 'n',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7096 ;



--
Cheers

Mike Morton

************************************************** **
*
* Tel: 905-465-1263
* Email: mike@webtraxx.com
*
************************************************** **



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:07 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com