Skip to content

Commit dece4bc

Browse files
committed
cleanup: make assert more readable
1 parent 63d3ccd commit dece4bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sql/log_event.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9692,8 +9692,8 @@ bool Table_map_log_event::write_data_body(IO_CACHE *file)
96929692
DBUG_ASSERT(m_dbnam != NULL);
96939693
DBUG_ASSERT(m_tblnam != NULL);
96949694
/* We use only one byte per length for storage in event: */
9695-
DBUG_ASSERT(m_dblen <= NAME_LEN);
9696-
DBUG_ASSERT(m_tbllen <= NAME_LEN);
9695+
DBUG_ASSERT(m_dblen <= min(NAME_LEN, 255));
9696+
DBUG_ASSERT(m_tbllen <= min(NAME_LEN, 255));
96979697

96989698
uchar const dbuf[]= { (uchar) m_dblen };
96999699
uchar const tbuf[]= { (uchar) m_tbllen };

0 commit comments

Comments
 (0)