[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql-internals
Subject:    Re: first blob implementation for heap engine
From:       Ingo Strüwing <ingo () mysql ! com>
Date:       2007-04-26 9:25:24
Message-ID: 46307004.3030607 () mysql ! com
[Download RAW message or body]

Hi,

ciccettino@tiscali.it wrote:
...
> I realized a mod of the heap engine to support gis data (via blobs). 

fortunately I found the missing time to get through your patch.

In general your patch takes the right direction IMHO. I will now see
what needs to be done to get an official approval.

Meanwhile please make a small test case that shows what your patch does.
Create a table with blob(s) and/or spatial column(s), insert, select,
update, and delete something. No exhaustive tests for now, but just the
basics.

We did already agree that the storage allocation for blobs needs a
redesign after the patch will be officially accepted so far.

Other (small) things that should be changed after the official
acceptance are the following:

Minor coding style issues.

The function heap_create_with_blobs() should be integrated into
heap_create(). They have big parts in common.

You have some code to handle VARCHAR. I think it can be deleted because
MEMORY tables don't see VARCHAR. An implicit VARCHAR -> CHAR is done
before the engine is hit. however, I'm not 100% sure her. That's one
reason why I want to have tests to see how it behaves.

Also in heap_create_with_blobs() you have the variables pack_reclength,
min_pack_length, and real_reclength, which you set but either don't use
or don't need if I understand correctly.

In heap_update() you can optimize by deallocating and allocate only
blobs that changed.

When the patch will be accepted, we need to check the copyright of
hp_blobs.c.

In hp_alloc_and_write_heap_blobs() you write new_blob_addr back into the
input record, which is declared "const". Why?

In hp_dealloc_heap_blobs_in_rec() you can optimize using a NULL pointer
for empty blobs instead of calculating blob_len IMHO.

Thanks again for your great work.
Regards
Ingo
-- 
Ingo Strüwing, Senior Software Developer
MySQL GmbH, Radlkoferstr. 2, D-81373 München
Geschäftsführer: Kaj Arnö - HRB München 162140


-- 
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe:    http://lists.mysql.com/internals?unsub=mysql-internals@progressive-comp.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic