Skip to content

Commit 55b2281

Browse files
committed
Merge branch '10.2' into 10.3
2 parents d6d621c + 259edb1 commit 55b2281

File tree

107 files changed

+2600
-1358
lines changed

Some content is hidden

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

107 files changed

+2600
-1358
lines changed

dbug/dbug.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,8 @@ typedef struct _db_code_state_ {
225225
const char *file; /* Name of current user file */
226226
struct _db_stack_frame_ *framep; /* Pointer to current frame */
227227
struct settings *stack; /* debugging settings */
228-
const char *jmpfunc; /* Remember current function for setjmp */
229-
const char *jmpfile; /* Remember current file for setjmp */
230228
int lineno; /* Current debugger output line number */
231229
uint level; /* Current function nesting level */
232-
int jmplevel; /* Remember nesting level at setjmp() */
233230

234231
/*
235232
* The following variables are used to hold the state information

debian/additions/my.cnf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,6 @@ max_binlog_size = 100M
131131
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
132132
# Read the manual for more InnoDB related options. There are many!
133133
default_storage_engine = InnoDB
134-
# you can't just change log file size, requires special procedure
135-
#innodb_log_file_size = 50M
136134
innodb_buffer_pool_size = 256M
137135
innodb_log_buffer_size = 8M
138136
innodb_file_per_table = 1

include/mysql/service_wsrep.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ extern struct wsrep_service_st {
101101
enum wsrep_conflict_state (*wsrep_thd_get_conflict_state_func)(MYSQL_THD);
102102
my_bool (*wsrep_thd_is_BF_func)(MYSQL_THD , my_bool);
103103
my_bool (*wsrep_thd_is_wsrep_func)(MYSQL_THD thd);
104-
char * (*wsrep_thd_query_func)(THD *thd);
104+
const char * (*wsrep_thd_query_func)(THD *thd);
105105
enum wsrep_query_state (*wsrep_thd_query_state_func)(THD *thd);
106106
const char * (*wsrep_thd_query_state_str_func)(THD *thd);
107107
int (*wsrep_thd_retry_counter_func)(THD *thd);
@@ -186,7 +186,7 @@ extern long wsrep_protocol_version;
186186

187187
bool wsrep_consistency_check(THD *thd);
188188
bool wsrep_prepare_key(const unsigned char* cache_key, size_t cache_key_len, const unsigned char* row_id, size_t row_id_len, struct wsrep_buf* key, size_t* key_len);
189-
char *wsrep_thd_query(THD *thd);
189+
const char *wsrep_thd_query(THD *thd);
190190
const char *wsrep_thd_conflict_state_str(THD *thd);
191191
const char *wsrep_thd_exec_mode_str(THD *thd);
192192
const char *wsrep_thd_query_state_str(THD *thd);

libmariadb

mysql-test/collections/10.0-compatible.list

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ main.function_defaults_innodb
202202
main.gcc296
203203
main.get_diagnostics
204204
main.gis
205-
main.gis2
206205
main.gis-alter_table_online
207206
main.gis-precise
208207
main.gis-rt-precise

mysql-test/main/func_math.result

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -875,6 +875,49 @@ t1 CREATE TABLE `t1` (
875875
) ENGINE=MyISAM DEFAULT CHARSET=latin1
876876
DROP TABLE t1;
877877
#
878+
# Bug #29723340: MYSQL SERVER CRASH AFTER SQL QUERY WITH DATA ?AST
879+
#
880+
create table t1(a int);
881+
insert ignore t1 values("1e-214748364");
882+
Warnings:
883+
Warning 1265 Data truncated for column 'a' at row 1
884+
insert ignore t1 values("1e-2147483648");
885+
Warnings:
886+
Warning 1265 Data truncated for column 'a' at row 1
887+
insert ignore t1 values("1e-21474836480");
888+
Warnings:
889+
Warning 1265 Data truncated for column 'a' at row 1
890+
insert ignore t1 values("1e+214748364");
891+
Warnings:
892+
Warning 1264 Out of range value for column 'a' at row 1
893+
insert ignore t1 values("1e+2147483647");
894+
Warnings:
895+
Warning 1264 Out of range value for column 'a' at row 1
896+
insert ignore t1 values("1e+21474836470");
897+
Warnings:
898+
Warning 1264 Out of range value for column 'a' at row 1
899+
set global max_allowed_packet= cast(2*1024*1024*1024+1024 as unsigned);
900+
Warnings:
901+
Warning 1292 Truncated incorrect max_allowed_packet value: '2147484672'
902+
connect foo,localhost,root;
903+
set @a=2147483647;
904+
insert ignore t1 values (concat('1', repeat('0', @a+18), 'e-', @a-1, '0'));
905+
Warnings:
906+
Warning 1301 Result of repeat() was larger than max_allowed_packet (1073741824) - truncated
907+
disconnect foo;
908+
connection default;
909+
set global max_allowed_packet=default;
910+
select * from t1;
911+
a
912+
0
913+
0
914+
0
915+
2147483647
916+
2147483647
917+
2147483647
918+
NULL
919+
drop table t1;
920+
#
878921
# End of 5.5 tests
879922
#
880923
#

mysql-test/main/func_math.test

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,31 @@ SHOW CREATE TABLE t1;
627627
DROP TABLE t1;
628628

629629

630+
--echo #
631+
--echo # Bug #29723340: MYSQL SERVER CRASH AFTER SQL QUERY WITH DATA ?AST
632+
--echo #
633+
634+
create table t1(a int);
635+
insert ignore t1 values("1e-214748364");
636+
insert ignore t1 values("1e-2147483648");
637+
insert ignore t1 values("1e-21474836480");
638+
insert ignore t1 values("1e+214748364");
639+
insert ignore t1 values("1e+2147483647");
640+
insert ignore t1 values("1e+21474836470");
641+
642+
# if max max_allowed_packet will ever be increased beyond 2GB, this could
643+
# break again:
644+
set global max_allowed_packet= cast(2*1024*1024*1024+1024 as unsigned);
645+
connect foo,localhost,root;
646+
set @a=2147483647;
647+
insert ignore t1 values (concat('1', repeat('0', @a+18), 'e-', @a-1, '0'));
648+
disconnect foo;
649+
connection default;
650+
set global max_allowed_packet=default;
651+
652+
select * from t1;
653+
drop table t1;
654+
630655
--echo #
631656
--echo # End of 5.5 tests
632657
--echo #

mysql-test/main/information_schema_db.result

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,3 +244,82 @@ connection user1;
244244
disconnect user1;
245245
connection default;
246246
set global sql_mode=default;
247+
create user foo@localhost;
248+
grant select on test.* to foo@localhost;
249+
create procedure rootonly() select 1;
250+
create sql security definer view v1d as select current_user(),user from information_schema.processlist;
251+
create sql security invoker view v1i as select current_user(),user from information_schema.processlist;
252+
create sql security definer view v2d as select table_name from information_schema.tables where table_schema='mysql' and table_name like '%user%';
253+
create sql security invoker view v2i as select table_name from information_schema.tables where table_schema='mysql' and table_name like '%user%';
254+
create sql security definer view v3d as select schema_name from information_schema.schemata where schema_name like '%mysql%';
255+
create sql security invoker view v3i as select schema_name from information_schema.schemata where schema_name like '%mysql%';
256+
create sql security definer view v4d as select routine_name from information_schema.routines where routine_schema='test';
257+
create sql security invoker view v4i as select routine_name from information_schema.routines where routine_schema='test';
258+
create sql security definer view v5d as select view_definition > '' from information_schema.views where table_name='v1d';
259+
create sql security invoker view v5i as select view_definition > '' from information_schema.views where table_name='v1d';
260+
connect foo,localhost,foo;
261+
select * from v1d;
262+
current_user() user
263+
root@localhost root
264+
root@localhost root
265+
select * from v1i;
266+
current_user() user
267+
foo@localhost foo
268+
select * from v2d;
269+
table_name
270+
user
271+
select * from v2i;
272+
table_name
273+
select * from v3d;
274+
schema_name
275+
mysql
276+
select * from v3i;
277+
schema_name
278+
select * from v4d;
279+
routine_name
280+
rootonly
281+
select * from v4i;
282+
routine_name
283+
select * from v5d;
284+
view_definition > ''
285+
1
286+
select * from v5i;
287+
view_definition > ''
288+
0
289+
connection default;
290+
select * from v1d;
291+
current_user() user
292+
root@localhost foo
293+
root@localhost root
294+
select * from v1i;
295+
current_user() user
296+
root@localhost foo
297+
root@localhost root
298+
select * from v2d;
299+
table_name
300+
user
301+
select * from v2i;
302+
table_name
303+
user
304+
select * from v3d;
305+
schema_name
306+
mysql
307+
select * from v3i;
308+
schema_name
309+
mysql
310+
select * from v4d;
311+
routine_name
312+
rootonly
313+
select * from v4i;
314+
routine_name
315+
rootonly
316+
select * from v5d;
317+
view_definition > ''
318+
1
319+
select * from v5i;
320+
view_definition > ''
321+
1
322+
disconnect foo;
323+
drop view v1d, v1i, v2d, v2i, v3d, v3i, v4d, v4i, v5d, v5i;
324+
drop user foo@localhost;
325+
drop procedure rootonly;

mysql-test/main/information_schema_db.test

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,3 +255,47 @@ disconnect user1;
255255
connection default;
256256

257257
set global sql_mode=default;
258+
259+
#
260+
# MDEV-20549 SQL SECURITY DEFINER does not work for INFORMATION_SCHEMA tables
261+
#
262+
263+
create user foo@localhost;
264+
grant select on test.* to foo@localhost;
265+
create procedure rootonly() select 1;
266+
create sql security definer view v1d as select current_user(),user from information_schema.processlist;
267+
create sql security invoker view v1i as select current_user(),user from information_schema.processlist;
268+
create sql security definer view v2d as select table_name from information_schema.tables where table_schema='mysql' and table_name like '%user%';
269+
create sql security invoker view v2i as select table_name from information_schema.tables where table_schema='mysql' and table_name like '%user%';
270+
create sql security definer view v3d as select schema_name from information_schema.schemata where schema_name like '%mysql%';
271+
create sql security invoker view v3i as select schema_name from information_schema.schemata where schema_name like '%mysql%';
272+
create sql security definer view v4d as select routine_name from information_schema.routines where routine_schema='test';
273+
create sql security invoker view v4i as select routine_name from information_schema.routines where routine_schema='test';
274+
create sql security definer view v5d as select view_definition > '' from information_schema.views where table_name='v1d';
275+
create sql security invoker view v5i as select view_definition > '' from information_schema.views where table_name='v1d';
276+
connect foo,localhost,foo;
277+
select * from v1d;
278+
select * from v1i;
279+
select * from v2d;
280+
select * from v2i;
281+
select * from v3d;
282+
select * from v3i;
283+
select * from v4d;
284+
select * from v4i;
285+
select * from v5d;
286+
select * from v5i;
287+
connection default;
288+
select * from v1d;
289+
select * from v1i;
290+
select * from v2d;
291+
select * from v2i;
292+
select * from v3d;
293+
select * from v3i;
294+
select * from v4d;
295+
select * from v4i;
296+
select * from v5d;
297+
select * from v5i;
298+
disconnect foo;
299+
drop view v1d, v1i, v2d, v2i, v3d, v3i, v4d, v4i, v5d, v5i;
300+
drop user foo@localhost;
301+
drop procedure rootonly;

mysql-test/main/processlist.result

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ select command, time < 5 from information_schema.processlist where id != connect
2323
command time < 5
2424
Sleep 1
2525
disconnect con1;
26-
set debug_sync='reset';
2726
connection default;
27+
set debug_sync='reset';
28+
End of 5.5 tests
2829
#
2930
# 10.1 tests
3031
#

0 commit comments

Comments
 (0)