Skip to content

Commit 50a11f3

Browse files
committed
Merge 10.4 into 10.5
2 parents 842da85 + 9216114 commit 50a11f3

File tree

210 files changed

+5232
-1208
lines changed

Some content is hidden

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

210 files changed

+5232
-1208
lines changed

client/mysql_upgrade.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,7 @@ static const char *expected_errors[]=
896896
"ERROR 1290", /* RR_OPTION_PREVENTS_STATEMENT */
897897
"ERROR 1347", /* 'mysql.user' is not of type 'BASE TABLE' */
898898
"ERROR 1348", /* Column 'Show_db_priv' is not updatable */
899+
"ERROR 1356", /* definer of view lack rights (UPDATE) */
899900
0
900901
};
901902

configure.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "i686" AND CMAKE_COMPILER_IS_GNUCC AND
6969
SET(PLUGIN_QUERY_RESPONSE_TIME NO CACHE BOOL "Disabled, gcc is too old")
7070
ENDIF()
7171

72+
# use runtime atomic-support detection in aarch64
73+
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
74+
MY_CHECK_AND_SET_COMPILER_FLAG("-moutline-atomics")
75+
ENDIF()
76+
7277
IF(WITHOUT_DYNAMIC_PLUGINS)
7378
MESSAGE("Dynamic plugins are disabled.")
7479
ENDIF(WITHOUT_DYNAMIC_PLUGINS)

extra/mariabackup/xtrabackup.cc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -244,14 +244,6 @@ static char* innobase_ignored_opt;
244244
char* innobase_data_home_dir;
245245
char* innobase_data_file_path;
246246

247-
/* The following counter is used to convey information to InnoDB
248-
about server activity: in selects it is not sensible to call
249-
srv_active_wake_master_thread after each fetch or search, we only do
250-
it every INNOBASE_WAKE_INTERVAL'th step. */
251-
252-
#define INNOBASE_WAKE_INTERVAL 32
253-
ulong innobase_active_counter = 0;
254-
255247
#ifndef _WIN32
256248
static char *xtrabackup_debug_sync = NULL;
257249
#endif

include/my_rdtsc.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ C_MODE_START
7777
/**
7878
A cycle timer.
7979
80-
On clang, we use __builtin_readcyclecounter().
80+
On clang we use __builtin_readcyclecounter(), except for AARCH64.
8181
On other compilers:
8282
8383
On IA-32 and AMD64, we use the RDTSC instruction.
@@ -88,6 +88,9 @@ C_MODE_START
8888
On IBM S/390 System z we use the STCK instruction.
8989
On ARM, we probably should use the Generic Timer, but should figure out
9090
how to ensure that it can be accessed.
91+
On AARCH64, we use the generic timer base register. We override clang
92+
implementation for aarch64 as it access a PMU register which is not
93+
guarenteed to be active.
9194
9295
Sadly, we have nothing for the Digital Alpha, MIPS, Motorola m68k,
9396
HP PA-RISC or other non-mainstream (or obsolete) processors.
@@ -125,7 +128,7 @@ C_MODE_START
125128
*/
126129
static inline ulonglong my_timer_cycles(void)
127130
{
128-
# if __has_builtin(__builtin_readcyclecounter)
131+
# if __has_builtin(__builtin_readcyclecounter) && !defined (__aarch64__)
129132
return __builtin_readcyclecounter();
130133
# elif defined _WIN32 || defined __i386__ || defined __x86_64__
131134
return __rdtsc();
@@ -164,6 +167,12 @@ static inline ulonglong my_timer_cycles(void)
164167
__asm__ __volatile__ ("stck %0" : "=Q" (result) : : "cc");
165168
return result;
166169
}
170+
#elif defined(__GNUC__) && defined (__aarch64__)
171+
{
172+
ulonglong result;
173+
__asm __volatile("mrs %0, CNTVCT_EL0" : "=&r" (result));
174+
return result;
175+
}
167176
#elif defined(HAVE_SYS_TIMES_H) && defined(HAVE_GETHRTIME)
168177
/* gethrtime may appear as either cycle or nanosecond counter */
169178
return (ulonglong) gethrtime();
@@ -221,6 +230,7 @@ C_MODE_END
221230
#define MY_TIMER_ROUTINE_MACH_ABSOLUTE_TIME 25
222231
#define MY_TIMER_ROUTINE_GETSYSTEMTIMEASFILETIME 26
223232
#define MY_TIMER_ROUTINE_ASM_S390 28
233+
#define MY_TIMER_ROUTINE_AARCH64 29
224234

225235
#endif
226236

include/my_time.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,16 @@ static inline long my_time_fraction_remainder(long nr, uint decimals)
233233
DBUG_ASSERT(decimals <= TIME_SECOND_PART_DIGITS);
234234
return nr % (long) log_10_int[TIME_SECOND_PART_DIGITS - decimals];
235235
}
236+
static inline void my_datetime_trunc(MYSQL_TIME *ltime, uint decimals)
237+
{
238+
ltime->second_part-= my_time_fraction_remainder(ltime->second_part, decimals);
239+
}
236240
static inline void my_time_trunc(MYSQL_TIME *ltime, uint decimals)
237241
{
238242
ltime->second_part-= my_time_fraction_remainder(ltime->second_part, decimals);
243+
if (!ltime->second_part && ltime->neg &&
244+
!ltime->hour && !ltime->minute && !ltime->second)
245+
ltime->neg= FALSE;
239246
}
240247
static inline void my_timeval_trunc(struct timeval *tv, uint decimals)
241248
{

include/violite.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,7 @@ my_bool vio_peer_addr(Vio *vio, char *buf, uint16 *port, size_t buflen);
112112
/* Wait for an I/O event notification. */
113113
int vio_io_wait(Vio *vio, enum enum_vio_io_event event, int timeout);
114114
my_bool vio_is_connected(Vio *vio);
115-
#ifndef DBUG_OFF
116115
ssize_t vio_pending(Vio *vio);
117-
#endif
118116
/* Set timeout for a network operation. */
119117
extern int vio_timeout(Vio *vio, uint which, int timeout_sec);
120118
extern void vio_set_wait_callback(void (*before_wait)(void),

mysql-test/include/binlog_parallel_replication_marks.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ while (<F>) {
8080
s/table id \d+/table id #/;
8181
s/mapped to number \d+/mapped to number #/;
8282
s/CRC32 0x[0-9a-f]+/CRC32 0x########/;
83-
print if /\b(GTID|BEGIN|COMMIT|Table_map|Write_rows|Update_rows|Delete_rows|generated by server|40005 TEMPORARY)\b/;
83+
print if /\b(GTID|START TRANSACTION|COMMIT|Table_map|Write_rows|Update_rows|Delete_rows|generated by server|40005 TEMPORARY)\b/;
8484
}
8585
close F;
8686
EOF

0 commit comments

Comments
 (0)