Commit 231ec666 authored by konstantin@mysql.com's avatar konstantin@mysql.com

More comments in prepared statements code.

parent 21783e85
This diff is collapsed.
...@@ -210,7 +210,13 @@ static ulong get_param_length(uchar **packet, ulong len) ...@@ -210,7 +210,13 @@ static ulong get_param_length(uchar **packet, ulong len)
if (len < 5) if (len < 5)
return 0; return 0;
(*packet)+=9; // Must be 254 when here (*packet)+=9; // Must be 254 when here
/* TODO: why uint4korr here? (should be uint8korr) */ /*
In our client-server protocol all numbers bigger than 2^24
stored as 8 bytes with uint8korr. Here we always know that
parameter length is less than 2^4 so don't look at the second
4 bytes. But still we need to obey the protocol hence 9 in the
assignment above.
*/
return (ulong) uint4korr(pos+1); return (ulong) uint4korr(pos+1);
} }
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment