Skip to content

Commit 7947efe

Browse files
committed
merge mysql-trunk --> mysql-trunk-wl3584
2 parents 7c44c3f + 1eb6964 commit 7947efe

File tree

312 files changed

+18688
-2407
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

312 files changed

+18688
-2407
lines changed

client/mysql_plugin.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,7 @@ static int find_plugin(char *tp_path)
10181018
Build the boostrap file.
10191019
10201020
Create a new file and populate it with SQL commands to ENABLE or DISABLE
1021-
the plugin via INSERT and DELETE operations on the mysql.plugin table.
1021+
the plugin via REPLACE and DELETE operations on the mysql.plugin table.
10221022
10231023
param[in] operation The type of operation (ENABLE or DISABLE)
10241024
param[out] bootstrap A FILE* pointer
@@ -1035,12 +1035,16 @@ static int build_bootstrap_file(char *operation, char *bootstrap)
10351035
Perform plugin operation : ENABLE or DISABLE
10361036
10371037
The following creates a temporary bootstrap file and populates it with
1038-
the appropriate SQL commands for the operation. For ENABLE, INSERT
1038+
the appropriate SQL commands for the operation. For ENABLE, REPLACE
10391039
statements are created. For DISABLE, DELETE statements are created. The
10401040
values for these statements are derived from the plugin_data read from the
10411041
<plugin_name>.ini configuration file. Once the file is built, a call to
10421042
mysqld is made in read only, bootstrap modes to read the SQL statements
10431043
and execute them.
1044+
1045+
Note: Replace was used so that if a user loads a newer version of a
1046+
library with a different library name, the new library name is
1047+
used for symbols that match.
10441048
*/
10451049
if ((error= make_tempfile(bootstrap, "sql")))
10461050
{
@@ -1057,7 +1061,7 @@ static int build_bootstrap_file(char *operation, char *bootstrap)
10571061
if (strcasecmp(operation, "enable") == 0)
10581062
{
10591063
int i= 0;
1060-
fprintf(file, "INSERT IGNORE INTO mysql.plugin VALUES ");
1064+
fprintf(file, "REPLACE INTO mysql.plugin VALUES ");
10611065
for (i= 0; i < (int)array_elements(plugin_data.components); i++)
10621066
{
10631067
/* stop when we read the end of the symbol list - marked with NULL */

include/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,11 @@ SET(HEADERS
5656
my_compiler.h
5757
mysql_com_server.h
5858
my_byteorder.h
59-
byteorder/byte_order_generic_x86.h
60-
byteorder/little_endian.h
61-
byteorder/byte_order_generic.h
62-
byteorder/big_endian.h
59+
byte_order_generic.h
60+
byte_order_generic_x86.h
61+
byte_order_generic_x86_64.h
62+
little_endian.h
63+
big_endian.h
6364
${HEADERS_GEN_CONFIGURE}
6465
)
6566

File renamed without changes.
File renamed without changes.

include/my_base.h

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ enum ha_rkey_function {
7878
HA_READ_PREFIX, /* Key which as same prefix */
7979
HA_READ_PREFIX_LAST, /* Last key with the same prefix */
8080
HA_READ_PREFIX_LAST_OR_PREV, /* Last or prev key with the same prefix */
81-
HA_READ_MBR_CONTAIN,
82-
HA_READ_MBR_INTERSECT,
83-
HA_READ_MBR_WITHIN,
84-
HA_READ_MBR_DISJOINT,
85-
HA_READ_MBR_EQUAL
81+
HA_READ_MBR_CONTAIN, /* Minimum Bounding Rectangle contains */
82+
HA_READ_MBR_INTERSECT, /* Minimum Bounding Rectangle intersect */
83+
HA_READ_MBR_WITHIN, /* Minimum Bounding Rectangle within */
84+
HA_READ_MBR_DISJOINT, /* Minimum Bounding Rectangle disjoint */
85+
HA_READ_MBR_EQUAL /* Minimum Bounding Rectangle equal */
8686
};
8787

8888
/* Key algorithm types */
@@ -522,41 +522,40 @@ enum data_file_type {
522522

523523
/* For key ranges */
524524

525-
/* from -inf */
526-
#define NO_MIN_RANGE 1
527-
528-
/* to +inf */
529-
#define NO_MAX_RANGE 2
530-
531-
/* X < key, i.e. not including the left endpoint */
532-
#define NEAR_MIN 4
533-
534-
/* X > key, i.e. not including the right endpoint */
535-
#define NEAR_MAX 8
536-
537-
/*
538-
This flag means that index is a unique index, and the interval is
539-
equivalent to "AND(keypart_i = const_i)", where all of const_i are not NULLs.
540-
*/
541-
#define UNIQUE_RANGE 16
542-
543-
/*
544-
This flag means that the interval is equivalent to
545-
"AND(keypart_i = const_i)", where not all key parts may be used but all of
546-
const_i are not NULLs.
547-
*/
548-
#define EQ_RANGE 32
549-
550-
/*
551-
This flag has the same meaning as UNIQUE_RANGE, except that for at least
552-
one keypart the condition is "keypart IS NULL".
553-
*/
554-
#define NULL_RANGE 64
555-
556-
#define GEOM_FLAG 128
525+
enum key_range_flag {
526+
NO_MIN_RANGE= 1 << 0, ///< from -inf
527+
NO_MAX_RANGE= 1 << 1, ///< to +inf
528+
/* X < key, i.e. not including the left endpoint */
529+
NEAR_MIN= 1 << 2,
530+
/* X > key, i.e. not including the right endpoint */
531+
NEAR_MAX= 1 << 3,
532+
/*
533+
This flag means that index is a unique index, and the interval is
534+
equivalent to "AND(keypart_i = const_i)", where all of const_i are
535+
not NULLs.
536+
*/
537+
UNIQUE_RANGE= 1 << 4,
538+
/*
539+
This flag means that the interval is equivalent to
540+
"AND(keypart_i = const_i)", where not all key parts may be used
541+
but all of const_i are not NULLs.
542+
*/
543+
EQ_RANGE= 1 << 5,
544+
/*
545+
This flag has the same meaning as UNIQUE_RANGE, except that for at
546+
least one keypart the condition is "keypart IS NULL".
547+
*/
548+
NULL_RANGE= 1 << 6,
549+
GEOM_FLAG= 1 << 7, ///< GIS
550+
/* Deprecated, currently used only by NDB at row retrieval */
551+
SKIP_RANGE= 1 << 8,
552+
/*
553+
Used together with EQ_RANGE to indicate that index statistics
554+
should be used instead of sampling the index.
555+
*/
556+
USE_INDEX_STATISTICS= 1 << 9
557+
};
557558

558-
/* Deprecated, currently used only by NDB at row retrieval */
559-
#define SKIP_RANGE 256
560559

561560
typedef struct st_key_range
562561
{

include/my_bitmap.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,14 @@ static inline my_bool bitmap_is_set(const MY_BITMAP *map, uint bit)
100100
return ((uchar*)map->bitmap)[bit / 8] & (1 << (bit & 7));
101101
}
102102

103-
103+
/**
104+
Quite unlike other C comparison functions ending with 'cmp', e.g. memcmp(),
105+
strcmp(), this function returns true if the bitmaps are equal, and false
106+
otherwise.
107+
108+
@retval true The bitmaps are equal.
109+
@retval false The bitmaps differ.
110+
*/
104111
static inline my_bool bitmap_cmp(const MY_BITMAP *map1, const MY_BITMAP *map2)
105112
{
106113
if (memcmp(map1->bitmap, map2->bitmap, 4*(no_words_in_map(map1)-1)) != 0)

include/my_byteorder.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
*/
3434
#if defined(__i386__) || defined(_WIN32)
3535
#define MY_BYTE_ORDER_ARCH_OPTIMIZED
36-
#include "byteorder/byte_order_generic_x86.h"
36+
#include "byte_order_generic_x86.h"
3737
#elif defined(__x86_64__)
38-
#include "byteorder/byte_order_generic_x86_64.h"
38+
#include "byte_order_generic_x86_64.h"
3939
#else
40-
#include "byteorder/byte_order_generic.h"
40+
#include "byte_order_generic.h"
4141
#endif
4242

4343
/*
@@ -46,9 +46,9 @@
4646
a register) and M a pointer to byte.
4747
*/
4848
#ifdef WORDS_BIGENDIAN
49-
#include "byteorder/big_endian.h"
49+
#include "big_endian.h"
5050
#else
51-
#include "byteorder/little_endian.h"
51+
#include "little_endian.h"
5252
#endif
5353

5454
#endif /* MY_BYTEORDER_INCLUDED */

0 commit comments

Comments
 (0)