List:Internals« Previous MessageNext Message »
From:Sergei Golubchik Date:July 23 2009 7:34pm
Subject:Re: GSoC Week 11 - I_S/P_S storage engine
View as plain text  
Hi, scut_tang!

On Jul 23, scut_tang wrote:
> Hi, Sergei
> 
> >> KEY CONCERNS
> >> ============
> >> 1. In infoschema_discover, I take all fields whose type are
> >> MYSQL_TYPE_STRING into Field_varstring and no Field_blob, regardless
> >> of field's lengh. Is it any problem?
> >
> >Yes, I think.
> >blobs may be needed for certain very long fields.
> >Why did you disable them - any particular problem you had with blobs ?
> Yes. you can check it by - cancel comment in infoschema_dicover():
> switch(fileds_info->field_type)
> {
>     case MYSQL_TYPE_STRING:
>     if(field_length > MAX_FIELD_VARCHARLENGTH)
>     {
>         new_field = new Field_blob(field_length, maybe_null,
> fields_info->field_name, cs);
>     }
> and SELECT * FROM INFOSCHEMA.PLUGINS occurs errors. something cross the border.
> If I replace Field_blob by Field_varstring. It works.

you forgot to set share->blob_ptr_size, and because it was 0 here:

  reclength += new_field->row_pack_length() + share->blob_ptr_size;

you calculated record length and the next field offset incorrectly. When
you were storing data in the next (after the blob) field it was
overwriting your blob data.
 
> Another question: 
> Add "#define MYSQL_SERVER 1" in source file, and THD *thd->something works.
> But there are lots of others thing couldn't, like GRANT_TABLE, GRANT_COLUMN.
> mysql_priv.h does not contain their definition.
> So I can't do something like GRANT_TABLE *gtable directly in source file. I do it in
> this way:
> Add some functions connected with GRANT_TABLE in sql_acl.cc.
> There are lots of this function in sql_acl.cc:
> char *get_grant_table_user(GRANT_TABLE *gtable)
> {
>     return gtable->user;
> }
> You can check it in the new branch code.

No, I can not. I said you many times - fix the formatting, especially
the indentation. After a few futile reminders I told you that I won't
review your code anymore until the indentation is fixed.

Sorry, I cannot review your code now.

Regards / Mit vielen Grüßen,
Sergei

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <serg@stripped>
 / /|_/ / // /\ \/ /_/ / /__  Principal Software Engineer/Server Architect
/_/  /_/\_, /___/\___\_\___/  Sun Microsystems GmbH, HRB München 161028
       <___/                  Sonnenallee 1, 85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Häring
Thread
Re: GSoC Week 11 - I_S/P_S storage engineSergei Golubchik24 Jul