Skip to content

Commit

Permalink
Merge 10.11 into 11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Jan 19, 2024
2 parents ac774a2 + 9d20853 commit 9374772
Show file tree
Hide file tree
Showing 160 changed files with 2,009 additions and 557 deletions.
1 change: 0 additions & 1 deletion cmake/os/WindowsCache.cmake
Expand Up @@ -242,7 +242,6 @@ SET(HAVE_TERMCAP_H CACHE INTERNAL "")
SET(HAVE_TERMIOS_H CACHE INTERNAL "")
SET(HAVE_TERMIO_H CACHE INTERNAL "")
SET(HAVE_TERM_H CACHE INTERNAL "")
SET(HAVE_THR_SETCONCURRENCY CACHE INTERNAL "")
SET(HAVE_THR_YIELD CACHE INTERNAL "")
SET(HAVE_TIME 1 CACHE INTERNAL "")
SET(HAVE_TIMES CACHE INTERNAL "")
Expand Down
1 change: 0 additions & 1 deletion config.h.cmake
Expand Up @@ -232,7 +232,6 @@
#cmakedefine HAVE_STRTOUL 1
#cmakedefine HAVE_STRTOULL 1
#cmakedefine HAVE_TELL 1
#cmakedefine HAVE_THR_SETCONCURRENCY 1
#cmakedefine HAVE_THR_YIELD 1
#cmakedefine HAVE_TIME 1
#cmakedefine HAVE_TIMES 1
Expand Down
1 change: 0 additions & 1 deletion configure.cmake
Expand Up @@ -418,7 +418,6 @@ CHECK_FUNCTION_EXISTS (strtoul HAVE_STRTOUL)
CHECK_FUNCTION_EXISTS (strtoull HAVE_STRTOULL)
CHECK_FUNCTION_EXISTS (strcasecmp HAVE_STRCASECMP)
CHECK_FUNCTION_EXISTS (tell HAVE_TELL)
CHECK_FUNCTION_EXISTS (thr_setconcurrency HAVE_THR_SETCONCURRENCY)
CHECK_FUNCTION_EXISTS (thr_yield HAVE_THR_YIELD)
CHECK_FUNCTION_EXISTS (vasprintf HAVE_VASPRINTF)
CHECK_FUNCTION_EXISTS (vsnprintf HAVE_VSNPRINTF)
Expand Down
3 changes: 1 addition & 2 deletions debian/control
Expand Up @@ -30,8 +30,7 @@ Build-Depends: bison,
liblz4-dev,
liblzma-dev,
liblzo2-dev,
libncurses5-dev (>= 5.0-6~),
libncurses5-dev:native (>= 5.0-6~),
libncurses-dev,
libnuma-dev [linux-any],
libpam0g-dev,
libpcre2-dev,
Expand Down
6 changes: 0 additions & 6 deletions include/my_pthread.h
Expand Up @@ -147,9 +147,6 @@ int pthread_cancel(pthread_t thread);
#ifndef _REENTRANT
#define _REENTRANT
#endif
#ifdef HAVE_THR_SETCONCURRENCY
#include <thread.h> /* Probably solaris */
#endif
#ifdef HAVE_SCHED_H
#include <sched.h>
#endif
Expand Down Expand Up @@ -618,9 +615,6 @@ extern int my_rw_trywrlock(my_rw_lock_t *);

#define GETHOSTBYADDR_BUFF_SIZE 2048

#ifndef HAVE_THR_SETCONCURRENCY
#define thr_setconcurrency(A) pthread_dummy(0)
#endif
#if !defined(HAVE_PTHREAD_ATTR_SETSTACKSIZE) && ! defined(pthread_attr_setstacksize)
#define pthread_attr_setstacksize(A,B) pthread_dummy(0)
#endif
Expand Down
16 changes: 14 additions & 2 deletions include/mysql/plugin.h
Expand Up @@ -531,7 +531,13 @@ struct st_mysql_plugin
const char *author; /* plugin author (for I_S.PLUGINS) */
const char *descr; /* general descriptive text (for I_S.PLUGINS) */
int license; /* the plugin license (PLUGIN_LICENSE_XXX) */
int (*init)(void *); /* the function to invoke when plugin is loaded */
/*
The function to invoke when plugin is loaded. Plugin
initialisation done here should defer any ALTER TABLE queries to
after the ddl recovery is done, in the signal_ddl_recovery_done()
callback called by ha_signal_ddl_recovery_done().
*/
int (*init)(void *);
int (*deinit)(void *);/* the function to invoke when plugin is unloaded */
unsigned int version; /* plugin version (for I_S.PLUGINS) */
struct st_mysql_show_var *status_vars;
Expand All @@ -555,7 +561,13 @@ struct st_maria_plugin
const char *author; /* plugin author (for SHOW PLUGINS) */
const char *descr; /* general descriptive text (for SHOW PLUGINS ) */
int license; /* the plugin license (PLUGIN_LICENSE_XXX) */
int (*init)(void *); /* the function to invoke when plugin is loaded */
/*
The function to invoke when plugin is loaded. Plugin
initialisation done here should defer any ALTER TABLE queries to
after the ddl recovery is done, in the signal_ddl_recovery_done()
callback called by ha_signal_ddl_recovery_done().
*/
int (*init)(void *);
int (*deinit)(void *);/* the function to invoke when plugin is unloaded */
unsigned int version; /* plugin version (for SHOW PLUGINS) */
struct st_mysql_show_var *status_vars;
Expand Down
2 changes: 0 additions & 2 deletions libmysqld/lib_sql.cc
Expand Up @@ -634,8 +634,6 @@ int init_embedded_server(int argc, char **argv, char **groups)
udf_init();
#endif

(void) thr_setconcurrency(concurrency); // 10 by default

if (flush_time && flush_time != ~(ulong) 0L)
start_handle_manager();

Expand Down
@@ -1,9 +1,9 @@
--source include/have_compress.inc

# Test that the system is using the default/standard bzip library.
# Test that the system is using the default/standard zlib library.
# If not, we have to skip the test as the compression lengths displayed
# in the test will not match the results from used compression library.

if (`select length(COMPRESS(space(5000))) != 33`) {
skip Test skipped as standard bzip is needed;
skip Test skipped as standard zlib is needed;
}
6 changes: 6 additions & 0 deletions mysql-test/lib/mtr_cases.pm
Expand Up @@ -892,6 +892,12 @@ sub collect_one_test_case {
}
my @no_combs = grep { $test_combs{$_} == 1 } keys %test_combs;
if (@no_combs) {
if ($::opt_skip_not_found) {
push @{$tinfo->{combinations}}, @no_combs;
$tinfo->{'skip'}= 1;
$tinfo->{'comment'}= "combination not found";
return $tinfo;
}
mtr_error("Could not run $name with '".(
join(',', sort @no_combs))."' combination(s)");
}
Expand Down
3 changes: 0 additions & 3 deletions mysql-test/main/cast.test
Expand Up @@ -768,14 +768,11 @@ INSERT INTO t1 VALUES (-1.0);
SELECT * FROM t1;
DROP TABLE t1;

#enable after MDEV-32645 is fixed
--disable_view_protocol
SELECT CAST(-1e0 AS UNSIGNED);
CREATE TABLE t1 (a BIGINT UNSIGNED);
INSERT INTO t1 VALUES (-1e0);
SELECT * FROM t1;
DROP TABLE t1;
--enable_view_protocol

SELECT CAST(-1e308 AS UNSIGNED);
CREATE TABLE t1 (a BIGINT UNSIGNED);
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/main/column_compression.test
@@ -1,6 +1,6 @@
--source include/have_innodb.inc
--source include/have_csv.inc
--source include/have_normal_bzip.inc
--source include/have_normal_zlib.inc

let $MYSQLD_DATADIR= `select @@datadir`;

Expand Down
2 changes: 1 addition & 1 deletion mysql-test/main/column_compression_rpl.test
@@ -1,6 +1,6 @@
--source include/have_innodb.inc
--source include/have_normal_zlib.inc
--source include/master-slave.inc
--source include/have_normal_bzip.inc

--let $engine_type= myisam
--let $engine_type2= innodb
Expand Down
45 changes: 45 additions & 0 deletions mysql-test/main/cte_nonrecursive.result
Expand Up @@ -2636,4 +2636,49 @@ a
1
1
DROP TABLE t1;
#
# MDEV-31657: CTE with the same name as base table used twice
# in another CTE
#
create table t (a int);
insert into t values (3), (7), (1);
with
t as (select * from t),
cte as (select t1.a as t1a, t2.a as t2a from t as t1, t as t2 where t1.a=t2.a)
select * from cte;
t1a t2a
3 3
7 7
1 1
create table s (a int);
insert into s values (1), (4), (7);
with
t as (select * from t),
s as (select a-1 as a from s),
cte as (select t.a as ta, s.a as sa from t, s where t.a=s.a
union
select t.a+1, s.a+1 from t, s where t.a=s.a+1)
select * from cte;
ta sa
3 3
2 1
8 7
with
t as (select * from t),
cte as (select t.a as ta, s.a as sa from t, s where t.a=s.a
union
select t.a+1, s.a+1 from t, s where t.a=s.a),
s as (select a+10 as a from s)
select * from cte;
ta sa
1 1
7 7
2 2
8 8
drop table t,s;
with
t as (select * from t),
cte as (select t1.a as t1a, t2.a as t2a from t as t1, t as t2 where t1.a=t2.a)
select * from cte;
ERROR 42S02: Table 'test.t' doesn't exist
# End of 10.4 tests
46 changes: 46 additions & 0 deletions mysql-test/main/cte_nonrecursive.test
Expand Up @@ -1979,4 +1979,50 @@ SELECT * FROM t1;

DROP TABLE t1;

--echo #
--echo # MDEV-31657: CTE with the same name as base table used twice
--echo # in another CTE
--echo #

create table t (a int);
insert into t values (3), (7), (1);

let $q1=
with
t as (select * from t),
cte as (select t1.a as t1a, t2.a as t2a from t as t1, t as t2 where t1.a=t2.a)
select * from cte;

eval $q1;

create table s (a int);
insert into s values (1), (4), (7);

let $q2=
with
t as (select * from t),
s as (select a-1 as a from s),
cte as (select t.a as ta, s.a as sa from t, s where t.a=s.a
union
select t.a+1, s.a+1 from t, s where t.a=s.a+1)
select * from cte;

eval $q2;

let $q3=
with
t as (select * from t),
cte as (select t.a as ta, s.a as sa from t, s where t.a=s.a
union
select t.a+1, s.a+1 from t, s where t.a=s.a),
s as (select a+10 as a from s)
select * from cte;

eval $q3;

drop table t,s;

--ERROR ER_NO_SUCH_TABLE
eval $q1;

--echo # End of 10.4 tests
2 changes: 1 addition & 1 deletion mysql-test/main/func_compress.test
@@ -1,5 +1,5 @@
-- source include/have_compress.inc
-- source include/have_normal_bzip.inc
-- source include/have_normal_zlib.inc
#
# Test for compress and uncompress functions:
#
Expand Down
107 changes: 107 additions & 0 deletions mysql-test/main/gis.result
Expand Up @@ -5328,5 +5328,112 @@ SELECT BIT_XOR(a) FROM t1;
ERROR HY000: Illegal parameter data type geometry for operation 'bit_xor('
DROP TABLE t1;
#
# MDEV-27666 User variable not parsed as geometry variable in geometry function.
#
set @g= point(1, 1);
select ST_AsWKT(GeometryCollection(Point(44, 6), @g));
ST_AsWKT(GeometryCollection(Point(44, 6), @g))
GEOMETRYCOLLECTION(POINT(44 6),POINT(1 1))
set @g= "just a string";
select ST_AsWKT(GeometryCollection(Point(44, 6), @g));
ERROR HY000: Illegal parameter data type longblob for operation 'geometrycollection'
SET @g= LineString(Point(0,0), Point(0,1));
SELECT AsText(PointN(@g, 1));
AsText(PointN(@g, 1))
POINT(0 0)
SELECT AsText(PointN(@g, 2));
AsText(PointN(@g, 2))
POINT(0 1)
SET @g= Point(1, 1);
CREATE TABLE t1 AS SELECT @g AS g;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`g` point DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
SELECT AsText(g) FROM t1;
AsText(g)
POINT(1 1)
DROP TABLE t1;
SET @g= MultiPoint(Point(1, 1), Point(-1,-1));
CREATE TABLE t1 AS SELECT @g AS g;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`g` multipoint DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
SELECT AsText(g) FROM t1;
AsText(g)
MULTIPOINT(1 1,-1 -1)
DROP TABLE t1;
SET @g= LineString(Point(1, 1), Point(2,2));
CREATE TABLE t1 AS SELECT @g AS g;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`g` linestring DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
SELECT AsText(g) FROM t1;
AsText(g)
LINESTRING(1 1,2 2)
DROP TABLE t1;
SET @g= MultiLineString(LineString(Point(1, 1), Point(2,2)),
LineString(Point(-1, -1), Point(-2,-2)));
CREATE TABLE t1 AS SELECT @g AS g;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`g` multilinestring DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
SELECT AsText(g) FROM t1;
AsText(g)
MULTILINESTRING((1 1,2 2),(-1 -1,-2 -2))
DROP TABLE t1;
SET @g= Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(0, 0)));
CREATE TABLE t1 AS SELECT @g AS g;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`g` polygon DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
SELECT AsText(g) FROM t1;
AsText(g)
POLYGON((0 0,30 0,30 30,0 0))
DROP TABLE t1;
SET @g= MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3),
Point(3, 0), Point(0, 3))));
CREATE TABLE t1 AS SELECT @g AS g;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`g` multipolygon DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
SELECT AsText(g) FROM t1;
AsText(g)
MULTIPOLYGON(((0 3,3 3,3 0,0 3)))
DROP TABLE t1;
SET @g= GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9)));
CREATE TABLE t1 AS SELECT @g AS g;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`g` geometrycollection DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
SELECT AsText(g) FROM t1;
AsText(g)
GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9))
DROP TABLE t1;
SET @g= GeometryFromText('POINT(1 1)');
CREATE TABLE t1 AS SELECT @g AS g;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`g` geometry DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
SELECT AsText(g) FROM t1;
AsText(g)
POINT(1 1)
DROP TABLE t1;
#
# End of 10.5 tests
#

0 comments on commit 9374772

Please sign in to comment.