| 763 | |
| 764 | |
| 765 | bool Create_json_table::finalize(THD *thd, TABLE *table, |
| 766 | TMP_TABLE_PARAM *param, |
| 767 | Table_function_json_table *jt) |
| 768 | { |
| 769 | DBUG_ENTER("Create_json_table::finalize"); |
| 770 | DBUG_ASSERT(table); |
| 771 | |
| 772 | if (Create_tmp_table::finalize(thd, table, param, 1, 0)) |
| 773 | DBUG_RETURN(true); |
| 774 | |
| 775 | table->db_stat= HA_OPEN_KEYFILE; |
| 776 | if (unlikely(table->file->ha_open(table, table->s->path.str, O_RDWR, |
| 777 | HA_OPEN_TMP_TABLE | HA_OPEN_INTERNAL_TABLE | |
| 778 | HA_OPEN_SIZE_TRACKING))) |
| 779 | DBUG_RETURN(true); |
| 780 | |
| 781 | table->set_created(); |
| 782 | table->s->max_rows= ~(ha_rows) 0; |
| 783 | param->end_write_records= HA_POS_ERROR; |
| 784 | DBUG_RETURN(0); |
| 785 | } |
| 786 | |
| 787 | |
| 788 | /* |
no test coverage detected