Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 06-11-2003, 07:55 AM   #1 (permalink)
gwartheg
Registered User
 
gwartheg's Avatar
 
Join Date: Aug 2002
Location: Boston, MA
Posts: 8
gwartheg is on a distinguished road
Send a message via ICQ to gwartheg
mysql auto_increment warning

Hi,

I'm just starting out with MySQL, and I'm trying the following script to load a simple, tab-delimited table into my database:
Code:
DROP TABLE IF EXISTS SEQ;

CREATE TABLE SEQ (
       SEQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
	SEQ VARCHAR (255),
	 CLINICAL VARCHAR (80),
	  CLASS VARCHAR (2),
	   GLOCUS VARCHAR (10),
	    INDEX DISEASE (CLINICAL(10),CLASS),
	     PRIMARY KEY (SEQ_ID)
);

LOAD DATA LOCAL INFILE "~/AMYLOID/autoseq.tmp" INTO TABLE SEQ
     (SEQ, CLINICAL, CLASS, GLOCUS);
It loads the data as expected, but generates a single warning:
Code:
mysql> source setupSEQ.sql;
Query OK, 442 rows affected (0.12 sec)
Records: 442  Deleted: 0  Skipped: 0  Warnings: 1
It's only a warning, and as such, the mysql logs are no help, but it just nags me. If I can ignore this warning, I'd like to understand why. Thanks.
gwartheg is offline   Reply With Quote
Old 06-11-2003, 01:25 PM   #2 (permalink)
gwartheg
Registered User
 
gwartheg's Avatar
 
Join Date: Aug 2002
Location: Boston, MA
Posts: 8
gwartheg is on a distinguished road
Send a message via ICQ to gwartheg
Red face auurgh

Whoops - I should learn to read my book more closely. I only specified a length of 2 for my CLASS field; varchars need an extra byte to store the length. Nevermind.
gwartheg is offline   Reply With Quote
Reply

Bookmarks

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL Views sde PHP 1 05-01-2003 12:06 PM
and on to mysql .. sde Linux / BSD / OS X 2 01-18-2003 07:39 PM
cgi script Henry PHP 25 12-30-2002 06:54 AM


All times are GMT -8. The time now is 11:00 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting