home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.os.vms      DEC's VAX* line of computers & VMS.      264,096 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 262,971 of 264,096   
   =?UTF-8?Q?Arne_Vajh=C3=B8j?= to Simon Clubley   
   Re: extending MySQL on VMS   
   15 Aug 25 09:35:00   
   
   From: arne@vajhoej.dk   
      
   On 8/15/2025 8:27 AM, Simon Clubley wrote:   
   > On 2025-08-12, Arne Vajhøj  wrote:   
   >> Code:   
   >>   
   >> #include    
   >>   
   >> #include    
   >>   
   >> my_bool demo_init(UDF_INIT *initid, UDF_ARGS *args, char *message)   
   >> {   
   >>       if(args->arg_count == 2 && args->arg_type[0] == STRING_RESULT &&   
   >> args->arg_type[1] == INT_RESULT)   
   >   
   > Is it guaranteed that arg_type[] will always have at least elements ?   
   > If not, that's dangerous unless the compiler you are using does   
   > expression short-circuiting.   
      
   Isn't C required to do short circuiting on && ?   
      
   >>       {   
   >>           return 0;   
   >>       }   
   >>       else   
   >>       {   
   >>           strcpy(message, "demo function requires two arguments: one   
   >> string and one integer");   
   >>           return 1;   
   >   
   > YUCK!!! :-) Does MySQL provide a maximum error message size field or   
   > constant that you can use with strncpy() instead ?   
      
   Not that I am aware of.   
      
   No such used in the example provided by MySQL/Oracle.   
      
   Arne   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca