Merge branch '5.5' into 10.0
This commit is contained in:
commit
3ead951180
6
.gitignore
vendored
6
.gitignore
vendored
@ -461,3 +461,9 @@ UpgradeLog*.htm
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# macOS garbage
|
||||
.DS_Store
|
||||
|
||||
# QtCreator && CodeBlocks
|
||||
*.cbp
|
||||
|
@ -378,6 +378,10 @@ INCLUDE(maintainer)
|
||||
|
||||
IF(WITH_UNIT_TESTS)
|
||||
ENABLE_TESTING()
|
||||
# This is the only instance where ADD_TEST should be used,
|
||||
# to make sure that make test will run MTR,
|
||||
# use MY_ADD_TEST macro to add other tests
|
||||
ADD_TEST(NAME MTR COMMAND ./mysql-test-run WORKING_DIRECTORY "mysql-test")
|
||||
ADD_SUBDIRECTORY(unittest/mytap)
|
||||
ADD_SUBDIRECTORY(unittest/strings)
|
||||
ADD_SUBDIRECTORY(unittest/examples)
|
||||
|
@ -4893,6 +4893,14 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
|
||||
if (opt_xml)
|
||||
print_xml_tag(md_result_file, "", "\n", "database", "name=", db, NullS);
|
||||
|
||||
|
||||
/* obtain dump of routines (procs/functions) */
|
||||
if (opt_routines && mysql_get_server_version(mysql) >= 50009)
|
||||
{
|
||||
DBUG_PRINT("info", ("Dumping routines for database %s", db));
|
||||
dump_routines_for_db(db);
|
||||
}
|
||||
|
||||
if (opt_single_transaction && mysql_get_server_version(mysql) >= 50500)
|
||||
{
|
||||
verbose_msg("-- Setting savepoint...\n");
|
||||
@ -4902,7 +4910,6 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Dump each selected table */
|
||||
for (pos= dump_tables; pos < end; pos++)
|
||||
{
|
||||
@ -4964,12 +4971,6 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
|
||||
DBUG_PRINT("info", ("Dumping events for database %s", db));
|
||||
dump_events_for_db(db);
|
||||
}
|
||||
/* obtain dump of routines (procs/functions) */
|
||||
if (opt_routines && mysql_get_server_version(mysql) >= 50009)
|
||||
{
|
||||
DBUG_PRINT("info", ("Dumping routines for database %s", db));
|
||||
dump_routines_for_db(db);
|
||||
}
|
||||
free_root(&glob_root, MYF(0));
|
||||
if (opt_xml)
|
||||
{
|
||||
|
@ -853,7 +853,7 @@ build_table_string(void)
|
||||
|
||||
if (auto_generate_sql_guid_primary)
|
||||
{
|
||||
dynstr_append(&table_string, "id varchar(32) primary key");
|
||||
dynstr_append(&table_string, "id varchar(36) primary key");
|
||||
|
||||
if (num_int_cols || num_char_cols || auto_generate_sql_guid_primary)
|
||||
dynstr_append(&table_string, ",");
|
||||
@ -868,7 +868,7 @@ build_table_string(void)
|
||||
if (count) /* Except for the first pass we add a comma */
|
||||
dynstr_append(&table_string, ",");
|
||||
|
||||
if (snprintf(buf, HUGE_STRING_LENGTH, "id%d varchar(32) unique key", count)
|
||||
if (snprintf(buf, HUGE_STRING_LENGTH, "id%d varchar(36) unique key", count)
|
||||
> HUGE_STRING_LENGTH)
|
||||
{
|
||||
fprintf(stderr, "Memory Allocation error in create table\n");
|
||||
|
@ -2,7 +2,7 @@
|
||||
INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/cmake_parse_arguments.cmake)
|
||||
|
||||
MACRO(MY_ADD_TEST name)
|
||||
ADD_TEST(${name} ${name}-t)
|
||||
ADD_TEST(NAME ${name} COMMAND ${name}-t CONFIGURATIONS default_ignore)
|
||||
ENDMACRO()
|
||||
|
||||
MACRO (MY_ADD_TESTS)
|
||||
|
@ -6128,7 +6128,7 @@ sub lldb_arguments {
|
||||
$input = $input ? "< $input" : "";
|
||||
|
||||
# write init file for mysqld or client
|
||||
mtr_tofile($lldb_init_file, "set args $str $input\n");
|
||||
mtr_tofile($lldb_init_file, "process launch --stop-at-entry -- $str $input\n");
|
||||
|
||||
print "\nTo start lldb for $type, type in another window:\n";
|
||||
print "cd $glob_mysql_test_dir && lldb -s $lldb_init_file $$exe\n";
|
||||
|
@ -146,3 +146,19 @@ a
|
||||
16
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# mdev-16235: SELECT over a table with LIMIT 0
|
||||
#
|
||||
EXPLAIN
|
||||
SELECT * FROM mysql.slow_log WHERE sql_text != 'foo' LIMIT 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Zero limit
|
||||
SELECT * FROM mysql.slow_log WHERE sql_text != 'foo' LIMIT 0;
|
||||
start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text
|
||||
EXPLAIN
|
||||
SELECT * FROM mysql.help_topic WHERE help_category_id != example LIMIT 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Zero limit
|
||||
SELECT * FROM mysql.help_topic WHERE help_category_id != example LIMIT 0;
|
||||
help_topic_id name help_category_id description example url
|
||||
End of 5.5 tests
|
||||
|
@ -5404,3 +5404,18 @@ DELIMITER ;
|
||||
ALTER DATABASE `a\"'``b` CHARACTER SET utf8 COLLATE utf8_general_ci ;
|
||||
DROP DATABASE `a\"'``b`;
|
||||
FOUND /Database: mysql/ in bug11505.sql
|
||||
#
|
||||
# MDEV-15021: Fix the order in which routines are called
|
||||
#
|
||||
use test;
|
||||
CREATE FUNCTION f() RETURNS INT RETURN 1;
|
||||
CREATE VIEW v1 AS SELECT f();
|
||||
# Running mysqldump -uroot test --routines --tables v1 > **vardir**/test.dmp
|
||||
DROP VIEW v1;
|
||||
DROP FUNCTION f;
|
||||
# Running mysql -uroot test < **vardir**/test.dmp
|
||||
#
|
||||
# Cleanup after succesful import.
|
||||
#
|
||||
DROP VIEW v1;
|
||||
DROP FUNCTION f;
|
||||
|
@ -255,3 +255,6 @@ Benchmark
|
||||
# MDEV-4684 - Enhancement request: --init-command support for mysqlslap
|
||||
#
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug MDEV-15789 (Upstream: #80329): MYSQLSLAP OPTIONS --AUTO-GENERATE-SQL-GUID-PRIMARY and --AUTO-GENERATE-SQL-SECONDARY-INDEXES DONT WORK
|
||||
#
|
||||
|
@ -2499,7 +2499,7 @@ SELECT 2 IN (SELECT 2 from DUAL WHERE 1 != 1);
|
||||
SET optimizer_switch= @@global.optimizer_switch;
|
||||
set @@tmp_table_size= @@global.tmp_table_size;
|
||||
#
|
||||
# mfrv-14515: Wrong results for tableless query with subquery in WHERE
|
||||
# mdev-14515: Wrong results for tableless query with subquery in WHERE
|
||||
# and implicit aggregation
|
||||
#
|
||||
create table t1 (i1 int, i2 int);
|
||||
|
@ -334,7 +334,7 @@ SELECT * FROM t1
|
||||
WHERE (f1) IN (SELECT f1 FROM t2)
|
||||
LIMIT 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
|
||||
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Zero limit
|
||||
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
|
||||
SELECT * FROM t1
|
||||
WHERE (f1) IN (SELECT f1 FROM t2)
|
||||
|
@ -1634,3 +1634,60 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 11 func 1
|
||||
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 Using where
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# MDEV-16225: wrong resultset from query with semijoin=on
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
`id` int(10) NOT NULL AUTO_INCREMENT,
|
||||
`local_name` varchar(64) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1;
|
||||
insert into t1(`id`,`local_name`) values
|
||||
(1,'Cash Advance'),
|
||||
(2,'Cash Advance'),
|
||||
(3,'Rollover'),
|
||||
(4,'AL Installment'),
|
||||
(5,'AL Installment'),
|
||||
(6,'AL Installment'),
|
||||
(7,'AL Installment'),
|
||||
(8,'AL Installment'),
|
||||
(9,'AL Installment'),
|
||||
(10,'Internet Payday'),
|
||||
(11,'Rollover - Internet Payday'),
|
||||
(12,'AL Monthly Installment'),
|
||||
(13,'AL Semi-Monthly Installment');
|
||||
explain
|
||||
SELECT SQL_NO_CACHE t.id
|
||||
FROM t1 t
|
||||
WHERE (
|
||||
t.id IN (SELECT A.id FROM t1 AS A WHERE A.local_name IN (SELECT B.local_name FROM t1 AS B WHERE B.id IN (0,4,12,13,1,10,3,11)))
|
||||
OR
|
||||
(t.id IN (0,4,12,13,1,10,3,11))
|
||||
);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t index PRIMARY PRIMARY 4 NULL 13 Using where; Using index
|
||||
2 MATERIALIZED <subquery3> ALL distinct_key NULL NULL NULL 8
|
||||
2 MATERIALIZED A ALL PRIMARY NULL NULL NULL 13 Using where; Using join buffer (flat, BNL join)
|
||||
3 MATERIALIZED B ALL PRIMARY NULL NULL NULL 13 Using where
|
||||
SELECT SQL_NO_CACHE t.id
|
||||
FROM t1 t
|
||||
WHERE (
|
||||
t.id IN (SELECT A.id FROM t1 AS A WHERE A.local_name IN (SELECT B.local_name FROM t1 AS B WHERE B.id IN (0,4,12,13,1,10,3,11)))
|
||||
OR
|
||||
(t.id IN (0,4,12,13,1,10,3,11))
|
||||
);
|
||||
id
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
drop table t1;
|
||||
|
@ -40,7 +40,7 @@ sub start_test {
|
||||
return "Not run for embedded server" if $::opt_embedded_server;
|
||||
return "Not configured to run ctest" unless -f "../CTestTestfile.cmake";
|
||||
my ($ctest_vs)= $opt_vs_config ? "--build-config $opt_vs_config" : "";
|
||||
my (@ctest_list)= `cd .. && ctest $opt_vs_config --show-only --verbose`;
|
||||
my (@ctest_list)= `cd .. && ctest $opt_vs_config -E MTR -C default_ignore --show-only --verbose`;
|
||||
return "No ctest" if $?;
|
||||
|
||||
my ($command, %tests);
|
||||
|
@ -115,3 +115,17 @@ SELECT a FROM t1 ORDER BY a LIMIT 2 OFFSET 14;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
--echo #
|
||||
--echo # mdev-16235: SELECT over a table with LIMIT 0
|
||||
--echo #
|
||||
|
||||
EXPLAIN
|
||||
SELECT * FROM mysql.slow_log WHERE sql_text != 'foo' LIMIT 0;
|
||||
SELECT * FROM mysql.slow_log WHERE sql_text != 'foo' LIMIT 0;
|
||||
|
||||
EXPLAIN
|
||||
SELECT * FROM mysql.help_topic WHERE help_category_id != example LIMIT 0;
|
||||
SELECT * FROM mysql.help_topic WHERE help_category_id != example LIMIT 0;
|
||||
|
||||
--echo End of 5.5 tests
|
||||
|
@ -2570,3 +2570,25 @@ let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/bug11505.sql;
|
||||
let SEARCH_PATTERN=Database: mysql;
|
||||
exec $MYSQL_DUMP mysql func > $SEARCH_FILE;
|
||||
source include/search_pattern_in_file.inc;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-15021: Fix the order in which routines are called
|
||||
--echo #
|
||||
use test;
|
||||
CREATE FUNCTION f() RETURNS INT RETURN 1;
|
||||
CREATE VIEW v1 AS SELECT f();
|
||||
|
||||
--echo # Running mysqldump -uroot test --routines --tables v1 > **vardir**/test.dmp
|
||||
--exec $MYSQL_DUMP -uroot test --routines --tables v1 > $MYSQLTEST_VARDIR/test.dmp
|
||||
|
||||
DROP VIEW v1;
|
||||
DROP FUNCTION f;
|
||||
|
||||
--echo # Running mysql -uroot test < **vardir**/test.dmp
|
||||
--exec $MYSQL -uroot test < $MYSQLTEST_VARDIR/test.dmp
|
||||
|
||||
--echo #
|
||||
--echo # Cleanup after succesful import.
|
||||
--echo #
|
||||
DROP VIEW v1;
|
||||
DROP FUNCTION f;
|
||||
|
@ -80,3 +80,11 @@ DROP DATABASE bug58090;
|
||||
|
||||
--exec $MYSQL_SLAP --create-schema=test --init-command="CREATE TABLE t1(a INT)" --silent --concurrency=1 --iterations=1
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug MDEV-15789 (Upstream: #80329): MYSQLSLAP OPTIONS --AUTO-GENERATE-SQL-GUID-PRIMARY and --AUTO-GENERATE-SQL-SECONDARY-INDEXES DONT WORK
|
||||
--echo #
|
||||
|
||||
--exec $MYSQL_SLAP --concurrency=1 --silent --iterations=1 --number-int-cols=2 --number-char-cols=3 --auto-generate-sql --auto-generate-sql-guid-primary --create-schema=slap
|
||||
|
||||
--exec $MYSQL_SLAP --concurrency=1 --silent --iterations=1 --number-int-cols=2 --number-char-cols=3 --auto-generate-sql --auto-generate-sql-secondary-indexes=1 --create-schema=slap
|
||||
|
@ -2044,7 +2044,7 @@ SET optimizer_switch= @@global.optimizer_switch;
|
||||
set @@tmp_table_size= @@global.tmp_table_size;
|
||||
|
||||
--echo #
|
||||
--echo # mfrv-14515: Wrong results for tableless query with subquery in WHERE
|
||||
--echo # mdev-14515: Wrong results for tableless query with subquery in WHERE
|
||||
--echo # and implicit aggregation
|
||||
--echo #
|
||||
|
||||
|
@ -303,3 +303,45 @@ eval $q;
|
||||
eval explain $q;
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-16225: wrong resultset from query with semijoin=on
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (
|
||||
`id` int(10) NOT NULL AUTO_INCREMENT,
|
||||
`local_name` varchar(64) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1;
|
||||
|
||||
insert into t1(`id`,`local_name`) values
|
||||
(1,'Cash Advance'),
|
||||
(2,'Cash Advance'),
|
||||
(3,'Rollover'),
|
||||
(4,'AL Installment'),
|
||||
(5,'AL Installment'),
|
||||
(6,'AL Installment'),
|
||||
(7,'AL Installment'),
|
||||
(8,'AL Installment'),
|
||||
(9,'AL Installment'),
|
||||
(10,'Internet Payday'),
|
||||
(11,'Rollover - Internet Payday'),
|
||||
(12,'AL Monthly Installment'),
|
||||
(13,'AL Semi-Monthly Installment');
|
||||
|
||||
explain
|
||||
SELECT SQL_NO_CACHE t.id
|
||||
FROM t1 t
|
||||
WHERE (
|
||||
t.id IN (SELECT A.id FROM t1 AS A WHERE A.local_name IN (SELECT B.local_name FROM t1 AS B WHERE B.id IN (0,4,12,13,1,10,3,11)))
|
||||
OR
|
||||
(t.id IN (0,4,12,13,1,10,3,11))
|
||||
);
|
||||
SELECT SQL_NO_CACHE t.id
|
||||
FROM t1 t
|
||||
WHERE (
|
||||
t.id IN (SELECT A.id FROM t1 AS A WHERE A.local_name IN (SELECT B.local_name FROM t1 AS B WHERE B.id IN (0,4,12,13,1,10,3,11)))
|
||||
OR
|
||||
(t.id IN (0,4,12,13,1,10,3,11))
|
||||
);
|
||||
drop table t1;
|
||||
|
@ -2518,6 +2518,10 @@ static int send_client_reply_packet(MCPVIO_EXT *mpvio,
|
||||
mysql->client_flag|= CLIENT_MULTI_RESULTS;
|
||||
|
||||
#ifdef HAVE_OPENSSL
|
||||
if (mysql->options.ssl_key || mysql->options.ssl_cert ||
|
||||
mysql->options.ssl_ca || mysql->options.ssl_capath ||
|
||||
mysql->options.ssl_cipher)
|
||||
mysql->options.use_ssl = 1;
|
||||
if (mysql->options.use_ssl)
|
||||
mysql->client_flag|= CLIENT_SSL;
|
||||
#endif /* HAVE_OPENSSL */
|
||||
|
@ -6160,6 +6160,9 @@ find_field_in_natural_join(THD *thd, TABLE_LIST *table_ref, const char *name,
|
||||
column reference. See create_view_field() for details.
|
||||
*/
|
||||
item= nj_col->create_item(thd);
|
||||
if (!item)
|
||||
DBUG_RETURN(NULL);
|
||||
|
||||
/*
|
||||
*ref != NULL means that *ref contains the item that we need to
|
||||
replace. If the item was aliased by the user, set the alias to
|
||||
|
@ -1245,10 +1245,19 @@ TODO: make view to decide if it is possible to write to WHERE directly or make S
|
||||
if (cond_value == Item::COND_FALSE || having_value == Item::COND_FALSE ||
|
||||
(!unit->select_limit_cnt && !(select_options & OPTION_FOUND_ROWS)))
|
||||
{ /* Impossible cond */
|
||||
DBUG_PRINT("info", (having_value == Item::COND_FALSE ?
|
||||
"Impossible HAVING" : "Impossible WHERE"));
|
||||
zero_result_cause= having_value == Item::COND_FALSE ?
|
||||
"Impossible HAVING" : "Impossible WHERE";
|
||||
if (unit->select_limit_cnt)
|
||||
{
|
||||
DBUG_PRINT("info", (having_value == Item::COND_FALSE ?
|
||||
"Impossible HAVING" : "Impossible WHERE"));
|
||||
zero_result_cause= having_value == Item::COND_FALSE ?
|
||||
"Impossible HAVING" : "Impossible WHERE";
|
||||
}
|
||||
else
|
||||
{
|
||||
DBUG_PRINT("info", ("Zero limit"));
|
||||
zero_result_cause= "Zero limit";
|
||||
conds= 0;
|
||||
}
|
||||
table_count= top_join_tab_count= 0;
|
||||
error= 0;
|
||||
goto setup_subq_exit;
|
||||
@ -24803,21 +24812,18 @@ void JOIN::set_allowed_join_cache_types()
|
||||
|
||||
void JOIN::save_query_plan(Join_plan_state *save_to)
|
||||
{
|
||||
if (keyuse.elements)
|
||||
{
|
||||
DYNAMIC_ARRAY tmp_keyuse;
|
||||
/* Swap the current and the backup keyuse internal arrays. */
|
||||
tmp_keyuse= keyuse;
|
||||
keyuse= save_to->keyuse; /* keyuse is reset to an empty array. */
|
||||
save_to->keyuse= tmp_keyuse;
|
||||
DYNAMIC_ARRAY tmp_keyuse;
|
||||
/* Swap the current and the backup keyuse internal arrays. */
|
||||
tmp_keyuse= keyuse;
|
||||
keyuse= save_to->keyuse; /* keyuse is reset to an empty array. */
|
||||
save_to->keyuse= tmp_keyuse;
|
||||
|
||||
for (uint i= 0; i < table_count; i++)
|
||||
{
|
||||
save_to->join_tab_keyuse[i]= join_tab[i].keyuse;
|
||||
join_tab[i].keyuse= NULL;
|
||||
save_to->join_tab_checked_keys[i]= join_tab[i].checked_keys;
|
||||
join_tab[i].checked_keys.clear_all();
|
||||
}
|
||||
for (uint i= 0; i < table_count; i++)
|
||||
{
|
||||
save_to->join_tab_keyuse[i]= join_tab[i].keyuse;
|
||||
join_tab[i].keyuse= NULL;
|
||||
save_to->join_tab_checked_keys[i]= join_tab[i].checked_keys;
|
||||
join_tab[i].checked_keys.clear_all();
|
||||
}
|
||||
memcpy((uchar*) save_to->best_positions, (uchar*) best_positions,
|
||||
sizeof(POSITION) * (table_count + 1));
|
||||
@ -24855,20 +24861,17 @@ void JOIN::reset_query_plan()
|
||||
|
||||
void JOIN::restore_query_plan(Join_plan_state *restore_from)
|
||||
{
|
||||
if (restore_from->keyuse.elements)
|
||||
DYNAMIC_ARRAY tmp_keyuse;
|
||||
tmp_keyuse= keyuse;
|
||||
keyuse= restore_from->keyuse;
|
||||
restore_from->keyuse= tmp_keyuse;
|
||||
|
||||
for (uint i= 0; i < table_count; i++)
|
||||
{
|
||||
DYNAMIC_ARRAY tmp_keyuse;
|
||||
tmp_keyuse= keyuse;
|
||||
keyuse= restore_from->keyuse;
|
||||
restore_from->keyuse= tmp_keyuse;
|
||||
|
||||
for (uint i= 0; i < table_count; i++)
|
||||
{
|
||||
join_tab[i].keyuse= restore_from->join_tab_keyuse[i];
|
||||
join_tab[i].checked_keys= restore_from->join_tab_checked_keys[i];
|
||||
}
|
||||
|
||||
join_tab[i].keyuse= restore_from->join_tab_keyuse[i];
|
||||
join_tab[i].checked_keys= restore_from->join_tab_checked_keys[i];
|
||||
}
|
||||
|
||||
memcpy((uchar*) best_positions, (uchar*) restore_from->best_positions,
|
||||
sizeof(POSITION) * (table_count + 1));
|
||||
/* Restore SJM nests */
|
||||
|
@ -5336,6 +5336,8 @@ Item *create_view_field(THD *thd, TABLE_LIST *view, Item **field_ref,
|
||||
Item *item= new Item_direct_view_ref(&view->view->select_lex.context,
|
||||
field_ref, view->alias,
|
||||
name, view);
|
||||
if (!item)
|
||||
return NULL;
|
||||
/*
|
||||
Force creation of nullable item for the result tmp table for outer joined
|
||||
views/derived tables.
|
||||
|
@ -23,6 +23,12 @@ IF(NOT LIBJEMALLOC)
|
||||
MESSAGE(WARNING "TokuDB is enabled, but jemalloc is not. This configuration is not supported")
|
||||
ENDIF()
|
||||
|
||||
CHECK_C_COMPILER_FLAG("-Wshadow" HAVE_WSHADOW)
|
||||
IF (HAVE_WSHADOW)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-shadow")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-shadow")
|
||||
ENDIF()
|
||||
|
||||
IF (HAVE_WVLA)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-vla")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-vla")
|
||||
|
@ -107,7 +107,7 @@ size_t toku_malloc_usable_size(void *p) __attribute__((__visibility__("default")
|
||||
#define XMALLOC(v) CAST_FROM_VOIDP(v, toku_xmalloc(sizeof(*v)))
|
||||
#define XMALLOC_N(n,v) CAST_FROM_VOIDP(v, toku_xmalloc((n)*sizeof(*v)))
|
||||
#define XCALLOC_N(n,v) CAST_FROM_VOIDP(v, toku_xcalloc((n), (sizeof(*v))))
|
||||
#define XCALLOC(v) XCALLOC_N(1,(v))
|
||||
#define XCALLOC(v) XCALLOC_N(1,v)
|
||||
#define XREALLOC(v,s) CAST_FROM_VOIDP(v, toku_xrealloc(v, s))
|
||||
#define XREALLOC_N(n,v) CAST_FROM_VOIDP(v, toku_xrealloc(v, (n)*sizeof(*v)))
|
||||
|
||||
|
@ -80,8 +80,8 @@ void dmt<dmtdata_t, dmtdataout_t, dmtwriter_t>::create_from_sorted_memory_of_fix
|
||||
paranoid_invariant(numvalues > 0);
|
||||
void *ptr = toku_mempool_malloc(&this->mp, aligned_memsize);
|
||||
paranoid_invariant_notnull(ptr);
|
||||
uint8_t * const CAST_FROM_VOIDP(dest, ptr);
|
||||
const uint8_t * const CAST_FROM_VOIDP(src, mem);
|
||||
uint8_t * CAST_FROM_VOIDP(dest, ptr);
|
||||
const uint8_t * CAST_FROM_VOIDP(src, mem);
|
||||
if (pad_bytes == 0) {
|
||||
paranoid_invariant(aligned_memsize == mem_length);
|
||||
memcpy(dest, src, aligned_memsize);
|
||||
|
@ -127,7 +127,7 @@ public:
|
||||
paranoid_invariant(index != NODE_NULL);
|
||||
m_index = index;
|
||||
}
|
||||
} __attribute__((__packed__,aligned(4)));
|
||||
} ;
|
||||
|
||||
template<>
|
||||
class subtree_templated<true> {
|
||||
@ -184,7 +184,7 @@ public:
|
||||
inline void disable_bit(void) {
|
||||
m_bitfield &= MASK_INDEX;
|
||||
}
|
||||
} __attribute__((__packed__)) ;
|
||||
} ;
|
||||
|
||||
template<typename omtdata_t, bool subtree_supports_marks>
|
||||
class omt_node_templated {
|
||||
@ -197,7 +197,7 @@ public:
|
||||
// this needs to be in both implementations because we don't have
|
||||
// a "static if" the caller can use
|
||||
inline void clear_stolen_bits(void) {}
|
||||
} __attribute__((__packed__,aligned(4)));
|
||||
} ;
|
||||
|
||||
template<typename omtdata_t>
|
||||
class omt_node_templated<omtdata_t, true> {
|
||||
@ -234,7 +234,7 @@ public:
|
||||
this->unset_marked_bit();
|
||||
this->unset_marks_below_bit();
|
||||
}
|
||||
} __attribute__((__packed__,aligned(4)));
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
|
@ -28,5 +28,4 @@ ELSE()
|
||||
ENDIF()
|
||||
|
||||
TARGET_LINK_LIBRARIES(explain_filename-t sql mytap)
|
||||
ADD_TEST(explain_filename explain_filename-t)
|
||||
|
||||
MY_ADD_TEST(explain_filename explain_filename-t)
|
||||
|
Loading…
x
Reference in New Issue
Block a user