As there are zero comments in this code, could someone explain to me
what the difference between an instance of a TableShare and a
TableShareInstance is?
Thanks,
Jay
> === renamed file 'drizzled/table_instance.h' =>
> 'drizzled/table_share_instance.h'
> --- drizzled/table_instance.h 2010-05-08 18:03:06 +0000
> +++ drizzled/table_share_instance.h 2010-05-18 18:03:56 +0000
> @@ -20,23 +20,39 @@
>
> /* Structs that defines the Table */
>
> -#ifndef DRIZZLED_TABLE_INSTANCE_H
> -#define DRIZZLED_TABLE_INSTANCE_H
> +#ifndef DRIZZLED_TABLE_SHARE_INSTANCE_H
> +#define DRIZZLED_TABLE_SHARE_INSTANCE_H
>
> namespace drizzled
> {
>
> -class TableInstance : public Table
> +class TableShareInstance : public TableShare
> {
> + Table private_table;
> +
> public:
> - TableShare _table_share;
> -
> - bool ownsShare()
> - {
> - return (bool)(&_table_share == s);
> + TableShareInstance()
> + {
> + private_table.s= this;
> + }
> +
> + TableShareInstance(const char *tmpname_arg) :
> + TableShare("", 0, tmpname_arg, tmpname_arg)
> + {
> + private_table.s= this;
> + }
> +
> + Table *getTable()
> + {
> + return &private_table;
> + }
> +
> + ~TableShareInstance()
> + {
> + private_table.free_tmp_table(private_table.in_use);
> }
> };
>
> } /* namespace drizzled */
>
> -#endif /* DRIZZLED_TABLE_INSTANCE_H */
> +#endif /* DRIZZLED_TABLE_SHARE_INSTANCE_H */
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp