Skip to content

Commit e87e26a

Browse files
committed
Merge branch '10.1' of https://github.com/MariaDB/server into ok-debpkg
2 parents 6bd94cf + 44a9977 commit e87e26a

File tree

740 files changed

+26931
-13798
lines changed

Some content is hidden

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

740 files changed

+26931
-13798
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
MYSQL_VERSION_MAJOR=10
22
MYSQL_VERSION_MINOR=1
3-
MYSQL_VERSION_PATCH=6
3+
MYSQL_VERSION_PATCH=7
44
MYSQL_VERSION_EXTRA=

include/m_ctype.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@ extern MY_UNI_CTYPE my_uni_ctype[256];
201201
#define MY_CS_UNICODE_SUPPLEMENT 16384 /* Non-BMP Unicode characters */
202202
#define MY_CS_LOWER_SORT 32768 /* If use lower case as weight */
203203
#define MY_CS_STRNXFRM_BAD_NWEIGHTS 0x10000 /* strnxfrm ignores "nweights" */
204+
#define MY_CS_NOPAD 0x20000 /* if does not ignore trailing spaces */
205+
#define MY_CS_NON1TO1 0x40000 /* Has a complex mapping from characters
206+
to weights, e.g. contractions, expansions,
207+
ignorable characters */
204208
#define MY_CHARSET_UNDEFINED 0
205209

206210
/* Character repertoire flags */
@@ -511,6 +515,20 @@ struct my_charset_handler_st
511515
char *dst, size_t dst_length,
512516
const char *src, size_t src_length,
513517
size_t nchars, MY_STRCOPY_STATUS *status);
518+
/**
519+
Write a character to the target string, using its native code.
520+
For Unicode character sets (utf8, ucs2, utf16, utf16le, utf32, filename)
521+
native codes are equvalent to Unicode code points.
522+
For 8bit character sets the native code is just the byte value.
523+
For Asian characters sets:
524+
- MB1 native code is just the byte value (e.g. on the ASCII range)
525+
- MB2 native code is ((b0 << 8) + b1).
526+
- MB3 native code is ((b0 <<16) + (b1 << 8) + b2)
527+
Note, CHARSET_INFO::min_sort_char and CHARSET_INFO::max_sort_char
528+
are defined in native notation and should be written using
529+
cs->cset->native_to_mb() rather than cs->cset->wc_mb().
530+
*/
531+
my_charset_conv_wc_mb native_to_mb;
514532
};
515533

516534
extern MY_CHARSET_HANDLER my_charset_8bit_handler;
@@ -664,6 +682,7 @@ extern int my_strcasecmp_8bit(CHARSET_INFO * cs, const char *, const char *);
664682

665683
int my_mb_wc_8bit(CHARSET_INFO *cs,my_wc_t *wc, const uchar *s,const uchar *e);
666684
int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc, uchar *s, uchar *e);
685+
int my_wc_mb_bin(CHARSET_INFO *cs,my_wc_t wc, uchar *s, uchar *e);
667686

668687
int my_mb_ctype_8bit(CHARSET_INFO *,int *, const uchar *,const uchar *);
669688
int my_mb_ctype_mb(CHARSET_INFO *,int *, const uchar *,const uchar *);

include/my_global.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,13 @@ extern "C" int madvise(void *addr, size_t len, int behav);
477477
#define UNINIT_VAR(x) x
478478
#endif
479479

480+
/* This is only to be used when reseting variables in a class constructor */
481+
#if defined(_lint) || defined(FORCE_INIT_OF_VARS)
482+
#define LINT_INIT(x) x= 0
483+
#else
484+
#define LINT_INIT(x)
485+
#endif
486+
480487
#if !defined(HAVE_UINT)
481488
#undef HAVE_UINT
482489
#define HAVE_UINT

include/mysql/psi/mysql_socket.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,11 +1033,13 @@ inline_mysql_socket_accept
10331033
SOCK_CLOEXEC);
10341034
#else
10351035
socket_accept.fd= accept(socket_listen.fd, addr, &addr_length);
1036+
#ifdef FD_CLOEXEC
10361037
flags= fcntl(socket_accept.fd, F_GETFD);
10371038
if (flags != -1) {
10381039
flags |= FD_CLOEXEC;
10391040
fcntl(socket_accept.fd, F_SETFD, flags);
10401041
}
1042+
#endif
10411043
#endif
10421044

10431045
/* Instrumentation end */
@@ -1053,11 +1055,13 @@ inline_mysql_socket_accept
10531055
SOCK_CLOEXEC);
10541056
#else
10551057
socket_accept.fd= accept(socket_listen.fd, addr, &addr_length);
1058+
#ifdef FD_CLOEXEC
10561059
flags= fcntl(socket_accept.fd, F_GETFD);
10571060
if (flags != -1) {
10581061
flags |= FD_CLOEXEC;
10591062
fcntl(socket_accept.fd, F_SETFD, flags);
10601063
}
1064+
#endif
10611065
#endif
10621066
}
10631067

mysql-test/include/ctype_like_cond_propagation.inc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,19 @@ SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
3737
SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
3838
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
3939
DROP TABLE t1;
40+
41+
--echo #
42+
--echo # MDEV-8694 Wrong result for SELECT..WHERE a NOT LIKE 'a ' AND a='a'
43+
--echo #
44+
45+
CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
46+
SHOW CREATE TABLE t1;
47+
INSERT INTO t1 VALUES ('a'),('a ');
48+
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
49+
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
50+
EXPLAIN EXTENDED SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ' AND a='a';
51+
DROP TABLE t1;
52+
53+
--echo #
54+
--echo # End of MDEV-8694
55+
--echo #

mysql-test/include/ctype_utf8_ilseq.inc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,35 @@ INSERT INTO t1 (ch) VALUES (_utf8 0x61D680);
2828

2929
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
3030
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
31+
--replace_column 9 #
32+
EXPLAIN
3133
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
34+
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆' ORDER BY ch;
35+
--replace_column 9 #
36+
EXPLAIN
37+
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
3238
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='a𝌆b' ORDER BY ch;
3339

3440
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
3541
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
42+
--replace_column 9 #
43+
EXPLAIN
44+
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
3645
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
46+
--replace_column 9 #
47+
EXPLAIN
48+
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
3749
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
3850

3951
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
4052
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
53+
--replace_column 9 #
54+
EXPLAIN
55+
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
4156
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
57+
--replace_column 9 #
58+
EXPLAIN
59+
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
4260
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
4361

4462
ALTER TABLE t1 DROP KEY ch;

mysql-test/mysql-test-run.pl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4374,6 +4374,7 @@ ($$)
43744374
qr/InnoDB: Redo log crypto: Can't initialize to key version -1u/,
43754375
qr/InnoDB: Dumping buffer pool.*/,
43764376
qr/InnoDB: Buffer pool.*/,
4377+
qr/InnoDB: Warning: Writer thread is waiting this semaphore/,
43774378
qr/Slave: Unknown table 't1' .* 1051/,
43784379
qr/Slave SQL:.*(Internal MariaDB error code: [[:digit:]]+|Query:.*)/,
43794380
qr/slave SQL thread aborted/,

mysql-test/r/alter_table.result

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,15 @@ t2 CREATE TABLE `t2` (
293293
drop table if exists t1, t2;
294294
create table t1 (a int, b int, c int, d int, e int, f int, g int, h int,i int, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM;
295295
insert into t1 (a) values(1);
296+
Warnings:
297+
Warning 1364 Field 'b' doesn't have a default value
298+
Warning 1364 Field 'c' doesn't have a default value
299+
Warning 1364 Field 'd' doesn't have a default value
300+
Warning 1364 Field 'e' doesn't have a default value
301+
Warning 1364 Field 'f' doesn't have a default value
302+
Warning 1364 Field 'g' doesn't have a default value
303+
Warning 1364 Field 'h' doesn't have a default value
304+
Warning 1364 Field 'i' doesn't have a default value
296305
show table status like 't1';
297306
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
298307
t1 MyISAM 10 Fixed 1 37 X X X X X X X X latin1_swedish_ci NULL

mysql-test/r/analyze_stmt_orderby.result

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ ANALYZE
4040
"r_total_time_ms": "REPLACED",
4141
"filesort": {
4242
"r_loops": 1,
43+
"r_total_time_ms": "REPLACED",
4344
"r_limit": 5,
4445
"r_used_priority_queue": true,
4546
"r_output_rows": 6,
@@ -140,6 +141,7 @@ ANALYZE
140141
"r_total_time_ms": "REPLACED",
141142
"filesort": {
142143
"r_loops": 1,
144+
"r_total_time_ms": "REPLACED",
143145
"r_used_priority_queue": false,
144146
"r_output_rows": 10000,
145147
"r_buffer_size": "REPLACED",
@@ -204,6 +206,7 @@ ANALYZE
204206
"r_total_time_ms": "REPLACED",
205207
"filesort": {
206208
"r_loops": 1,
209+
"r_total_time_ms": "REPLACED",
207210
"r_limit": 4,
208211
"r_used_priority_queue": true,
209212
"r_output_rows": 4,
@@ -288,6 +291,7 @@ ANALYZE
288291
"r_rows": 10,
289292
"filesort": {
290293
"r_loops": 1,
294+
"r_total_time_ms": "REPLACED",
291295
"r_used_priority_queue": false,
292296
"r_output_rows": 10,
293297
"r_buffer_size": "REPLACED",
@@ -343,6 +347,7 @@ ANALYZE
343347
"r_total_time_ms": "REPLACED",
344348
"filesort": {
345349
"r_loops": 1,
350+
"r_total_time_ms": "REPLACED",
346351
"r_used_priority_queue": false,
347352
"r_output_rows": 10,
348353
"r_buffer_size": "REPLACED",
@@ -451,11 +456,13 @@ ANALYZE
451456
"r_total_time_ms": "REPLACED",
452457
"filesort": {
453458
"r_loops": 1,
459+
"r_total_time_ms": "REPLACED",
454460
"r_limit": 1,
455461
"r_used_priority_queue": true,
456462
"r_output_rows": 2,
457463
"filesort": {
458464
"r_loops": 1,
465+
"r_total_time_ms": "REPLACED",
459466
"r_used_priority_queue": false,
460467
"r_output_rows": 6,
461468
"r_buffer_size": "REPLACED",

mysql-test/r/bigint.result

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,14 @@ create table t1 select 1 as 'a';
180180
show create table t1;
181181
Table Create Table
182182
t1 CREATE TABLE `t1` (
183-
`a` int(1) NOT NULL DEFAULT '0'
183+
`a` int(1) NOT NULL
184184
) ENGINE=MyISAM DEFAULT CHARSET=latin1
185185
drop table t1;
186186
create table t1 select 9223372036854775809 as 'a';
187187
show create table t1;
188188
Table Create Table
189189
t1 CREATE TABLE `t1` (
190-
`a` bigint(19) unsigned NOT NULL DEFAULT '0'
190+
`a` bigint(19) unsigned NOT NULL
191191
) ENGINE=MyISAM DEFAULT CHARSET=latin1
192192
select * from t1;
193193
a
@@ -397,12 +397,12 @@ select -(-9223372036854775808), -(-(-9223372036854775808));
397397
create table t1 select -9223372036854775808 bi;
398398
describe t1;
399399
Field Type Null Key Default Extra
400-
bi bigint(20) NO 0
400+
bi bigint(20) NO NULL
401401
drop table t1;
402402
create table t1 select -9223372036854775809 bi;
403403
describe t1;
404404
Field Type Null Key Default Extra
405-
bi decimal(19,0) NO 0
405+
bi decimal(19,0) NO NULL
406406
drop table t1;
407407
#
408408
# Bug #45360: wrong results

0 commit comments

Comments
 (0)