25a26,27
> #
> # Authors: Nathan Binkert
100a103,124
> # We keep the bin names separate so that the data table doesn't get
> # huge since bin names are frequently repeated.
> #
> # COLUMNS:
> # 'id' is the unique bin identifer.
> # 'name' is the string name for the bin.
> #
> # INDEXES:
> # 'bin' is indexed to get the name of a bin when data is retrieved
> # via the data table.
> # 'name' is indexed to get the bin id for a named bin when you want
> # to search the data table based on a specific bin.
> #
> self.query('''
> CREATE TABLE bins(
> bn_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
> bn_name VARCHAR(255) NOT NULL,
> PRIMARY KEY(bn_id),
> UNIQUE (bn_name)
> ) TYPE=InnoDB''')
>
> #
200a225,226
> # 'bin' is the name of the bin that the data was generated in, if
> # any.
206c232
< # can be found in many runs and samples, in addition to
---
> # can be found in many runs, bins, and samples, in addition to
218a245
> dt_bin SMALLINT UNSIGNED NOT NULL,
222c249
< UNIQUE (dt_stat,dt_x,dt_y,dt_run,dt_tick)
---
> UNIQUE (dt_stat,dt_x,dt_y,dt_run,dt_tick,dt_bin)
373a401,406
> DELETE bins
> FROM bins
> LEFT JOIN data ON bn_id=dt_bin
> WHERE dt_bin IS NULL''')
>
> self.query('''