Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 1

Displaying posts with tag: mysql plugins (reset)

Analysing WHER-clauses in INFORMATION_SCHEMA table implemtations
Employee +1 Vote Up -0Vote Down

The MySQL Server has a quite simple interface for plugins to create tables inside INFORMATION_SCHEMA. A minimal plugin for creating a table with nothing but a counter might look like this:

static int counter_fill_table(THD *thd, TABLE_LIST *tables, Item *cond)
  ulonglong value= 0;
  while (1)
    table->field[0]->store(value++, true);
  return 0;

static ST_FIELD_INFO counter_table_fields[]=
  {0, 0, MYSQL_TYPE_NULL, 0, 0, 0, 0}

static int counter_table_init(void *ptr)
  ST_SCHEMA_TABLE *schema_table= (ST_SCHEMA_TABLE*)ptr; …
  [Read more...]
Showing entries 1 to 1

Planet MySQL © 1995, 2016, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.