Skip to content

Commit d5f4812

Browse files
committed
Merge branch 'mysql-5.6' into mysql-5.7
2 parents 1705917 + e85a5e6 commit d5f4812

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
SELECT "Digest table has a size 1 and is full already." as use_case;
2+
use_case
3+
Digest table has a size 1 and is full already.
4+
select SCHEMA_NAME, DIGEST, DIGEST_TEXT
5+
from performance_schema.events_statements_summary_by_digest;
6+
SCHEMA_NAME DIGEST DIGEST_TEXT
7+
NULL NULL NULL
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--performance-schema-digests-size=1
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# -----------------------------------------------------------------------
2+
# Tests for the performance schema statement Digests.
3+
# -----------------------------------------------------------------------
4+
5+
--source include/not_embedded.inc
6+
--source include/have_perfschema.inc
7+
--source include/no_protocol.inc
8+
9+
SELECT "Digest table has a size 1 and is full already." as use_case;
10+
11+
select SCHEMA_NAME, DIGEST, DIGEST_TEXT
12+
from performance_schema.events_statements_summary_by_digest;
13+
14+
15+

storage/perfschema/pfs_digest.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -265,10 +265,11 @@ find_or_create_digest(PFS_thread *thread,
265265
if (safe_index == 0)
266266
{
267267
/* Record [0] is reserved. */
268-
safe_index= 1;
268+
continue;
269269
}
270270

271271
/* Add a new record in digest stat array. */
272+
DBUG_ASSERT(safe_index < digest_max);
272273
pfs= &statements_digest_stat_array[safe_index];
273274

274275
if (pfs->m_lock.is_free())

0 commit comments

Comments
 (0)