List:Internals« Previous MessageNext Message »
From:Stewart Smith Date:July 18 2007 3:15am
Subject:Re: IPV6 data type patch
View as plain text  
On Tue, 2007-07-17 at 16:05 +0200, Milos Prodanovic wrote:
> I've considered network data types as blob or as a string.

Certainly blob makes more sense. Much more space efficient.

> IPv4 address 192.168.1.1 is internally stored as 4xbyte (or uin32)
> char *ptr="\192\168\1\1"
> and IPv6 address aabb:ccdd:dead:beef:1234:4321:a1b2:c3d4 is internally
> stored as 16xbyte
> char *ptr="\xaa\xbb\xcc\xdd\xde\xad\xbe\xef\12\x34\x43\x21\xa1\xb2\xc3\xd4";
> 
> Data type uses STRING_RESULT as result type, and where charset is needed for
> some function, my_charset_bin is used.

Also check behaviour with multibyte character sets and all that... good
way to get a headache and bugs...

> To be able to do my GSoC project and In order to better understand how
> things are done in MySQL I've tried to find and understand code on
> each place that string type or blob type is questioned in the mysql
> code. I've tried to understand what the code is 'doing' and what was
> decision based on mysql type (what are consequences).

great! (this certainly takes time)

> That doesn't mean that I've grasped correctly all occurrences
> correctly, but I can
> post my report file where I've wrote what files was under examination, and what
> I've decided when I was rendering MySQL code. Reports are like "should
> I change it , or should it stay the way it is, and why I've done this
> way". I didn't want to
> put lot of comments on places that I've just inserted "case MYSQL_TYPE_IPV6",
> so I've stored comments in separate file.
> 
> I will try to get closer look on NDBAPI.

I'm not sure I'd spend too much time on it.. but maybe just getting a
bit of an introduction to NDB would be enough... I have a video up on
Google Video
(http://video.google.com.au/url?docid=-4567104036778249401&esrc=sr1&ev=v&q=MySQL%2BCluster&srcurl=http%3A%2F%2Fvideo.google.com.au%2Fvideoplay%3Fdocid%3D-4567104036778249401&vidurl=%2Fvideoplay%3Fdocid%3D-4567104036778249401%26q%3DMySQL%2BCluster%26total%3D7%26start%3D0%26num%3D10%26so%3D0%26type%3Dsearch%26plindex%3D0&usg=AL29H21FpJvqb9Cp4ywSEkCux-aYBhFFlg)

err.. great... just search on google video for "MySQL Cluster".

NDBAPI and a broader understanding of NDB can take a while.


> It would be nice to make some functionality tests, and I'm not sure
> that I can make
> tests of all possible 'use cases', but I'm glad to do tests if you
> have some crucial test
> that could show usability.

i don't have any magic solution for the testing of this with NDB endian
compatibility.


but general testing can be started with mysql-test-run scripts (see
mysql-test/t/*test files)...
-- 
Stewart Smith, Senior Software Engineer
MySQL AB, www.mysql.com
Office: +14082136540 Ext: 6616
VoIP: 6616@stripped
Mobile: +61 4 3 8844 332

Jumpstart your cluster:
http://www.mysql.com/consulting/packaged/cluster.html

Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
Attachment: [application/pgp-signature]
Thread
IPV6 data type patchMilos Prodanovic16 Jul
  • Re: IPV6 data type patchStewart Smith16 Jul
    • Re: IPV6 data type patchDavid Li16 Jul
      • Re: IPV6 data type patchMilos Prodanovic17 Jul
        • Re: IPV6 data type patchStewart Smith18 Jul
        • Re: IPV6 data type patchChad MILLER27 Jul
          • Re: IPV6 data type patchMilos Prodanovic27 Jul