| 1841 | */ |
| 1842 | |
| 1843 | int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write, |
| 1844 | const uchar *frm_image, |
| 1845 | size_t frm_length, |
| 1846 | const uchar *par_image, |
| 1847 | size_t par_length) |
| 1848 | { |
| 1849 | TABLE_SHARE *share= this; |
| 1850 | uint new_frm_ver, field_pack_length, new_field_pack_flag; |
| 1851 | uint interval_count, interval_parts, read_length, int_length; |
| 1852 | uint total_typelib_value_count; |
| 1853 | uint db_create_options, keys, key_parts, n_length; |
| 1854 | uint com_length, null_bit_pos, UNINIT_VAR(mysql57_vcol_null_bit_pos), bitmap_count; |
| 1855 | uint i, hash_fields= 0; |
| 1856 | bool use_hash, mysql57_null_bits= 0; |
| 1857 | LEX_STRING keynames= {NULL, 0}; |
| 1858 | char *names, *comment_pos; |
| 1859 | const uchar *forminfo; |
| 1860 | const uchar *frm_image_end = frm_image + frm_length; |
| 1861 | uchar *record, *null_flags, *null_pos, *UNINIT_VAR(mysql57_vcol_null_pos); |
| 1862 | const uchar *disk_buff, *strpos; |
| 1863 | ulong pos, record_offset; |
| 1864 | ulong rec_buff_length; |
| 1865 | handler *handler_file= 0; |
| 1866 | KEY *keyinfo; |
| 1867 | KEY_PART_INFO *key_part= NULL; |
| 1868 | Field **field_ptr, *reg_field; |
| 1869 | const char **interval_array; |
| 1870 | uint *typelib_value_lengths= NULL; |
| 1871 | enum legacy_db_type legacy_db_type; |
| 1872 | my_bitmap_map *bitmaps; |
| 1873 | bool null_bits_are_used; |
| 1874 | uint vcol_screen_length; |
| 1875 | uchar *vcol_screen_pos; |
| 1876 | LEX_CUSTRING options; |
| 1877 | LEX_CSTRING se_name= empty_clex_str; |
| 1878 | KEY first_keyinfo; |
| 1879 | uint len; |
| 1880 | uint ext_key_parts= 0; |
| 1881 | plugin_ref se_plugin= 0; |
| 1882 | bool vers_can_native= false, frm_created= 0; |
| 1883 | Field_data_type_info_array field_data_type_info_array; |
| 1884 | MEM_ROOT *old_root= thd->mem_root; |
| 1885 | Virtual_column_info **table_check_constraints; |
| 1886 | bool *interval_unescaped= NULL; |
| 1887 | extra2_fields extra2; |
| 1888 | bool extra_index_flags_present= FALSE; |
| 1889 | key_map sort_keys_in_use(0); |
| 1890 | LEX_CSTRING connect_string= {0, 0}; |
| 1891 | static const Lex_ident_ci connect_keyword={ STRING_WITH_LEN("CONNECTION") }; |
| 1892 | DBUG_ENTER("TABLE_SHARE::init_from_binary_frm_image"); |
| 1893 | |
| 1894 | keyinfo= &first_keyinfo; |
| 1895 | thd->mem_root= &share->mem_root; |
| 1896 | |
| 1897 | if (frm_length < FRM_HEADER_SIZE + FRM_FORMINFO_SIZE) |
| 1898 | goto err; |
| 1899 | |
| 1900 | if (write) |
no test coverage detected