List:Commits« Previous MessageNext Message »
From:Hakan Kuecuekyilmaz Date:October 31 2008 3:00pm
Subject:Re: bzr commit into mysql-6.0-falcon-team branch (vvaintroub:2895)
View as plain text  
Vlad,

great cleanup! While you are on it, could you also get the function()
vs. if () thing done as well.

Implicitly documented here:
http://forge.mysql.com/wiki/MySQL_Internals_Coding_Guidelines#C.2B.2B_Coding_Guidelines_of_Falcon_storage_engine

A method or function is followed by parenthesis without spaces
    function()
    method()

Conditionals have a space:
    if ()
    for ()
    while ()
    ...



>  
> -	return strlen (buffer);
> +	return (int)strlen (buffer);
>  }

please use strlen(buffer) here.

[cut]

>  
> -MemBlock* MemMgr::alloc(int length)
> +MemBlock* MemMgr::alloc(size_t s)
>  {
> -	if (length <= 0)
> -		throw SQLError (RUNTIME_ERROR, "illegal memory allocate for %d bytes", length);
> +	if(s > INT_MAX)
> +		throw SQLError (RUNTIME_ERROR, "illegal memory allocate for " I64FORMAT " bytes",
> +		(int64)s);
> +

please get back to if () here

[cut]

Best regards,

Hakan

-- 
Hakan Küçükyılmaz, Senior Software Engineer DBTG/MySQL +49 160
98953296
Sun Microsystems GmbH     Sonnenallee 1, DE-85551 Kirchheim-Heimstetten
Geschaeftsfuehrer:  Thomas Schroeder, Wolfang Engels, Dr. Roland Boemer
Vorsitz d. Aufs.rat.: Martin Haering   HRB MUC 161028     49.011, 8.376

Thread
bzr commit into mysql-6.0-falcon-team branch (vvaintroub:2895) Vladislav Vaintroub31 Oct
  • Re: bzr commit into mysql-6.0-falcon-team branch (vvaintroub:2895)Hakan Kuecuekyilmaz31 Oct