26 int myrg_create(
const char *
name,
const char **table_names,
27 uint insert_method, my_bool fix_names)
32 char buff[FN_REFLEN],*end;
33 DBUG_ENTER(
"myrg_create");
37 fn_format(buff, name,
"", MYRG_NAME_EXT,
38 MY_UNPACK_FILENAME|MY_APPEND_EXT), 0,
39 O_RDWR | O_EXCL | O_NOFOLLOW, MYF(MY_WME))) < 0)
44 for ( ; *table_names ; table_names++)
46 strmov(buff,*table_names);
49 *(end=strend(buff))=
'\n';
52 MYF(MY_WME | MY_NABP)))
56 if (insert_method != MERGE_INSERT_DISABLED)
58 end=strxmov(buff,
"#INSERT_METHOD=",
59 get_type(&merge_insert_method,insert_method-1),
"\n",NullS);
61 MYF(MY_WME | MY_NABP)))
69 save_errno=my_errno ? my_errno : -1;
74 DBUG_RETURN(my_errno=save_errno);