insert not working with auto_increment column

2006-06-13 Thread Digvijoy Chatterjee

I have a problem with inserting data into table in Mysql.

I have a Auto_increment Column in Table which throws errors when I try
to insert into the table.

This is table description.
mysql desc SalesSupData;

+-+-+--+-+-++

| Field   | Type| Null | Key | Default | Extra   |

+-+-+--+-+-++

| SSId| int(11) | NO   | PRI | NULL| auto_increment |

| ClientId| int(5)  | YES  |   | NULL  |   |

| SupTypeId   | int(5)  | YES  || NULL   | |

| Description | text| YES  | | NULL||

| UserId  | int(5)  | YES  |   | NULL   | |

+-+-+--+-+-++

This is the error I get when I try to insert using single quotes ''

mysql insert into SalesSupData values ('',2,2,'test',140);

ERROR 1264 (22003): Out of range value adjusted for column 'SSId' at row 1

Without using quotes.

mysql insert into SalesSupData values (2,2,'test',140);

ERROR 1136 (21S01): Column count doesn't match value count at row 1

My Application was running fine with mysql-4 ,i recently upgraded to
5 ,and all my insert queries are bombing.Can anyone help me fix this.

Regards
Digz

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: insert not working with auto_increment column

2006-06-13 Thread Digvijoy Chatterjee

On 6/13/06, Rob Desbois [EMAIL PROTECTED] wrote:

If you are going to specify values for all columns in your insert, you should 
put NULL as the value for an AUTO_INCREMENT column, e.g.
mysql insert into SalesSupData values (NULL,2,2,'test',140);

My preferred way however is to put the column names and just miss out the 
auto_increment column:
mysql insert into SalesSupData(ClientId, SupTypeId, Description, UserId) 
values (2,2,'test',140);

--Rob


That works
thanks
Digz

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



case sensitive table names in mysql-5.0.21

2006-05-30 Thread Digvijoy Chatterjee

Hello,

I am using MySql-5.0.21 on Suse-Linux-10, i created tables using
lowercase names
for example ;
mysql create table a (id int);
Query OK, 0 rows affected (0.04 sec)

mysql select * from A;
ERROR 1146 (42S02): Table 'mysql.A' doesn't exist
mysql select * from a;
Empty set (0.01 sec)

I have upgraded from mysql-4.0.17 to 5.0.21 ,and all the ANSI-SQL
queries from my application using UPPERCASE table names are bombing, i
immediately had to stop 5.0.21 and restart mysql-4.0.17.
Is there any way to get around this problem and have a smooth upgrade.

Regards
Digz

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: case sensitive table names in mysql-5.0.21

2006-05-30 Thread Digvijoy Chatterjee

Hello,

I am using MySql-5.0.21 on Suse-Linux-10, i created tables using
lowercase names
for example ;
mysql create table a (id int);
Query OK, 0 rows affected (0.04 sec)

mysql select * from A;
ERROR 1146 (42S02): Table 'mysql.A' doesn't exist
mysql select * from a;
Empty set (0.01 sec)

I have upgraded from mysql-4.0.17 to 5.0.21 ,and all the ANSI-SQL
queries from my application using UPPERCASE table names are bombing, i
immediately had to stop 5.0.21 and restart mysql-4.0.17.
Is there any way to get around this problem and have a smooth upgrade.

Regards
Digz


The previous version of the App was on Windows(mysql-4.0.17) .this
ones on Linux .Does that make a difference ?

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



no 3306 but mysqld running

2005-06-07 Thread Digvijoy Chatterjee

can somebody explain the events below:

mysql is running but its not listening on 3306,...as a result clients on remote 
machines are not able to connect..

The server name is spiti


confirm that mysqld is running:
[EMAIL PROTECTED] ~]$ ps -ef |grep [m]ysql
root 31515 1  0 15:30 pts/300:00:00 /bin/sh ./mysqld_safe 
--user=mysql
mysql31535 31515  0 15:30 pts/300:00:00 /usr/local/mysql/libexec/mysqld 
--basedir=/usr/local/mysql --datadir=/usr/mysql --user=mysql 
--pid-file=/usr/mysql/spiti.ad.infosys.com.pid --skip-locking 
--socket=/var/lib/mysql/mysql.sock
root 31683 28153  0 15:49 pts/000:00:00 mysql -u root -p



running nmap to see open ports
[EMAIL PROTECTED] ~]$ nmap localhost

 
Starting nmap 3.70 ( http://www.insecure.org/nmap/ ) at 2005-06-07 15:55 EDT
Interesting ports on localhost.localdomain (127.0.0.1):
(The 1655 ports scanned but not shown below are in state: closed)
PORT  STATE SERVICE
22/tcpopen  ssh
25/tcpopen  smtp
80/tcpopen  http
443/tcp   open  https
1/tcp open  snet-sensor-mgmt

 
Nmap run completed -- 1 IP address (1 host up) scanned in 0.179 seconds


trying telnet from the server:

[EMAIL PROTECTED] ~]$ telnet localhost 3306
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host: Connection refused

trying to connect from remote client:

[EMAIL PROTECTED] digz]$ mysql -h 172.25.243.145 -u root -p mysql
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on '172.25.243.145' (111)

successfull connection from server:

[EMAIL PROTECTED] ~]$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13 to server version: 4.1.9

 
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

 
mysql




TIA
digz



 



*** CAUTION - Disclaimer ** This e-mail 
contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of 
the addressee(s). If you are not the intended recipient, please notify the 
sender by e-mail and delete the original message. Further, you are not to copy, 
disclose, or distribute this e-mail or its contents to any other person and any 
such actions are unlawful. This e-mail may contain viruses. Infosys has taken 
every reasonable precaution to minimize this risk, but is not liable for any 
damage you may sustain as a result of any virus in this e-mail. You should 
carry out your own virus checks before opening the e-mail or attachment. 
Infosys reserves the right to monitor and review the content of all messages 
sent to or from this e-mail address. Messages sent to or from this e-mail 
address may be stored on the Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***

Re: no 3306 but mysqld running

2005-06-07 Thread Digvijoy Chatterjee

You hit the nail on the head Irek,thanks  the problem was skip
networking was on.

Regards
Digz

On Tue, 2005-06-07 at 17:34, Irek Słonina wrote:
 Digvijoy Chatterjee wrote:
  can somebody explain the events below:
 
  mysql is running but its not listening on 3306,...as a result clients
 on remote
  machines are not able to connect..
 

 by default in PLD the 'skip-networking' option is turned on in
 mysqld.conf, maybe you have the same option in your mysql config.

 regards,
 Irek Słonina
Aut disce Aut Discede Aut Vincere Aut Mori
Either learn or leave Either conquer or die
[EMAIL PROTECTED]
#4043


*** CAUTION - Disclaimer ** This e-mail 
contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of 
the addressee(s). If you are not the intended recipient, please notify the 
sender by e-mail and delete the original message. Further, you are not to copy, 
disclose, or distribute this e-mail or its contents to any other person and any 
such actions are unlawful. This e-mail may contain viruses. Infosys has taken 
every reasonable precaution to minimize this risk, but is not liable for any 
damage you may sustain as a result of any virus in this e-mail. You should 
carry out your own virus checks before opening the e-mail or attachment. 
Infosys reserves the right to monitor and review the content of all messages 
sent to or from this e-mail address. Messages sent to or from this e-mail 
address may be stored on the Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



noob question

2005-06-06 Thread Digvijoy Chatterjee

How do i explicilty create an innodb table ?

I tried searching thro Manual...but did not get anything important in the 
create t

table section.

Thanks
DIgz


*** CAUTION - Disclaimer ** This e-mail 
contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of 
the addressee(s). If you are not the intended recipient, please notify the 
sender by e-mail and delete the original message. Further, you are not to copy, 
disclose, or distribute this e-mail or its contents to any other person and any 
such actions are unlawful. This e-mail may contain viruses. Infosys has taken 
every reasonable precaution to minimize this risk, but is not liable for any 
damage you may sustain as a result of any virus in this e-mail. You should 
carry out your own virus checks before opening the e-mail or attachment. 
Infosys reserves the right to monitor and review the content of all messages 
sent to or from this e-mail address. Messages sent to or from this e-mail 
address may be stored on the Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: noob question

2005-06-06 Thread Digvijoy Chatterjee

Thank You for the quick reply , now i wanted to create INNoDb table such
that i could rollback my changes ,but here i am  as I issue a rollback
command ; nothing happens...is there some thing like autocommit on...or
rather how do i alter standard settings of mysql client...

MY MAIN QUESTION is : HOW DO I COMMIT AND ROLLBACK

Thanks and Regards
Digz

On Mon, 2005-06-06 at 19:39, Digvijoy Chatterjee wrote:
 How do i explicilty create an innodb table ?
 
 I tried searching thro Manual...but did not get anything important in the 
 create t
 
 table section.
 
 Thanks
 DIgz
 
 
 *** CAUTION - Disclaimer ** This e-mail 
 contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use 
 of the addressee(s). If you are not the intended recipient, please notify the 
 sender by e-mail and delete the original message. Further, you are not to 
 copy, disclose, or distribute this e-mail or its contents to any other person 
 and any such actions are unlawful. This e-mail may contain viruses. Infosys 
 has taken every reasonable precaution to minimize this risk, but is not 
 liable for any damage you may sustain as a result of any virus in this 
 e-mail. You should carry out your own virus checks before opening the e-mail 
 or attachment. Infosys reserves the right to monitor and review the content 
 of all messages sent to or from this e-mail address. Messages sent to or from 
 this e-mail address may be stored on the Infosys e-mail system.
 ***INFOSYS End of Disclaimer INFOSYS***
Aut disce Aut Discede Aut Vincere Aut Mori 
Either learn or leave Either conquer or die
[EMAIL PROTECTED]
#4043


*** CAUTION - Disclaimer ** This e-mail 
contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of 
the addressee(s). If you are not the intended recipient, please notify the 
sender by e-mail and delete the original message. Further, you are not to copy, 
disclose, or distribute this e-mail or its contents to any other person and any 
such actions are unlawful. This e-mail may contain viruses. Infosys has taken 
every reasonable precaution to minimize this risk, but is not liable for any 
damage you may sustain as a result of any virus in this e-mail. You should 
carry out your own virus checks before opening the e-mail or attachment. 
Infosys reserves the right to monitor and review the content of all messages 
sent to or from this e-mail address. Messages sent to or from this e-mail 
address may be stored on the Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



data directory for mysql

2005-06-05 Thread Digvijoy Chatterjee
Hi all,

I have been using /var/mysql/data as my data directory till now ,
suddenly i realise its all filled up with some 20M left which will
finish in a day or two , repartioning my disks is not an option , what
do i do to restart mysql with a new data directory say
/usr/local/mysql/data/: changing the file my.cnf is not helping in my
case, the data is going to the same directory again and not the one i
specified in my.cnf

TIA


Aut disce Aut Discede Aut Vincere Aut Mori 
Either learn or leave Either conquer or die
Digz



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: query help?

2005-06-01 Thread Digvijoy Chatterjee
Hello all,
My question  is if unix Epoch time started on January 1st 1970 ,and mysql uses 
the same implementation of time , what is the logic mysql developers have 
used to offset it by 30 odd years that is the max date for mysql is 2068 and 
not 2038 18th January, i work in a Financial services firm where its 
important to calculate mortgages beyond 2038 , Linux and Windows are caught 
in trouble ,rather my more general question is what effect does The Y-2038 
bug have on MySQL

Any sort of pointers will help

TIA
digz


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Mysql installation information

2005-04-01 Thread Digvijoy Chatterjee
download the source tar ball and
try installing mysql from the source the configure script does it all 
you , u dont need to worry,
for custom compilation use ./configure --help

Regards
Digvijoy Chatterjee
Suryya Ghosh wrote:
Hi,
I have gone through the sites which you have recomended where it is suggested that the exact version depends on the requirement and the hardware.
   
According to our hardware  software specification which is given below, I think we should use (Linux (x86, glibc-2.2, static, gcc),Standard 4.1.10a )  version of  mysql server.

I have no previous experience regarding installing mysql so it will be a great 
help if  let me know your openion about it.
Can you please review the URL http://dev.mysql.com/downloads/mysql/4.1.html and 
recomend the exact version which will go best with the server.
Server Configuration
-
Server:  Dual Xeon 2.8 GHz ( X86,32 bit,533MHz FSB,512KB L2 cache)
Primary HDD:  73 GB SCSI
RAM:  ECC Registered 1024MB RAM
Bandwidth:  2000 GB Bandwidth
Uplink Port Speed:  100 Mbps Uplink
Operating System:  Red Hat Enterprise Linux, Version 3 (recommended)
Drive Controller:  SCSI
Chassis Control:  DRAC Card
With Regards,
Suryya
 


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


how to rollback in MySql?

2005-03-23 Thread Digvijoy Chatterjee
Hi All,

I have just started using My-sql 4.1.9 mysql  Ver 14.7 Distrib 4.1.9,
for pc-linux-gnu (i686)

Is there a way I could rollback  my changes , i tried to go through the
documentation but it wasn't of much help.

regards
Digvijoy


problems with NULL

2005-03-16 Thread Digvijoy Chatterjee
 
 
 
 Consider this:
 
 v_age, v_name, v_eno are 3 variables.
 
 
 Exec sql Select age into :v_age from temp where name = :v_name and eno
 = :v_eno;
 
 Suppose: 
 v_name =rama 
 v_eno = NULL
 
 
 Table: temp
 
 Suppose the values in my table are, 
 Name = rama 
 Eno = NULL 
 Age = 23
 
 
 The prob is it does not retrieve 23 from the table. 
 The prob is I cannot give eno is NULL as I dont know (in practice)
 whether the field will be NULL.
 
 Digvijoy Chatterjee


How do I move the Mysql database files from /var/lib/mysql to someother directory

2005-03-07 Thread digvijoy chatterjee
I have Mysql 4.1.9 on RHES-3.0 installed by rpms..the default socket
path and database creation directory is /var/lib/mysqlnow there is a
a dearth of space in /var therefore i would like to move the database
files to something like /usr which has lots of free space , creating
Symlinks does not seem to help.what is the way out
--Digvijoy