Skip to content

Commit 91ff017

Browse files
committed
Merge MDEV-9112 into 10.1
Conflicts: config.h.cmake configure.cmake
2 parents a96fbc3 + 8cf1f50 commit 91ff017

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

config.h.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
#cmakedefine HAVE_SYS_UN_H 1
9797
#cmakedefine HAVE_SYS_VADVISE_H 1
9898
#cmakedefine HAVE_SYS_STATVFS_H 1
99+
#cmakedefine HAVE_UCONTEXT_H 1
99100
#cmakedefine HAVE_TERM_H 1
100101
#cmakedefine HAVE_TERMBITS_H 1
101102
#cmakedefine HAVE_TERMIOS_H 1
@@ -297,7 +298,6 @@
297298
#cmakedefine HAVE_THR_YIELD 1
298299
#cmakedefine HAVE_TIME 1
299300
#cmakedefine HAVE_TIMES 1
300-
#cmakedefine HAVE_UCONTEXT 1
301301
#cmakedefine HAVE_VALLOC 1
302302
#cmakedefine HAVE_VIDATTR 1
303303
#define HAVE_VIO_READ_BUFF 1

configure.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,9 @@ CHECK_STRUCT_HAS_MEMBER("struct dirent" d_ino "dirent.h" STRUCT_DIRENT_HAS_D_IN
10671067
CHECK_STRUCT_HAS_MEMBER("struct dirent" d_namlen "dirent.h" STRUCT_DIRENT_HAS_D_NAMLEN)
10681068
SET(SPRINTF_RETURNS_INT 1)
10691069
CHECK_INCLUDE_FILE(ucontext.h HAVE_UCONTEXT_H)
1070+
IF(NOT HAVE_UCONTEXT_H)
1071+
CHECK_INCLUDE_FILE(sys/ucontext.h HAVE_UCONTEXT_H)
1072+
ENDIF()
10701073

10711074
CHECK_STRUCT_HAS_MEMBER("struct timespec" tv_sec "time.h" STRUCT_TIMESPEC_HAS_TV_SEC)
10721075
CHECK_STRUCT_HAS_MEMBER("struct timespec" tv_nsec "time.h" STRUCT_TIMESPEC_HAS_TV_NSEC)

include/my_context.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#define MY_CONTEXT_USE_X86_64_GCC_ASM
3232
#elif defined(__GNUC__) && __GNUC__ >= 3 && defined(__i386__)
3333
#define MY_CONTEXT_USE_I386_GCC_ASM
34-
#elif defined(HAVE_UCONTEXT)
34+
#elif defined(HAVE_UCONTEXT_H)
3535
#define MY_CONTEXT_USE_UCONTEXT
3636
#else
3737
#define MY_CONTEXT_DISABLE

sql-common/client.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4337,6 +4337,7 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg)
43374337
stacksize= ASYNC_CONTEXT_DEFAULT_STACK_SIZE;
43384338
if (my_context_init(&ctxt->async_context, stacksize))
43394339
{
4340+
set_mysql_error(mysql, CR_OUT_OF_MEMORY, unknown_sqlstate);
43404341
my_free(ctxt);
43414342
DBUG_RETURN(1);
43424343
}

0 commit comments

Comments
 (0)