Commit f90b0ecc authored by Paul McCullagh's avatar Paul McCullagh

Handle create table error correctly

parent d96c0f08
......@@ -3,6 +3,8 @@ PBXT Release Notes
------- 1.0.08 RC - Not yet released
RN233: Fixed bugs which occur when PBXT is used together with PBMS (BLOB Streaming engine).
RN232: Merged Drizzle-specific changes into the main tree.
RN231: Fixed a bug that caused bad performance as the number of threads increased. This occurred when the number of open table handles exceeded 'table_open_cache', and MySQL started closing open table handlers. PBXT was flushing a table when all table handlers were closed. PBXT will now only do this when the FLUSH TABLES statement is used.
......
......@@ -4884,6 +4884,7 @@ int ha_pbxt::create(const char *table_path, TABLE *table_arg, HA_CREATE_INFO *cr
catch_(a) {
if (tab_def)
tab_def->finalize(self);
dic.dic_table = NULL;
err = xt_ha_pbxt_thread_error_for_mysql(thd, self, pb_ignore_dup_key);
}
cont_(a);
......
......@@ -1496,6 +1496,7 @@ xtPublic void xt_create_table(XTThreadPtr self, XTPathStrPtr name, XTDictionaryP
/* Creation failed, delete the table files: */
if (*path)
tab_delete_table_files(self, name, tab_id);
tab_remove_table_path(self, db, te_tab.te_tab_path);
xt_sb_set_size(self, &tab_def, 0);
throw_();
}
......@@ -1879,9 +1880,9 @@ xtPublic void xt_check_table(XTThreadPtr self, XTOpenTablePtr ot)
#ifdef CHECK_TABLE_STATS
if (alloc_rec_count) {
printf("Minumum comp. rec. len. = %lu\n", (u_llong) min_comp_rec_len);
printf("Minumum comp. rec. len. = %llu\n", (u_llong) min_comp_rec_len);
printf("Average comp. rec. len. = %llu\n", (u_llong) ((double) alloc_rec_bytes / (double) alloc_rec_count + (double) 0.5));
printf("Maximum comp. rec. len. = %lu\n", (u_llong) max_comp_rec_len);
printf("Maximum comp. rec. len. = %llu\n", (u_llong) max_comp_rec_len);
}
printf("Free record count = %llu\n", (u_llong) free_rec_count);
printf("Deleted record count = %llu\n", (u_llong) delete_rec_count);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment