List:Commits« Previous MessageNext Message »
From:Øystein Grøvlen Date:August 21 2009 3:35pm
Subject:Re: WL#2649
View as plain text  
Alexander Barkov wrote:
>   Hello Øystein,
> 
> 
> Please find a new version of WL#2649 patch here:
> 
>   http://lists.mysql.com/commits/81141
> 
> I fully rewrote it since the previous version,
> and it is much smaller now.

Great.  I will look at it next week.

Have a nice week-end,

--
Øystein


> 
> The new code change patch (i.e. without tests) is
> 98Kb in size and touches 20 source files
> vs the old version which was
> 170 Kb and modified 29 files.
> 
> 
> What was changed since the previous version:
> 
> 
> DIFFERENCE 1
> ============
> Now I don't force Items to return @@character_set_connection
> in many cases.
> 
> For example:
> 
> - Numeric constants: Item_int, Item_decimal, Item_float
> - Real, Integer and boolean functions, numeric operators
>   (like +, -, *, /) and others.
> - DECIMAL, DATE, TIME, DATETIME type cast
> 
> don't return @@character_set_connection.
> They return latin1 instead. This allowed to stay
> in 8-bit implementation without having to rewrite
> items to support multi-byte character sets results (e.g. UCS2).
> Basically the change for these items is to use latin1 instead
> of my_charset_bin.
> 
> 
> DIFFERENCE 2
> ============
> According to the WL description, string functions
> with numeric input must return a string using
> @@character_set_connection.
> 
> For example:
> 
>   SET character_set_connection=ucs2;
>   CREATE TABLE t1 AS SELECT concat(1); -- must create an UCS2 column
> 
> To make this work, I fixed all string functions
> to make a special step when aggregating arguments:
> 
> if ALL arguments are non-string (numeric, date/time types),
> then the string functions force conversion of the arguments to
> @@character_set_connection.
> 
> For example:
> 
>   SET character_set_connection=ucs2;
>   CREATE TABLE t1 AS SELECT concat(1, 2, 3);
> 
> will actually work as:
> 
>   SET character_set_connection=ucs2;
>   CREATE TABLE t1 AS SELECT
>   concat(
>     CONVERT(1 USING ucs2),
>     CONVERT(2 USING ucs2)
>     CONVERT(3 USING ucs2));
> 
> 
> 
>  From the user point of view
> ===========================
> The previous version and the new version look the same for users.
> 
> - Various CREATE TABLE involving number-to-string conversion
>   create exactly the same results.
> 
> - User will see exactly the same metadata on the client side,
>   because results are converted to @@character_set_results anyway.
> 
> 
> 
> Can you please review the new version?
> 
> Thank you very much.
> 
> 


-- 
Øystein Grøvlen, Senior Staff Engineer
Sun Microsystems, Database Group
Trondheim, Norway
Thread
bzr commit into mysql-6.0 branch (bar:2701) WL#2649Alexander Barkov4 Mar
  • Re: bzr commit into mysql-6.0 branch (bar:2701) WL#2649Øystein Grøvlen24 Apr
    • Re: bzr commit into mysql-6.0 branch (bar:2701) WL#2649Alexander Barkov29 Apr
      • Re: bzr commit into mysql-6.0 branch (bar:2701) WL#2649Øystein Grøvlen5 May
        • WL#2649Alexander Barkov19 Jun
          • Re: WL#2649Øystein Grøvlen25 Jun
            • Re: WL#2649Alexander Barkov25 Jun
              • Re: WL#2649Øystein Grøvlen25 Jun
                • Re: WL#2649Peter Gulutzan29 Jun
                  • Re: WL#2649Øystein Grøvlen1 Jul
                    • Re: WL#2649Peter Gulutzan2 Jul
                      • Re: WL#2649Øystein Grøvlen3 Jul
                        • Re: WL#2649Peter Gulutzan15 Jul
                        • Re: WL#2649Alexander Barkov20 Aug
                        • Re: WL#2649Alexander Barkov20 Aug
                          • Re: WL#2649Øystein Grøvlen21 Aug
    • Re: bzr commit into mysql-6.0 branch (bar:2701) WL#2649Alexander Barkov5 May
      • Re: bzr commit into mysql-6.0 branch (bar:2701) WL#2649Alexander Barkov5 May
        • Re: bzr commit into mysql-6.0 branch (bar:2701) WL#2649Øystein Grøvlen6 May
      • Re: bzr commit into mysql-6.0 branch (bar:2701) WL#2649Øystein Grøvlen6 May