Description:
his test is realized in V50(V5.1.2 drop14) and in V51(V5.1.12_beta)
in both delivery test is not-satisfactory
test log file of following actions is linked as res.txt file
-Create a database with a shema which contain a vchar column of type CHAR(255)
-populate database
shema table is createtable.sql linked file
source of population is basic-type-popul.cpp linked file
-reading vchar population is OK
source of read is basic-read-read.cpp linked file
read result is readres1.txt
-alter table of vchar to VARCHAR(255)
altering seems OK
altering command is :
/usr/mysql/bin/mysql -D hlr -e "alter table IMSI modify vchar varchar(255);"
see test test linked shell file : run
-reading again vchar population with VARCHAR type is KO
source of read is basic-read-read.cpp linked file
read result is readres2.txt
altering is OK but reading of vchar value is false because
!!! size is forced by mysql alter function to 255 !!!
(maybe alter table command needs to specify "endOfString character" to be able to set real size value)
(Alcatel uses '00' or '\0')
-update of altered column is OK
source of population is basic-type-update-newColumn.cpp linked file
-reading updated vchar population is OK
source of read is basic-read-read.cpp linked file
read result is readres3.txt
How to repeat:
create a cluster
create a shema with a char(255) column
set a value to this column with EndOfString char '\0' (ex : 'FRENCH-CHEESE''\0')
read value
alter table this column to varchar(255)
read column size = 255 insteed 13
Suggested fix:
read content of string before altering table from CHAR to varchar : position of first '\0' char is size of column