Trailing spaces removal configurable for char and char binary data type in MySQL V5

------=_NextPart_000_0024_01C5B452.637F4410
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


To whom it concerns

I've been using MySQL V5.0.X for the last 4 months, integrating our =
application with MySQL. Til now we have been using ORACLE and DB2 and we =
want to have the chance to offer to our clients the possiblity to use =
MySQL. We almost have the application migrated entirely to MySQL, but we =
have the problem that I'll explain on the next lines.

The MySQL manual indicates that char (binary) and varchar (binary) =
always remove trailing spaces.
For some applicati=F3n the lost of this information could be =
important.
I think that this functionality could be configurable on the server, =
maybe through a sql-mode option, like NO_BACKSLSH_SCAPE, o something =
like that.

I know that TEXT data type returns the trailing space, but the =
problem is that this data type doesn't control the maximun of bytes to =
be introduced.

I also know that there is an option at ODBC Connector (PAD CHAR TO =
FULL LENGTH), but these option doesn't avoid the concatenation of char =
field in a SQL sentences remove the trailing spaces before the =
concatenation.

For example ORACLE and DB2, always returns the trailing space for =
the char data type.

In my opinion having the option for trailing spaces removal or not =
configurable (maybe through a sql-mode) could be a good improvement.

Thanks in advance for your attention

Waiting to hear from you soon

Angel Martin
Software Developer
IC Software S.L.
angelmartin [at] icsoftware.es
Spain
+34 934097558

------=_NextPart_000_0024_01C5B452.637F4410--
Angel Martin [ Do, 08 September 2005 08:50 ] [ ID #957614 ]

Re: Trailing spaces removal configurable for char and char binarydata type in MySQL V5

At 8:50 +0200 9/8/05, Angel Martin wrote:
> To whom it concerns
>
> I've been using MySQL V5.0.X for the last 4 months, integrating
>our application with MySQL. Til now we have been using ORACLE and
>DB2 and we want to have the chance to offer to our clients the
>possiblity to use MySQL. We almost have the application migrated
>entirely to MySQL, but we have the problem that I'll explain on the
>next lines.
>
> The MySQL manual indicates that char (binary) and varchar
>(binary) always remove trailing spaces.

From MySQL 5.0.3 and up VARCHAR and VARBINARY do not remove trailing
spaces.

--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32 [at] m.gmane.org
Paul DuBois [ Do, 08 September 2005 14:05 ] [ ID #957617 ]
Datenbanken » gmane.comp.db.mysql.windows » Trailing spaces removal configurable for char and char binary data type in MySQL V5

Vorheriges Thema: MySQL Crash Diagnosis
Nächstes Thema: Full Text Indexes