List:Summer of Code« Previous MessageNext Message »
From:Sergei Golubchik Date:May 25 2009 9:39am
Subject:Re: GSoC Week 3 - I_S/P_S storage engine
View as plain text  
Hi, scut_tang!

On May 25, scut_tang wrote:
> 
> KEY ACCOMPLISHMENTS LAST WEEK
> =============================
> Browse sql_show.cc and sql_base.cc source code, and know more the process of I_S.

good
 
> KEY GOOD VIBRATIONS
> ===================
> More clear about the current implementation of I_S. 
> Like user performs "SELECT * FROM INFORMATION_SCHEMA", the process is:
> get_all_tables -> open_normal_and_derived_tables -> open_tables ->
> mysql_schema_table -> create_schema_table 
> ->create_tmp_table ->get_new_handler (reach the storage engine level)
> ->schema_table_store_record -> ha_write_row 
> ->issue storage engine write operation (almost heap).
> The more detail is omitted here. Is there necessary to write the detail into I_S
> WIKI? 

yes, please. I'll help to keep the task description more clear.
 
> KEY CONCERNS
> ============
> 1. What does TALBLE_LIST store? May be used to pass I_S tables
> information? And What is the relationship between TABLE_LIST and
> TABLE_SHARE?

TABLE_LIST is for table information that comes from the parser. When a
parser sees a table, for example, in SELECT * FROM t1, it creates a
TABLE_LIST instance for 't1'.

Depends on what information you want to pass.

run-time table information is in the TABLE class.
If you write, say, SELECT * FROM t1, t1 as t2, there will be *two* TABLE
instances for t1, because t1 is used twice in a query. There could be
more than two, if t1 is also used by other threads. TABLE objects aren't
shared between threads. But t1's metadata (number and types of columns,
indexes, default values, etc) are the same instances of t1's TABLE, they
are not duplicated, but stored in a shared TABLE_SHARE object. 

TABLE_SHARE and TABLE correspond to an open table, they contain the
information as it was read from the .frm file.

> 2. What do devired tables mean?

The official name is "subquery in the FROM clause". In

  SELECT a+1 FROM (SELECT * FROM t1 WHERE b>5) as dt

the "table" dt is "derived table".

> 3. Are all I_S tables created when user performs select statment about
> just one of tables of I_S?

No, of course not. Only those tables that are mentioned in the query are
created.

> 4. "SHOW TABLES" stament would issue I_S tables?

Yes, it's mapped internally to a select from a corresponding I_S table
(with a bit of column remapping to support legacy column names).
 
> TASKS IN THE UPCOMING WEEK
> ==========================
> 1. Finish the skeleton of primary I_S storage engine. Do I need to
> post any code I write to launchpad?

Yes. Install a recent version of bzr and branch
lp:~marc.alff/mysql-server/mysql-6.0-perfschema

Then push it as a new brach on launchpad, and work in that branch.

This is how I'll be able to see your code and comment on it.

> 2. Continue to browse source code of current implementation of I_S.
> 
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
GSoC Week 3 - I_S/P_S storage enginescut_tang25 May
  • Re: GSoC Week 3 - I_S/P_S storage engineSergei Golubchik25 May
    • Re: GSoC Week 3 - I_S/P_S storage engineArjen Lentz25 May
      • Re: GSoC Week 3 - I_S/P_S storage engineSergei Golubchik25 May
        • Re: GSoC Week 3 - I_S/P_S storage engineArjen Lentz25 May
          • Re: GSoC Week 3 - I_S/P_S storage engineSergei Golubchik25 May
            • Re: GSoC Week 3 - I_S/P_S storage engineArjen Lentz25 May