Below is the list of changes that have just been committed into a local
6.0 repository of igor. When igor does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2008-06-06 19:33:47-07:00, igor@stripped +1 -0
Moved some inline functions used only by the methods of the JOIN_CACHE
class and classes derived from it into the definition of JOIN_CACHE.
This let us to avoid some annoying compiler warnings.
sql/sql_select.h@stripped, 2008-06-06 19:33:42-07:00, igor@stripped +28 -35
Moved some inline functions used only by the methods of the JOIN_CACHE
class and classes derived from it into the definition of JOIN_CACHE.
This let us to avoid some annoying compiler warnings.
diff -Nrup a/sql/sql_select.h b/sql/sql_select.h
--- a/sql/sql_select.h 2008-06-02 18:44:20 -07:00
+++ b/sql/sql_select.h 2008-06-06 19:33:42 -07:00
@@ -361,40 +361,6 @@ typedef struct st_cache_field {
} CACHE_FIELD;
-/* Calculate the number of bytes used to store an offset value */
-
-static
-uint offset_size(uint len)
-{ return (len < 256 ? 1 : len < 256*256 ? 2 : 4); }
-
-
-/* Get the offset value that takes ofs_sz bytes at the position ptr */
-
-static
-ulong get_offset(uint ofs_sz, uchar *ptr)
-{
- switch (ofs_sz) {
- case 1: return uint(*ptr);
- case 2: return uint2korr(ptr);
- case 4: return uint4korr(ptr);
- }
- return 0;
-}
-
-
-/* Set the offset value ofs that takes ofs_sz bytes at the position ptr */
-
-static
-void store_offset(uint ofs_sz, uchar *ptr, ulong ofs)
-{
- switch (ofs_sz) {
- case 1: *ptr= (uchar) ofs; return;
- case 2: int2store(ptr, (uint16) ofs); return;
- case 4: int4store(ptr, (uint32) ofs); return;
- }
-}
-
-
/*
JOIN_CACHE is the base class to support the implementations of both
Blocked-Based Nested Loops (BNL) Join Algorithm and Batched Key Access (BKA)
@@ -424,7 +390,9 @@ private:
/* Size of the length of a record in the cache */
uint size_of_rec_len;
/* Size of the offset of a field within a record in the cache */
- uint size_of_fld_ofs;
+ uint size_of_fld_ofs;
+
+ /* 3 functions below actually does not use the hidden parameter 'this' */
/*
The total maximal length of the fields stored for a record in the cache.
@@ -432,6 +400,31 @@ private:
*/
uint length;
+ /* Calculate the number of bytes used to store an offset value */
+ uint offset_size(uint len)
+ { return (len < 256 ? 1 : len < 256*256 ? 2 : 4); }
+
+ /* Get the offset value that takes ofs_sz bytes at the position ptr */
+ ulong get_offset(uint ofs_sz, uchar *ptr)
+ {
+ switch (ofs_sz) {
+ case 1: return uint(*ptr);
+ case 2: return uint2korr(ptr);
+ case 4: return uint4korr(ptr);
+ }
+ return 0;
+ }
+
+ /* Set the offset value ofs that takes ofs_sz bytes at the position ptr */
+ void store_offset(uint ofs_sz, uchar *ptr, ulong ofs)
+ {
+ switch (ofs_sz) {
+ case 1: *ptr= (uchar) ofs; return;
+ case 2: int2store(ptr, (uint16) ofs); return;
+ case 4: int4store(ptr, (uint32) ofs); return;
+ }
+ }
+
protected:
/*
| Thread |
|---|
| • bk commit into 6.0 tree (igor:1.2632) | igor | 7 Jun |