1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

More comments in prepared statements code.

libmysql/libmysql.c:
  Extended comments for mysql_stmt_init, mysql_stmt_prepare, 
  mysql_stmt_result_metadata.
  Few bits of code moved around and cleaned up.
sql/sql_prepare.cc:
  Commented case with ulonglong length in get_param_length
This commit is contained in:
unknown
2004-06-06 00:33:16 +04:00
parent 0fc147494a
commit 780fdb02fd
2 changed files with 161 additions and 80 deletions

View File

@@ -210,7 +210,13 @@ static ulong get_param_length(uchar **packet, ulong len)
if (len < 5)
return 0;
(*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);
}
#else