Hi Øystein,
Sorry for delay witht this. I was on vacation and
then busy with some other tasks.
I committed a new patch today:
http://lists.mysql.com/commits/76713
Comparing to the previous version it includes these changes:
- Renamed val_ascii() to val_str_ascii(), to avoid confusing
than we're ading a new datatype "ascii".
- Added comments about val_str_ascii() - why we need it
(almost cut-and-parse from our previous e-mails)
- Introduced a new method fix_charset()
which works according to your suggestion:
- "decimals" is now not touched by any new methods.
(set_char_length_and_dec did in the previous version)
> modify max_length accordingly if mbmaxlen for new charset is
> different from mbmaxlen for old charset?
Please have a look into the new version.
Note, there are now a lot of pieces of code like this:
max_length= 6;
fix_charset();
I still suggest to introduce a new method:
fix_length_and_charset(6);
which will set both length and charset in the simple cases like this.
I.e. the same action what set_char_length() did in the previous version,
but with a better name :)
Thanks!