Skip to content

Commit

Permalink
Remove a bunch of TODO's, fix perfschema.threads_innodb test
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed Sep 11, 2016
1 parent d019af4 commit dc900cc
Show file tree
Hide file tree
Showing 23 changed files with 90 additions and 304 deletions.
1 change: 1 addition & 0 deletions include/my_global.h
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,7 @@ static inline bool isfinite(double x) { return std::isfinite(x); }
#ifndef HAVE_ISNAN
#define isnan(x) ((x) != (x))
#endif
#define my_isnan(x) isnan(x)

#ifdef HAVE_ISINF
#define my_isinf(X) isinf(X)
Expand Down
5 changes: 4 additions & 1 deletion mysql-test/suite/perfschema/r/threads_innodb.result
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ FROM performance_schema.threads
WHERE name LIKE 'thread/innodb/%'
GROUP BY name;
name type processlist_user processlist_host processlist_db processlist_command processlist_time processlist_state processlist_info parent_thread_id role instrumented
thread/innodb/io_handler_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
thread/innodb/io_ibuf_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
thread/innodb/io_log_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
thread/innodb/io_read_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
thread/innodb/io_write_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
thread/innodb/page_cleaner_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
thread/innodb/srv_error_monitor_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
thread/innodb/srv_lock_timeout_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
Expand Down
2 changes: 2 additions & 0 deletions sql/share/errmsg-utf8.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7150,6 +7150,8 @@ skip-to-error-number 3000

ER_MYSQL_57_TEST
eng "5.7 test"
ER_WRONG_TABLESPACE_NAME 42000
eng "Incorrect tablespace name %`-.192s"
ER_CANNOT_DISCARD_TEMPORARY_TABLE
eng "Cannot DISCARD/IMPORT tablespace associated with temporary table"

Expand Down
4 changes: 0 additions & 4 deletions storage/innobase/buf/buf0dump.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ Created April 08, 2011 Vasil Dimov

#include "my_global.h"
#include "my_sys.h"
/* JAN: TODO: missing MySQL 5.7 include */
#ifdef HAVE_MY_THREAD_H
// #include "my_thread.h"
#endif

#include "mysql/psi/mysql_stage.h"
#include "mysql/psi/psi.h"
Expand Down
2 changes: 0 additions & 2 deletions storage/innobase/buf/buf0flu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3139,9 +3139,7 @@ DECLARE_THREAD(buf_flush_page_cleaner_coordinator)(

my_thread_init();
#ifdef UNIV_PFS_THREAD
/* JAN: TODO: MySQL 5.7 PSI
pfs_register_thread(page_cleaner_thread_key);
*/
#endif /* UNIV_PFS_THREAD */

#ifdef UNIV_DEBUG_THREAD_CREATION
Expand Down
4 changes: 0 additions & 4 deletions storage/innobase/dict/dict0stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2832,14 +2832,11 @@ dict_stats_fetch_index_stats_step(
#define PFX "n_diff_pfx"
#define PFX_LEN 10

/** JAN: TODO: MySQL 5.7 native_strncasecmp() */
if (stat_name_len == 4 /* strlen("size") */
// && native_strncasecmp("size", stat_name, stat_name_len) == 0) {
&& strncasecmp("size", stat_name, stat_name_len) == 0) {
index->stat_index_size = (ulint) stat_value;
arg->stats_were_modified = true;
} else if (stat_name_len == 12 /* strlen("n_leaf_pages") */
// && native_strncasecmp("n_leaf_pages", stat_name, stat_name_len)
&& strncasecmp("n_leaf_pages", stat_name, stat_name_len)
== 0) {
index->stat_n_leaf_pages = (ulint) stat_value;
Expand All @@ -2855,7 +2852,6 @@ dict_stats_fetch_index_stats_step(
index->stat_defrag_n_pages_freed = (ulint) stat_value;
arg->stats_were_modified = true;
} else if (stat_name_len > PFX_LEN /* e.g. stat_name=="n_diff_pfx01" */
// && native_strncasecmp(PFX, stat_name, PFX_LEN) == 0) {
&& strncasecmp(PFX, stat_name, PFX_LEN) == 0) {

const char* num_ptr;
Expand Down
4 changes: 2 additions & 2 deletions storage/innobase/fil/fil0fil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7224,7 +7224,7 @@ fil_no_punch_hole(fil_node_t* node)
node->punch_hole = false;
}

#ifdef MYSQL_COMPRESSION_ENCRYPTION
#ifdef MYSQL_COMPRESSION

/** Set the compression type for the tablespace of a table
@param[in] table The table that should be compressed
Expand Down Expand Up @@ -7412,7 +7412,7 @@ fil_encryption_rotate()

return(true);
}
#endif /* MYSQL_COMPRESSION_ENCRYPTION */
#endif /* MYSQL_COMPRESSION */

/** Build the basic folder name from the path and length provided
@param[in] path pathname (may also include the file basename)
Expand Down
10 changes: 2 additions & 8 deletions storage/innobase/fts/fts0fts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4840,9 +4840,7 @@ fts_check_token(
n_chars = 0;

while (next < end) {
/* TODO: JAN: MySQL 5.7 used my_mbcharlen_ptr here
char_len = my_mbcharlen_ptr(cs, next, end);*/
char_len = cs->cset->charlen(cs, (const uchar*)next, (const uchar*)end);
char_len = my_charlen(cs, next, end);

if (next + char_len > end || char_len == 0) {
break;
Expand Down Expand Up @@ -4875,9 +4873,7 @@ fts_check_token(
}

/* Move a char forward */
/* JAN: TODO: MySQL 5.7
start += my_mbcharlen_ptr(cs, start, end); */
start += cs->cset->charlen(cs, (const uchar*)next, (const uchar*)end);
start += my_charlen(cs, start, end);
n_chars = ngram_token_size - 1;
}
}
Expand Down Expand Up @@ -5031,8 +5027,6 @@ int
fts_tokenize_document_internal(
/*===========================*/
MYSQL_FTPARSER_PARAM* param, /*!< in: parser parameter */
/* JAN: TODO: MySQL 5.7
char* doc,*/
const char* doc,/*!< in/out: document */
int len) /*!< in: document length */
{
Expand Down
2 changes: 0 additions & 2 deletions storage/innobase/gis/gis0geo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,9 @@ mbr_join_square(
} while (a != end);

/* Check for infinity or NaN, so we don't get NaN in calculations */
/* JAN: TODO: MYSQL 5.7 GIS
if (my_isinf(square) || my_isnan(square)) {
return DBL_MAX;
}
*/

return square;
}
Expand Down
2 changes: 0 additions & 2 deletions storage/innobase/gis/gis0rtree.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1988,11 +1988,9 @@ rtr_estimate_n_rows_in_range(
mtr_commit(&mtr);
mem_heap_free(heap);

/* JAN: TODO MYSQL 5.7 GIS
if (my_isinf(area) || my_isnan(area)) {
return(HA_POS_ERROR);
}
*/

return(static_cast<int64_t>(dict_table_get_n_rows(index->table)
* area / n_recs));
Expand Down
Loading

0 comments on commit dc900cc

Please sign in to comment.