src/stored/stored_conf.c
void store_truncate(LEX *lc, RES_ITEM *item, int index, int pass)
{
   bool found = false;

   lex_get_token(lc, T_NAME);
   /* Store the label pass 2 so that type is defined */
   for (int i=0; trunc_opts[i].name; i++) {
      if (strcasecmp(lc->str, trunc_opts[i].name) == 0) {
         *(uint32_t *)(item->value) = trunc_opts[i].token;
         found = true;
         break;
      }
   }
   if (!found) {
      scan_err1(lc, _("Expected a Truncate Cache option keyword, got: %s"), lc->str);
   }
   scan_to_eol(lc);
   set_bit(index, res_all.hdr.item_present);
}
/*
 * Store Cloud Truncate cache option (AfterUpload, AtEndOfJob, No)
 *
 */
Store Cloud Truncate cache option (AfterUpload, AtEndOfJob, No)
Store Cloud Truncate cache option ( AfterUpload AtEndOfJob No )
void store_truncate(LEX *lc, RES_ITEM *item, int index, int pass)
{
   bool found = false;
   lex_get_token(lc, T_NAME);
   for (int i=0; trunc_opts[i].name; i++) {
      if (strcasecmp(lc->str, trunc_opts[i].name) == 0) {
         *(uint32_t *)(item->value) = trunc_opts[i].token;
         found = true;
         break;
      }
   }
   if (!found) {
      scan_err1(lc, _("Expected a Truncate Cache option keyword, got: %s"), lc->str);
   }
   scan_to_eol(lc);
   set_bit(index, res_all.hdr.item_present);
}
void store_truncate ( LEX * lc , RES_ITEM * item , int index , int pass ) { bool found = false ; lex_get_token ( lc , T_NAME ) ; for ( int i = 0 ; trunc_opts [ i ] . name ; i ++ ) { if ( strcasecmp ( lc -> str , trunc_opts [ i ] . name ) == 0 ) { * ( uint32_t * ) ( item -> value ) = trunc_opts [ i ] . token ; found = true ; break ; } } if ( ! found ) { scan_err1 ( lc , _ ( " " ) , lc -> str ) ; } scan_to_eol ( lc ) ; set_bit ( index , res_all . hdr . item_present ) ; }
Store Cloud Truncate cache option (AfterUpload, AtEndOfJob, No)
Store Cloud Truncate cache option ( AfterUpload AtEndOfJob No )
/* Store the label pass 2 so that type is defined */