Hi, This behaviour is normal. As long as you have varchar, blob or text field, the row format used is "dynamic", and so char are converted to varchar type. If you want to convert you all your varchar to char, just execute ALTER TABLE your_table ROW_FORMAT=fixed Take a look at : http://www.mysql.com/doc/D/y/Dynamic_format.html http://www.mysql.com/doc/S/t/Static_format.html Jocelyn Fournier Presence-PC ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, August 19, 2001 12:23 AM Subject: CHAR transformed to VARCHAR in CREATE TABLE > >Description: > In a CREATE TABLE statement, if coexists CHAR data > and VARCHAR data, the CHAR data is "promoted" to VARCHAR. > >How-To-Repeat: > CREATE DATABASE bug_3_23_41; > > USE bug_3_23_41; > > CREATE TABLE charAccepted ( > Id int (10) unsigned NOT NULL auto_increment, > SID char(32) NOT NULL, > PRIMARY KEY (Id), > UNIQUE SID (SID) > ); > > CREATE TABLE charTransformedToVarchar ( > sessionId int (10) unsigned NOT NULL auto_increment, > SID char(32) NOT NULL, > remoteAddr varchar (23), > PRIMARY KEY (sessionId), > UNIQUE SID (SID) > ); > >Fix: > > > >Submitter-Id: <submitter ID> > >Originator: Roberto Bertolusso > >Organization: > > >MySQL support: none > >Synopsis: CHAR transformed to VARCHAR in CREATE TABLE > >Severity: serious > >Priority: > >Category: mysql > >Class: > >Release: mysql-3.23.41 (Source distribution) > > >Environment: > > System: Linux pluton.rbsoft 2.4.7 #2 Tue Jul 31 16:25:07 ART 2001 i686 unknown > Architecture: i686 > > Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc > GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs > gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81) > Compilation info: CC='gcc' CFLAGS='' CXX='c++' CXXFLAGS='' LDFLAGS='' > LIBC: > lrwxrwxrwx 1 root root 13 May 11 15:27 /lib/libc.so.6 -> libc-2.2.2.so > -rwxr-xr-x 1 root root 1236396 Apr 6 18:58 /lib/libc-2.2.2.so > -rw-r--r-- 1 root root 26350254 Apr 6 16:27 /usr/lib/libc.a > -rw-r--r-- 1 root root 178 Apr 6 16:27 /usr/lib/libc.so > Configure command: ./configure --prefix=/opt/web/mysql --localstatedir=/sql/mysql --with-mysql d-user=mysql > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: CHAR transformed to VARCHAR in CREATE TABLE
Fournier Jocelyn [Presence-PC] Sat, 18 Aug 2001 15:14:15 -0700
- CHAR transformed to VARCHAR in CREATE TABLE rb
- Fournier Jocelyn [Presence-PC]