Merge remote-tracking branch 'github/10.11' into 10.11

This commit is contained in:
Sergei Golubchik 2025-08-03 10:30:02 +02:00
commit 55a39f13e4
39 changed files with 234 additions and 113 deletions

View file

@ -1387,9 +1387,7 @@ int main(int argc,char *argv[])
if (opt_outfile)
end_tee();
mysql_end(0);
#ifndef _lint
DBUG_RETURN(0); // Keep compiler happy
#endif
DBUG_RETURN(0);
}
sig_handler mysql_end(int sig)
@ -3499,8 +3497,6 @@ static int com_go(String *buffer, char *)
old_buffer.copy();
}
/* Remove garbage for nicer messages */
LINT_INIT_STRUCT(buff[0]);
remove_cntrl(*buffer);
if (buffer->is_empty())

View file

@ -68,6 +68,14 @@ IF(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS
SET(MY_ERROR_FLAGS ${MY_ERROR_FLAGS} -Wno-error=non-virtual-dtor) # gcc bug 7302
ENDIF()
FOREACH(LANG C CXX)
IF(CMAKE_${LANG}_COMPILER_ID MATCHES "Clang")
MY_CHECK_AND_SET_COMPILER_FLAG(-Werror=uninitialized-explicit-init)
MY_CHECK_AND_SET_COMPILER_FLAG(-Werror=uninitialized-const-reference)
SET(CMAKE_${LANG}_FLAGS "${CMAKE_${LANG}_FLAGS} -Werror=uninitialized")
ENDIF()
ENDFOREACH()
IF(MYSQL_MAINTAINER_MODE MATCHES "OFF|WARN")
RETURN()
ELSEIF(MYSQL_MAINTAINER_MODE MATCHES "AUTO")

View file

@ -79,12 +79,6 @@ extern const char _dig_vec_lower[];
extern char *strmov_overlapp(char *dest, const char *src);
#if defined(_lint) || defined(FORCE_INIT_OF_VARS)
#define LINT_INIT_STRUCT(var) bzero(&var, sizeof(var)) /* No uninitialize-warning */
#else
#define LINT_INIT_STRUCT(var)
#endif
/* Prototypes for string functions */
extern void bmove_upp(uchar *dst,const uchar *src,size_t len);

View file

@ -24,7 +24,7 @@
#ifdef __cplusplus
extern "C" {
#endif
#if !defined(DBUG_OFF) && !defined(_lint)
#if !defined(DBUG_OFF)
struct _db_stack_frame_ {
const char *func; /* function name of the previous stack frame */
@ -210,7 +210,7 @@ extern void (*my_dbug_assert_failed)(const char *assert_expr, const char* file,
#define DBUG_ASSERT(A) do { } while(0)
#define IF_DBUG_ASSERT(A,B) B
#endif /* DBUG_ASSERT_AS_PRINTF */
#endif /* !defined(DBUG_OFF) && !defined(_lint) */
#endif /* !defined(DBUG_OFF) */
#ifdef EXTRA_DEBUG
/**

View file

@ -281,10 +281,6 @@ C_MODE_END
#error "Please add -fno-exceptions to CXXFLAGS and reconfigure/recompile"
#endif
#if defined(_lint) && !defined(lint)
#define lint
#endif
#ifndef stdin
#include <stdio.h>
#endif
@ -448,22 +444,19 @@ extern "C" int madvise(void *addr, size_t len, int behav);
/*
Suppress uninitialized variable warning without generating code.
*/
#if defined(__GNUC__)
/* GCC specific self-initialization which inhibits the warning. */
#if defined(__GNUC__) && !defined(WITH_UBSAN)
/*
GCC specific self-initialization which inhibits the warning.
clang and static analysis will complain loudly about this
so compile those under WITH_UBSAN.
*/
#define UNINIT_VAR(x) x= x
#elif defined(_lint) || defined(FORCE_INIT_OF_VARS)
#elif defined(FORCE_INIT_OF_VARS)
#define UNINIT_VAR(x) x= 0
#else
#define UNINIT_VAR(x) x
#endif
/* This is only to be used when resetting variables in a class constructor */
#if defined(_lint) || defined(FORCE_INIT_OF_VARS)
#define LINT_INIT(x) x= 0
#else
#define LINT_INIT(x)
#endif
#if !defined(HAVE_UINT)
#undef HAVE_UINT
#define HAVE_UINT
@ -505,7 +498,7 @@ C_MODE_END
#endif
/* We might be forced to turn debug off, if not turned off already */
#if (defined(FORCE_DBUG_OFF) || defined(_lint)) && !defined(DBUG_OFF)
#if defined(FORCE_DBUG_OFF) && !defined(DBUG_OFF)
# define DBUG_OFF
# ifdef DBUG_ON
# undef DBUG_ON
@ -527,7 +520,7 @@ typedef int my_socket; /* File descriptor for sockets */
#endif
/* Type for functions that handles signals */
#define sig_handler RETSIGTYPE
#if defined(__GNUC__) && !defined(_lint)
#if defined(__GNUC__)
typedef char pchar; /* Mixed prototypes can take char */
typedef char puchar; /* Mixed prototypes can take char */
typedef char pbool; /* Mixed prototypes can take char */

View file

@ -59,4 +59,39 @@ call p2('2');
drop table t1;
drop procedure p1;
drop procedure p2;
#
# MDEV-26115: Crash when calling stored function in FOR loop argument
#
CREATE OR REPLACE FUNCTION cnt()
RETURNS INTEGER NO SQL
BEGIN
RETURN 3;
END;
$
CREATE OR REPLACE PROCEDURE p1()
NO SQL
BEGIN
DECLARE i INTEGER;
FOR i IN 1..cnt() DO
SELECT 1;
END FOR;
END;
$
CALL p1();
1
1
1
1
1
1
CALL p1();
1
1
1
1
1
1
# Clean up
DROP FUNCTION cnt;
DROP PROCEDURE p1;
# End of 10.11 tests

View file

@ -67,4 +67,34 @@ drop table t1;
drop procedure p1;
drop procedure p2;
--echo #
--echo # MDEV-26115: Crash when calling stored function in FOR loop argument
--echo #
--delimiter $
CREATE OR REPLACE FUNCTION cnt()
RETURNS INTEGER NO SQL
BEGIN
RETURN 3;
END;
$
CREATE OR REPLACE PROCEDURE p1()
NO SQL
BEGIN
DECLARE i INTEGER;
FOR i IN 1..cnt() DO
SELECT 1;
END FOR;
END;
$
--delimiter ;
CALL p1();
CALL p1();
--echo # Clean up
DROP FUNCTION cnt;
DROP PROCEDURE p1;
--echo # End of 10.11 tests

View file

@ -35,4 +35,14 @@ CREATE TABLE t6 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
# Run innochecksum on t6
# Restore the original tables
# restart
# Trigger AHI and test pages_hashed, pages_old as non zero from sys view
SELECT STRAIGHT_JOIN COUNT(t6a.a)
FROM t6 AS t6a, t6 AS t6b
WHERE t6a.a = t6b.a;
COUNT(t6a.a)
1000
SELECT SUM(pages_hashed)>0 `1`, SUM(pages_old)>0 `1`
FROM sys.innodb_buffer_stats_by_table;
1 1
1 1
DROP TABLE t1, t2, t3, t4, t5, t6;

View file

@ -0,0 +1,2 @@
--innodb-adaptive-hash-index=ON
--innodb-buffer-pool-size=64M

View file

@ -300,4 +300,14 @@ if (0 && $have_debug) { # these messages sometimes fail to appear
--move_file $MYSQLD_DATADIR/test/t6.ibd.backup $MYSQLD_DATADIR/test/t6.ibd
--source include/start_mysqld.inc
--echo # Trigger AHI and test pages_hashed, pages_old as non zero from sys view
SELECT STRAIGHT_JOIN COUNT(t6a.a)
FROM t6 AS t6a, t6 AS t6b
WHERE t6a.a = t6b.a;
SELECT SUM(pages_hashed)>0 `1`, SUM(pages_old)>0 `1`
FROM sys.innodb_buffer_stats_by_table;
DROP TABLE t1, t2, t3, t4, t5, t6;

View file

@ -1,6 +1,6 @@
SET @save_slave_parallel_threads= @@GLOBAL.slave_parallel_threads;
SELECT IF(COUNT(*) < 20, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
IF(COUNT(*) < 20, "OK", CONCAT("Found too many system user processes: ", COUNT(*)))
SELECT IF(COUNT(*) < 20, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) AS ProcessCheck FROM information_schema.processlist WHERE user = "system user";
ProcessCheck
OK
SELECT @@GLOBAL.slave_parallel_threads as 'must be 20 because of .cnf';
must be 20 because of .cnf
@ -16,7 +16,7 @@ SET GLOBAL slave_parallel_threads= 10;
SELECT @@GLOBAL.slave_parallel_threads;
@@GLOBAL.slave_parallel_threads
10
SELECT IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*)))
SELECT IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) AS ProcessCheck FROM information_schema.processlist WHERE user = "system user";
ProcessCheck
OK
SET GLOBAL slave_parallel_threads = @save_slave_parallel_threads;

View file

@ -4,7 +4,7 @@ SET @save_slave_parallel_threads= @@GLOBAL.slave_parallel_threads;
# Check that we don't spawn worker threads at server startup, when no
# slave is configured (MDEV-5289).
SELECT IF(COUNT(*) < 20, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
SELECT IF(COUNT(*) < 20, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) AS ProcessCheck FROM information_schema.processlist WHERE user = "system user";
SELECT @@GLOBAL.slave_parallel_threads as 'must be 20 because of .cnf';
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
@ -16,6 +16,6 @@ SELECT @@GLOBAL.slave_parallel_threads as 'must be 0 because of default';
SET GLOBAL slave_parallel_threads= 10;
SELECT @@GLOBAL.slave_parallel_threads;
# Check that we don't spawn worker threads when no slave is started.
SELECT IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) FROM information_schema.processlist WHERE user = "system user";
SELECT IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) AS ProcessCheck FROM information_schema.processlist WHERE user = "system user";
SET GLOBAL slave_parallel_threads = @save_slave_parallel_threads;

View file

@ -7,7 +7,11 @@ pages bigint(21) NO 0
pages_hashed bigint(21) NO 0
pages_old bigint(21) NO 0
rows_cached decimal(44,0) YES NULL
SELECT * FROM sys.innodb_buffer_stats_by_schema;
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
SELECT * FROM sys.innodb_buffer_stats_by_schema
where object_schema = 'test';
object_schema allocated data pages pages_hashed pages_old rows_cached
test 16.00 KiB 0 bytes 1 0 0 0
DESC sys.x$innodb_buffer_stats_by_schema;
Field Type Null Key Default Extra
object_schema text YES NULL
@ -17,4 +21,8 @@ pages bigint(21) NO 0
pages_hashed bigint(21) NO 0
pages_old bigint(21) NO 0
rows_cached decimal(44,0) NO 0
SELECT * FROM sys.x$innodb_buffer_stats_by_schema;
SELECT * FROM sys.x$innodb_buffer_stats_by_schema
where object_schema = 'test';
object_schema allocated data pages pages_hashed pages_old rows_cached
test 16384 0 1 0 0 0
DROP TABLE t1;

View file

@ -8,7 +8,11 @@ pages bigint(21) NO 0
pages_hashed bigint(21) NO 0
pages_old bigint(21) NO 0
rows_cached decimal(44,0) YES NULL
SELECT * FROM sys.innodb_buffer_stats_by_table;
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
SELECT * FROM sys.innodb_buffer_stats_by_table
where object_schema = 'test' and object_name = 't1';
object_schema object_name allocated data pages pages_hashed pages_old rows_cached
test t1 16.00 KiB 0 bytes 1 0 0 0
DESC sys.x$innodb_buffer_stats_by_table;
Field Type Null Key Default Extra
object_schema text YES NULL
@ -19,4 +23,8 @@ pages bigint(21) NO 0
pages_hashed bigint(21) NO 0
pages_old bigint(21) NO 0
rows_cached decimal(44,0) NO 0
SELECT * FROM sys.x$innodb_buffer_stats_by_table;
SELECT * FROM sys.x$innodb_buffer_stats_by_table
where object_schema = 'test' and object_name = 't1';
object_schema object_name allocated data pages pages_hashed pages_old rows_cached
test t1 16384 0 1 0 0 0
DROP TABLE t1;

View file

@ -8,16 +8,21 @@
# Ensure structure changes don't slip in
DESC sys.innodb_buffer_stats_by_schema;
# Make sure view select does not error, but ignore results
--disable_result_log
SELECT * FROM sys.innodb_buffer_stats_by_schema;
--enable_result_log
# Create an Empty table
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
# Make sure view select does not error, and
# is_hashed & is_old is 0 for empty table
SELECT * FROM sys.innodb_buffer_stats_by_schema
where object_schema = 'test';
# Ensure structure changes don't slip in
DESC sys.x$innodb_buffer_stats_by_schema;
# Make sure view select does not error, but ignore results
--disable_result_log
SELECT * FROM sys.x$innodb_buffer_stats_by_schema;
--enable_result_log
# Make sure view select does not error, and
# is_hashed & is_old is 0 for empty table
SELECT * FROM sys.x$innodb_buffer_stats_by_schema
where object_schema = 'test';
# Drop the table
DROP TABLE t1;

View file

@ -8,16 +8,21 @@
# Ensure structure changes don't slip in
DESC sys.innodb_buffer_stats_by_table;
# Make sure view select does not error, but ignore results
--disable_result_log
SELECT * FROM sys.innodb_buffer_stats_by_table;
--enable_result_log
# Create an Empty table
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
# Make sure view select does not error and
# is_hashed & is_old is 0 for empty table
SELECT * FROM sys.innodb_buffer_stats_by_table
where object_schema = 'test' and object_name = 't1';
# Ensure structure changes don't slip in
DESC sys.x$innodb_buffer_stats_by_table;
# Make sure view select does not error, but ignore results
--disable_result_log
SELECT * FROM sys.x$innodb_buffer_stats_by_table;
--enable_result_log
# Make sure view select does not error and
# is_hashed & is_old is 0 for empty table
SELECT * FROM sys.x$innodb_buffer_stats_by_table
where object_schema = 'test' and object_name = 't1';
# Drop the table
DROP TABLE t1;

View file

@ -53,8 +53,8 @@ SELECT IF(LOCATE('.', ibp.table_name) = 0, 'InnoDB System', REPLACE(SUBSTRING_IN
sys.format_bytes(SUM(IF(ibp.compressed_size = 0, 16384, compressed_size))) AS allocated,
sys.format_bytes(SUM(ibp.data_size)) AS data,
COUNT(ibp.page_number) AS pages,
COUNT(IF(ibp.is_hashed = 'YES', 1, NULL)) AS pages_hashed,
COUNT(IF(ibp.is_old = 'YES', 1, NULL)) AS pages_old,
COUNT(IF(ibp.is_hashed, 1, NULL)) AS pages_hashed,
COUNT(IF(ibp.is_old, 1, NULL)) AS pages_old,
ROUND(SUM(ibp.number_records)/COUNT(DISTINCT ibp.index_name)) AS rows_cached
FROM information_schema.innodb_buffer_page ibp
WHERE table_name IS NOT NULL
@ -62,4 +62,3 @@ SELECT IF(LOCATE('.', ibp.table_name) = 0, 'InnoDB System', REPLACE(SUBSTRING_IN
ORDER BY SUM(IF(ibp.compressed_size = 0, 16384, compressed_size)) DESC;
END$$
DELIMITER ;

View file

@ -56,8 +56,8 @@ SELECT IF(LOCATE('.', ibp.table_name) = 0, 'InnoDB System', REPLACE(SUBSTRING_IN
sys.format_bytes(SUM(IF(ibp.compressed_size = 0, 16384, compressed_size))) AS allocated,
sys.format_bytes(SUM(ibp.data_size)) AS data,
COUNT(ibp.page_number) AS pages,
COUNT(IF(ibp.is_hashed = 'YES', 1, NULL)) AS pages_hashed,
COUNT(IF(ibp.is_old = 'YES', 1, NULL)) AS pages_old,
COUNT(IF(ibp.is_hashed, 1, NULL)) AS pages_hashed,
COUNT(IF(ibp.is_old, 1, NULL)) AS pages_old,
ROUND(SUM(ibp.number_records)/COUNT(DISTINCT ibp.index_name)) AS rows_cached
FROM information_schema.innodb_buffer_page ibp
WHERE table_name IS NOT NULL

View file

@ -2898,8 +2898,6 @@ Item_sp::func_name_cstring(THD *thd, bool is_package_function) const
void
Item_sp::cleanup()
{
delete sp_result_field;
sp_result_field= NULL;
m_sp= NULL;
delete func_ctx;
func_ctx= NULL;
@ -3071,7 +3069,6 @@ Item_sp::init_result_field(THD *thd, uint max_length, uint maybe_null,
DBUG_ENTER("Item_sp::init_result_field");
DBUG_ASSERT(m_sp != NULL);
DBUG_ASSERT(sp_result_field == NULL);
/*
A Field needs to be attached to a Table.
@ -3085,23 +3082,26 @@ Item_sp::init_result_field(THD *thd, uint max_length, uint maybe_null,
dummy_table->s->table_name= empty_clex_str;
dummy_table->maybe_null= maybe_null;
if (!(sp_result_field= m_sp->create_result_field(max_length, name,
dummy_table)))
DBUG_RETURN(TRUE);
if (sp_result_field->pack_length() > sizeof(result_buf))
if (!sp_result_field)
{
void *tmp;
if (!(tmp= thd->alloc(sp_result_field->pack_length())))
DBUG_RETURN(TRUE);
sp_result_field->move_field((uchar*) tmp);
sp_result_field= m_sp->create_result_field(max_length, name,
dummy_table);
if (!sp_result_field)
DBUG_RETURN(true);
if (sp_result_field->pack_length() > sizeof(result_buf))
{
void *tmp;
if (!(tmp= thd->alloc(sp_result_field->pack_length())))
DBUG_RETURN(TRUE);
sp_result_field->move_field((uchar*) tmp);
}
else
sp_result_field->move_field(result_buf);
sp_result_field->null_ptr= (uchar *) null_value;
sp_result_field->null_bit= 1;
}
else
sp_result_field->move_field(result_buf);
sp_result_field->null_ptr= (uchar *) null_value;
sp_result_field->null_bit= 1;
DBUG_RETURN(FALSE);
}

View file

@ -5816,6 +5816,11 @@ public:
Field *sp_result_field;
Item_sp(THD *thd, Name_resolution_context *context_arg, sp_name *name_arg);
Item_sp(THD *thd, Item_sp *item);
virtual ~Item_sp()
{
delete sp_result_field;
sp_result_field= NULL;
}
LEX_CSTRING func_name_cstring(THD *thd, bool is_package_function) const;
void cleanup();
bool sp_check_access(THD *thd);

View file

@ -6837,12 +6837,29 @@ Item_func_sp::fix_fields(THD *thd, Item **ref)
DBUG_RETURN(TRUE);
}
Query_arena *arena, backup;
/*
Allocation an instance of Item_func_sp used for initialization of
sp_result_field taken place inside the method init_result_field() is done
on sp_head's mem_root since Item_sp also allocated on this memory root.
Switching to SP/PS memory root is done explicitly before calling the method
init_result_field() instead doing that inside init_result_field()
since for the case when rollup aggregate function is handled
(@see Item_sum_sp::copy_or_same, @see JOIN::rollup_make_fields)
the runtime arena used for operations, so switching to SP/PS arena for this
case would result in assertion failure on second execution of the same
prepared statement because the memory root be already marked as read only.
*/
arena= thd->activate_stmt_arena_if_needed(&backup);
/*
We must call init_result_field before Item_func::fix_fields()
to make m_sp and result_field members available to fix_length_and_dec(),
which is called from Item_func::fix_fields().
*/
res= init_result_field(thd, max_length, maybe_null(), &null_value, &name);
if (arena)
thd->restore_active_arena(arena, &backup);
if (res)
DBUG_RETURN(TRUE);

View file

@ -1728,9 +1728,16 @@ bool Item_func_json_contains_path::val_bool()
longlong result;
json_path_t p;
int n_found;
LINT_INIT(n_found);
int array_sizes[JSON_DEPTH_LIMIT];
uint has_negative_path= 0;
#if defined(FORCE_INIT_OF_VARS)
/*
Initialization force not required after gcc 13.3
where it correctly sees that an uninitialized read
of n_found doesn't occur with mode_one being true.
*/
n_found= 0;
#endif
if ((null_value= args[0]->null_value))
return 0;
@ -1770,8 +1777,6 @@ bool Item_func_json_contains_path::val_bool()
bzero(p_found, (arg_count-2) * sizeof(bool));
n_found= arg_count - 2;
}
else
n_found= 0; /* Just to prevent 'uninitialized value' warnings */
result= 0;
while (json_get_path_next(&je, &p) == 0)
@ -2644,7 +2649,6 @@ String *Item_func_json_merge::val_str(String *str)
String *js1= args[0]->val_json(&tmp_js1), *js2=NULL;
uint n_arg;
THD *thd= current_thd;
LINT_INIT(js2);
JSON_DO_PAUSE_EXECUTION(thd, 0.0002);

View file

@ -1365,8 +1365,16 @@ Item_sum_sp::fix_fields(THD *thd, Item **ref)
return TRUE;
}
if (init_result_field(thd, max_length, maybe_null(), &null_value, &name))
return TRUE;
Query_arena *arena, backup;
arena= thd->activate_stmt_arena_if_needed(&backup);
bool ret= init_result_field(thd, max_length, maybe_null(),
&null_value, &name);
if (arena)
thd->restore_active_arena(arena, &backup);
if(ret)
return true;
for (uint i= 0 ; i < arg_count ; i++)
{

View file

@ -7699,7 +7699,7 @@ bool THD::binlog_for_noop_dml(bool transactional_table)
}
#if defined(DBUG_TRACE) && !defined(_lint)
#if defined(DBUG_TRACE)
static const char *
show_query_type(THD::enum_binlog_query_type qtype)
{
@ -7713,7 +7713,7 @@ show_query_type(THD::enum_binlog_query_type qtype)
DBUG_ASSERT(0 <= qtype && qtype < THD::QUERY_TYPE_COUNT);
}
static char buf[64];
sprintf(buf, "UNKNOWN#%d", qtype);
snprintf(buf, sizeof(buf), "UNKNOWN#%d", qtype);
return buf;
}
#endif

View file

@ -836,9 +836,7 @@ public:
inline void move_elements_to(I_List<T>* new_owner) {
base_ilist::move_elements_to(new_owner);
}
#ifndef _lint
friend class I_List_iterator<T>;
#endif
};

View file

@ -158,10 +158,8 @@ public:
typedef I_P_List<T, B, C, I> Base;
typedef I_P_List_iterator<T, Base> Iterator;
typedef I_P_List_iterator<const T, Base> Const_Iterator;
#ifndef _lint
friend class I_P_List_iterator<T, Base>;
friend class I_P_List_iterator<const T, Base>;
#endif
};

View file

@ -46,7 +46,7 @@ user_connect.h valblk.h value.h xindex.h xobject.h xtable.h)
#
# Definitions that are shared for all OSes
#
add_definitions( -DMARIADB -DFORCE_INIT_OF_VARS -Dconnect_EXPORTS)
add_definitions( -DMARIADB -Dconnect_EXPORTS)
add_definitions( -DHUGE_SUPPORT -DGZ_SUPPORT )
macro(DISABLE_WARNING W)

View file

@ -1179,7 +1179,7 @@ bool FILTER::Convert(PGLOBAL g, bool having)
case OP_GT:
case OP_GE:
case OP_LT:
case OP_LE: new(this) FILTERCMP(g); break;
case OP_LE: new(this) FILTERCMP(g, Opc); break;
case OP_AND: new(this) FILTERAND; break;
case OP_OR: new(this) FILTEROR; break;
case OP_NOT: new(this) FILTERNOT; break;
@ -1589,8 +1589,9 @@ void FILTER::Prints(PGLOBAL g, char *ps, uint z)
/***********************************************************************/
/* FILTERCMP constructor. */
/***********************************************************************/
FILTERCMP::FILTERCMP(PGLOBAL g)
FILTERCMP::FILTERCMP(PGLOBAL g, OPVAL Opc)
{
this->Opc= Opc;
Bt = OpBmp(g, Opc);
} // end of FILTERCMP constructor

View file

@ -120,7 +120,7 @@ class FILTERX : public FILTER {
class FILTERCMP : public FILTERX {
public:
// Constructor
FILTERCMP(PGLOBAL g);
FILTERCMP(PGLOBAL, OPVAL);
// Methods
bool Eval(PGLOBAL) override;

View file

@ -1611,7 +1611,9 @@ bool XMLCOL::ParseXpath(PGLOBAL g, bool mode)
if (Tdbp->Xpand)
n = Tdbp->Limit;
auto oLong = Long;
new(this) XMULCOL(Value); // Change the class of this column
Long = oLong;
} // endif Inod
Valbuf = (char*)PlugSubAlloc(g, NULL, n * (Long + 1));

View file

@ -236,9 +236,6 @@ end:
}
maria_end();
my_exit(error);
#ifndef _lint
return 0; /* No compiler warning */
#endif
} /* main */
enum options_mc {

View file

@ -289,11 +289,9 @@ end:
maria_end();
my_end(verbose ? MY_CHECK_ERROR | MY_GIVE_INFO : MY_CHECK_ERROR);
exit(error ? 2 : 0);
#ifndef _lint
return 0; /* No compiler warning */
#endif
}
ATTRIBUTE_NORETURN
static void my_exit(int error)
{
free_defaults(default_argv);

View file

@ -165,8 +165,6 @@ my_bool _ma_ck_delete(MARIA_HA *info, MARIA_KEY *key)
MARIA_KEY org_key;
DBUG_ENTER("_ma_ck_delete");
LINT_INIT_STRUCT(org_key);
alloc_on_stack(*info->stack_end_ptr, key_buff, buff_alloced,
key->keyinfo->max_store_length);
if (!key_buff)

View file

@ -483,8 +483,6 @@ static my_bool _ma_ck_write_btree_with_log(MARIA_HA *info, MARIA_KEY *key,
my_bool transactional= share->now_transactional;
DBUG_ENTER("_ma_ck_write_btree_with_log");
LINT_INIT_STRUCT(org_key);
if (transactional)
{
/* Save original value as the key may change */

View file

@ -337,7 +337,7 @@ static int mrn_change_encoding(grn_ctx *ctx, const CHARSET_INFO *charset)
return mrn::encoding::set(ctx, charset);
}
#if defined DBUG_TRACE && !defined(_lint)
#if defined DBUG_TRACE
static const char *mrn_inspect_thr_lock_type(enum thr_lock_type lock_type)
{
const char *inspected = "<unknown>";

View file

@ -59,7 +59,7 @@
#define MRN_DBUG_ENTER_FUNCTION() DBUG_ENTER(__FUNCTION__)
#if !defined(DBUG_OFF) && !defined(_lint)
#if !defined(DBUG_OFF)
# define MRN_DBUG_ENTER_METHOD() \
char method_name[MRN_MESSAGE_BUFFER_SIZE]; \
method_name[0] = '\0'; \

View file

@ -124,9 +124,6 @@ int main(int argc, char **argv)
my_end(check_param.testflag & T_INFO ? MY_CHECK_ERROR | MY_GIVE_INFO : MY_CHECK_ERROR);
rc= (uchar) error;
exit(rc);
#ifndef _lint
return 0; /* No compiler warning */
#endif
} /* main */

View file

@ -248,9 +248,6 @@ int main(int argc, char **argv)
free_defaults(default_argv);
my_end(verbose ? MY_CHECK_ERROR | MY_GIVE_INFO : MY_CHECK_ERROR);
exit(error ? 2 : 0);
#ifndef _lint
return 0; /* No compiler warning */
#endif
}
enum options_mp {OPT_CHARSETS_DIR_MP=256};