Merge mysql.com:/home/my/mysql-5.0
into mysql.com:/home/my/mysql-5.1
This commit is contained in:
commit
1e2e9e2856
@ -334,6 +334,9 @@ then
|
|||||||
# mysqld requires -fno-implicit-templates.
|
# mysqld requires -fno-implicit-templates.
|
||||||
# Disable exceptions as they seams to create problems with gcc and threads.
|
# Disable exceptions as they seams to create problems with gcc and threads.
|
||||||
# mysqld doesn't use run-time-type-checking, so we disable it.
|
# mysqld doesn't use run-time-type-checking, so we disable it.
|
||||||
|
# We should use -Wno-invalid-offsetof flag to disable some warnings from gcc
|
||||||
|
# regarding offset() usage in C++ which are done in a safe manner in the
|
||||||
|
# server
|
||||||
CXXFLAGS="$CXXFLAGS -fno-implicit-templates -fno-exceptions -fno-rtti"
|
CXXFLAGS="$CXXFLAGS -fno-implicit-templates -fno-exceptions -fno-rtti"
|
||||||
AC_DEFINE([HAVE_EXPLICIT_TEMPLATE_INSTANTIATION],
|
AC_DEFINE([HAVE_EXPLICIT_TEMPLATE_INSTANTIATION],
|
||||||
[1], [Defined by configure. Use explicit template instantiation.])
|
[1], [Defined by configure. Use explicit template instantiation.])
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# misc binlogging tests that do not require a slave running
|
# misc binlogging tests that do not require a slave running
|
||||||
#
|
#
|
||||||
|
|
||||||
|
-- source include/not_embedded.inc
|
||||||
-- source include/have_bdb.inc
|
-- source include/have_bdb.inc
|
||||||
-- source include/have_innodb.inc
|
-- source include/have_innodb.inc
|
||||||
-- source include/have_debug.inc
|
-- source include/have_debug.inc
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# Simple test for blackhole example
|
# Simple test for blackhole example
|
||||||
# Taken from the select test
|
# Taken from the select test
|
||||||
#
|
#
|
||||||
|
-- source include/not_embedded.inc
|
||||||
-- source include/have_blackhole.inc
|
-- source include/have_blackhole.inc
|
||||||
|
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
|
@ -398,28 +398,6 @@ DROP TABLE t2;
|
|||||||
DROP TABLE t3;
|
DROP TABLE t3;
|
||||||
DROP TABLE t4;
|
DROP TABLE t4;
|
||||||
|
|
||||||
# Test prepared statement with 0x8300 sequence in parameter while
|
|
||||||
# running with cp932 client character set.
|
|
||||||
RESET MASTER;
|
|
||||||
CREATE TABLE t1(f1 blob);
|
|
||||||
PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)';
|
|
||||||
SET @var1= x'8300';
|
|
||||||
# TODO: Note that this doesn't actually test the code which was added for
|
|
||||||
# bug#11338 because this syntax for prepared statements causes the PS to
|
|
||||||
# be replicated differently than if we executed the PS from C or Java.
|
|
||||||
# Using this syntax, variable names are inserted into the binlog instead
|
|
||||||
# of values. The real goal of this test is to check the code that was
|
|
||||||
# added to Item_param::query_val_str() in order to do hex encoding of
|
|
||||||
# PS parameters when the client character set is cp932;
|
|
||||||
# Bug#11338 has an example java program which can be used to verify this
|
|
||||||
# code (and I have used it to test the fix) until there is some way to
|
|
||||||
# exercise this code from mysql-test-run.
|
|
||||||
EXECUTE stmt1 USING @var1;
|
|
||||||
SHOW BINLOG EVENTS FROM 102;
|
|
||||||
SELECT HEX(f1) FROM t1;
|
|
||||||
DROP table t1;
|
|
||||||
# end test for bug#11338
|
|
||||||
|
|
||||||
SET collation_connection='cp932_japanese_ci';
|
SET collation_connection='cp932_japanese_ci';
|
||||||
-- source include/ctype_filesort.inc
|
-- source include/ctype_filesort.inc
|
||||||
SET collation_connection='cp932_bin';
|
SET collation_connection='cp932_bin';
|
||||||
|
@ -11315,20 +11315,6 @@ DROP TABLE t1;
|
|||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
DROP TABLE t3;
|
DROP TABLE t3;
|
||||||
DROP TABLE t4;
|
DROP TABLE t4;
|
||||||
RESET MASTER;
|
|
||||||
CREATE TABLE t1(f1 blob);
|
|
||||||
PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)';
|
|
||||||
SET @var1= x'8300';
|
|
||||||
EXECUTE stmt1 USING @var1;
|
|
||||||
SHOW BINLOG EVENTS FROM 102;
|
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
|
||||||
master-bin.000001 102 Query 1 189 use `test`; CREATE TABLE t1(f1 blob)
|
|
||||||
master-bin.000001 189 User var 1 228 @`var1`=_binary 0x8300 COLLATE binary
|
|
||||||
master-bin.000001 228 Query 1 321 use `test`; INSERT INTO t1 VALUES(@'var1')
|
|
||||||
SELECT HEX(f1) FROM t1;
|
|
||||||
HEX(f1)
|
|
||||||
8300
|
|
||||||
DROP table t1;
|
|
||||||
SET collation_connection='cp932_japanese_ci';
|
SET collation_connection='cp932_japanese_ci';
|
||||||
create table t1 select repeat('a',4000) a;
|
create table t1 select repeat('a',4000) a;
|
||||||
delete from t1;
|
delete from t1;
|
||||||
|
@ -6,11 +6,11 @@ CREATE TABLE t1(f1 blob);
|
|||||||
PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)';
|
PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)';
|
||||||
SET @var1= x'8300';
|
SET @var1= x'8300';
|
||||||
EXECUTE stmt1 USING @var1;
|
EXECUTE stmt1 USING @var1;
|
||||||
SHOW BINLOG EVENTS FROM 102;
|
SHOW BINLOG EVENTS FROM 98;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1(f1 blob)
|
master-bin.000001 98 Query 1 185 use `test`; CREATE TABLE t1(f1 blob)
|
||||||
master-bin.000001 # Table_map 1 # test.t1
|
master-bin.000001 185 User var 1 224 @`var1`=_binary 0x8300 COLLATE binary
|
||||||
master-bin.000001 # Write_rows 1 #
|
master-bin.000001 224 Query 1 317 use `test`; INSERT INTO t1 VALUES(@'var1')
|
||||||
SELECT HEX(f1) FROM t1;
|
SELECT HEX(f1) FROM t1;
|
||||||
HEX(f1)
|
HEX(f1)
|
||||||
8300
|
8300
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
drop table if exists t1;
|
||||||
create table t1 (col1 integer primary key, col2 integer) engine=innodb;
|
create table t1 (col1 integer primary key, col2 integer) engine=innodb;
|
||||||
insert t1 values (1,100);
|
insert t1 values (1,100);
|
||||||
create function f1 () returns integer begin
|
create function f1 () returns integer begin
|
||||||
|
4853
mysql-test/r/sp.result.orig
Normal file
4853
mysql-test/r/sp.result.orig
Normal file
File diff suppressed because it is too large
Load Diff
@ -117,7 +117,7 @@ create procedure bug10100p(prm int, inout res int)
|
|||||||
begin
|
begin
|
||||||
set res = res * prm;
|
set res = res * prm;
|
||||||
if prm > 1 then
|
if prm > 1 then
|
||||||
call bug10100p(prm - 1, res);
|
call bug10100p(prm - 1, res);
|
||||||
end if;
|
end if;
|
||||||
end|
|
end|
|
||||||
create procedure bug10100t(prm int)
|
create procedure bug10100t(prm int)
|
||||||
|
@ -2987,7 +2987,6 @@ select * from (select max(fld) from t1) as foo;
|
|||||||
max(fld)
|
max(fld)
|
||||||
1
|
1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
purge master logs before (select adddate(current_timestamp(), interval -4 day));
|
|
||||||
CREATE TABLE t1 (a int, b int);
|
CREATE TABLE t1 (a int, b int);
|
||||||
CREATE TABLE t2 (c int, d int);
|
CREATE TABLE t2 (c int, d int);
|
||||||
CREATE TABLE t3 (e int);
|
CREATE TABLE t3 (e int);
|
||||||
|
32
mysql-test/t/ctype_cp932_notembedded.test
Normal file
32
mysql-test/t/ctype_cp932_notembedded.test
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
-- source include/not_embedded.inc
|
||||||
|
-- source include/have_cp932.inc
|
||||||
|
|
||||||
|
--character_set cp932
|
||||||
|
--disable_warnings
|
||||||
|
drop table if exists t1;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
set names cp932;
|
||||||
|
set character_set_database = cp932;
|
||||||
|
|
||||||
|
# Test prepared statement with 0x8300 sequence in parameter while
|
||||||
|
# running with cp932 client character set.
|
||||||
|
RESET MASTER;
|
||||||
|
CREATE TABLE t1(f1 blob);
|
||||||
|
PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)';
|
||||||
|
SET @var1= x'8300';
|
||||||
|
# TODO: Note that this doesn't actually test the code which was added for
|
||||||
|
# bug#11338 because this syntax for prepared statements causes the PS to
|
||||||
|
# be replicated differently than if we executed the PS from C or Java.
|
||||||
|
# Using this syntax, variable names are inserted into the binlog instead
|
||||||
|
# of values. The real goal of this test is to check the code that was
|
||||||
|
# added to Item_param::query_val_str() in order to do hex encoding of
|
||||||
|
# PS parameters when the client character set is cp932;
|
||||||
|
# Bug#11338 has an example java program which can be used to verify this
|
||||||
|
# code (and I have used it to test the fix) until there is some way to
|
||||||
|
# exercise this code from mysql-test-run.
|
||||||
|
EXECUTE stmt1 USING @var1;
|
||||||
|
SHOW BINLOG EVENTS FROM 98;
|
||||||
|
SELECT HEX(f1) FROM t1;
|
||||||
|
DROP table t1;
|
||||||
|
# end test for bug#11338
|
@ -1,6 +1,10 @@
|
|||||||
-- source include/not_embedded.inc
|
-- source include/not_embedded.inc
|
||||||
-- source include/have_innodb.inc
|
-- source include/have_innodb.inc
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
drop table if exists t1;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
connect (a,localhost,root,,);
|
connect (a,localhost,root,,);
|
||||||
connect (b,localhost,root,,);
|
connect (b,localhost,root,,);
|
||||||
|
|
||||||
|
@ -54,10 +54,13 @@ flush table mysql.proc;
|
|||||||
|
|
||||||
# Thrashing the .frm file
|
# Thrashing the .frm file
|
||||||
--system echo 'saljdlfa' > $MYSQLTEST_VARDIR/master-data/mysql/proc.frm
|
--system echo 'saljdlfa' > $MYSQLTEST_VARDIR/master-data/mysql/proc.frm
|
||||||
|
--replace_result $MYSQLTEST_VARDIR . master-data// ''
|
||||||
--error ER_NOT_FORM_FILE
|
--error ER_NOT_FORM_FILE
|
||||||
call bug14233();
|
call bug14233();
|
||||||
|
--replace_result $MYSQLTEST_VARDIR . master-data// ''
|
||||||
--error ER_NOT_FORM_FILE
|
--error ER_NOT_FORM_FILE
|
||||||
create view v1 as select bug14233_f();
|
create view v1 as select bug14233_f();
|
||||||
|
--replace_result $MYSQLTEST_VARDIR . master-data// ''
|
||||||
--error ER_NOT_FORM_FILE
|
--error ER_NOT_FORM_FILE
|
||||||
insert into t1 values (0);
|
insert into t1 values (0);
|
||||||
|
|
||||||
|
@ -699,10 +699,11 @@ drop procedure into_test4|
|
|||||||
--disable_warnings
|
--disable_warnings
|
||||||
drop procedure if exists into_outfile|
|
drop procedure if exists into_outfile|
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
create procedure into_outfile(x char(16), y int)
|
--replace_result $MYSQLTEST_VARDIR ..
|
||||||
|
eval create procedure into_outfile(x char(16), y int)
|
||||||
begin
|
begin
|
||||||
insert into test.t1 values (x, y);
|
insert into test.t1 values (x, y);
|
||||||
select * into outfile "../tmp/spout" from test.t1;
|
select * into outfile "$MYSQLTEST_VARDIR/tmp/spout" from test.t1;
|
||||||
insert into test.t1 values (concat(x, "2"), y+2);
|
insert into test.t1 values (concat(x, "2"), y+2);
|
||||||
end|
|
end|
|
||||||
|
|
||||||
@ -715,10 +716,11 @@ drop procedure into_outfile|
|
|||||||
--disable_warnings
|
--disable_warnings
|
||||||
drop procedure if exists into_dumpfile|
|
drop procedure if exists into_dumpfile|
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
create procedure into_dumpfile(x char(16), y int)
|
--replace_result $MYSQLTEST_VARDIR ..
|
||||||
|
eval create procedure into_dumpfile(x char(16), y int)
|
||||||
begin
|
begin
|
||||||
insert into test.t1 values (x, y);
|
insert into test.t1 values (x, y);
|
||||||
select * into dumpfile "../tmp/spdump" from test.t1 limit 1;
|
select * into dumpfile "$MYSQLTEST_VARDIR/tmp/spdump" from test.t1 limit 1;
|
||||||
insert into test.t1 values (concat(x, "2"), y+2);
|
insert into test.t1 values (concat(x, "2"), y+2);
|
||||||
end|
|
end|
|
||||||
|
|
||||||
|
5716
mysql-test/t/sp.test.orig
Normal file
5716
mysql-test/t/sp.test.orig
Normal file
File diff suppressed because it is too large
Load Diff
@ -128,6 +128,7 @@ call bug6807()|
|
|||||||
|
|
||||||
drop procedure bug6807|
|
drop procedure bug6807|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# BUG#10100: function (and stored procedure?) recursivity problem
|
# BUG#10100: function (and stored procedure?) recursivity problem
|
||||||
#
|
#
|
||||||
@ -152,7 +153,7 @@ create procedure bug10100p(prm int, inout res int)
|
|||||||
begin
|
begin
|
||||||
set res = res * prm;
|
set res = res * prm;
|
||||||
if prm > 1 then
|
if prm > 1 then
|
||||||
call bug10100p(prm - 1, res);
|
call bug10100p(prm - 1, res);
|
||||||
end if;
|
end if;
|
||||||
end|
|
end|
|
||||||
create procedure bug10100t(prm int)
|
create procedure bug10100t(prm int)
|
||||||
|
@ -1962,12 +1962,6 @@ insert into t1 values ('1');
|
|||||||
select * from (select max(fld) from t1) as foo;
|
select * from (select max(fld) from t1) as foo;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
#
|
|
||||||
# BUG #10308: purge log with subselect
|
|
||||||
#
|
|
||||||
|
|
||||||
purge master logs before (select adddate(current_timestamp(), interval -4 day));
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Test for bug #11762: subquery with an aggregate function in HAVING
|
# Test for bug #11762: subquery with an aggregate function in HAVING
|
||||||
#
|
#
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# mysqltest should be fixed
|
||||||
|
-- source include/not_embedded.inc
|
||||||
#
|
#
|
||||||
# Test of temporary tables
|
# Test of temporary tables
|
||||||
#
|
#
|
||||||
|
@ -717,3 +717,5 @@ create definer=some_user@`` sql security invoker view v1 as select 1;
|
|||||||
create definer=some_user@localhost sql security invoker view v1 as select 1;
|
create definer=some_user@localhost sql security invoker view v1 as select 1;
|
||||||
show create view v1;
|
show create view v1;
|
||||||
drop view v1;
|
drop view v1;
|
||||||
|
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ char *convert_dirname(char *to, const char *from, const char *from_end)
|
|||||||
|
|
||||||
#if FN_LIBCHAR != '/' || defined(FN_C_BEFORE_DIR_2)
|
#if FN_LIBCHAR != '/' || defined(FN_C_BEFORE_DIR_2)
|
||||||
{
|
{
|
||||||
for (; *from && from != from_end; from++)
|
for (; from != from_end && *from ; from++)
|
||||||
{
|
{
|
||||||
if (*from == '/')
|
if (*from == '/')
|
||||||
*to++= FN_LIBCHAR;
|
*to++= FN_LIBCHAR;
|
||||||
|
@ -84,7 +84,7 @@ void create_last_word_mask(MY_BITMAP *map)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void bitmap_lock(MY_BITMAP *map)
|
static inline void bitmap_lock(MY_BITMAP *map __attribute__((unused)))
|
||||||
{
|
{
|
||||||
#ifdef THREAD
|
#ifdef THREAD
|
||||||
if (map->mutex)
|
if (map->mutex)
|
||||||
@ -92,7 +92,7 @@ static inline void bitmap_lock(MY_BITMAP *map)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void bitmap_unlock(MY_BITMAP *map)
|
static inline void bitmap_unlock(MY_BITMAP *map __attribute__((unused)))
|
||||||
{
|
{
|
||||||
#ifdef THREAD
|
#ifdef THREAD
|
||||||
if (map->mutex)
|
if (map->mutex)
|
||||||
|
@ -680,3 +680,9 @@ ALTER TABLE db ADD Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT
|
|||||||
ALTER TABLE tables_priv MODIFY Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') COLLATE utf8_general_ci DEFAULT '' NOT NULL;
|
ALTER TABLE tables_priv MODIFY Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') COLLATE utf8_general_ci DEFAULT '' NOT NULL;
|
||||||
|
|
||||||
UPDATE user SET Trigger_priv=Super_priv WHERE @hadTriggerPriv = 0;
|
UPDATE user SET Trigger_priv=Super_priv WHERE @hadTriggerPriv = 0;
|
||||||
|
|
||||||
|
# Activate the new, possible modified privilege tables
|
||||||
|
# This should not be needed, but gives us some extra testing that the above
|
||||||
|
# changes was correct
|
||||||
|
|
||||||
|
flush privileges;
|
||||||
|
@ -5266,7 +5266,7 @@ int Field_date::store(longlong nr, bool unsigned_val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (nr >= 19000000000000.0 && nr <= 99991231235959.0)
|
if (nr >= 19000000000000.0 && nr <= 99991231235959.0)
|
||||||
nr=floor(nr/1000000.0); // Timestamp to date
|
nr= (longlong) floor(nr/1000000.0); // Timestamp to date
|
||||||
|
|
||||||
if (error)
|
if (error)
|
||||||
set_datetime_warning(MYSQL_ERROR::WARN_LEVEL_WARN,
|
set_datetime_warning(MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||||
|
@ -272,6 +272,7 @@ struct xid_t {
|
|||||||
long bqual_length;
|
long bqual_length;
|
||||||
char data[XIDDATASIZE]; // not \0-terminated !
|
char data[XIDDATASIZE]; // not \0-terminated !
|
||||||
|
|
||||||
|
xid_t() {} /* Remove gcc warning */
|
||||||
bool eq(struct xid_t *xid)
|
bool eq(struct xid_t *xid)
|
||||||
{ return eq(xid->gtrid_length, xid->bqual_length, xid->data); }
|
{ return eq(xid->gtrid_length, xid->bqual_length, xid->data); }
|
||||||
bool eq(long g, long b, const char *d)
|
bool eq(long g, long b, const char *d)
|
||||||
@ -646,6 +647,7 @@ typedef class Item COND;
|
|||||||
|
|
||||||
typedef struct st_ha_check_opt
|
typedef struct st_ha_check_opt
|
||||||
{
|
{
|
||||||
|
st_ha_check_opt() {} /* Remove gcc warning */
|
||||||
ulong sort_buffer_size;
|
ulong sort_buffer_size;
|
||||||
uint flags; /* isam layer flags (e.g. for myisamchk) */
|
uint flags; /* isam layer flags (e.g. for myisamchk) */
|
||||||
uint sql_flags; /* sql layer flags - for something myisamchk cannot do */
|
uint sql_flags; /* sql layer flags - for something myisamchk cannot do */
|
||||||
|
@ -375,9 +375,6 @@ void Item::print_item_w_name(String *str)
|
|||||||
void Item::cleanup()
|
void Item::cleanup()
|
||||||
{
|
{
|
||||||
DBUG_ENTER("Item::cleanup");
|
DBUG_ENTER("Item::cleanup");
|
||||||
DBUG_PRINT("info", ("Item: 0x%lx, name %s, original name %s",
|
|
||||||
this, name ? name : "(null)",
|
|
||||||
orig_name ? orig_name : "null"));
|
|
||||||
fixed=0;
|
fixed=0;
|
||||||
marker= 0;
|
marker= 0;
|
||||||
if (orig_name)
|
if (orig_name)
|
||||||
|
@ -164,7 +164,8 @@ struct Hybrid_type_traits
|
|||||||
virtual my_decimal *val_decimal(Hybrid_type *val, my_decimal *buf) const;
|
virtual my_decimal *val_decimal(Hybrid_type *val, my_decimal *buf) const;
|
||||||
virtual String *val_str(Hybrid_type *val, String *buf, uint8 decimals) const;
|
virtual String *val_str(Hybrid_type *val, String *buf, uint8 decimals) const;
|
||||||
static const Hybrid_type_traits *instance();
|
static const Hybrid_type_traits *instance();
|
||||||
Hybrid_type_traits() {};
|
Hybrid_type_traits() {}
|
||||||
|
virtual ~Hybrid_type_traits() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -339,6 +340,7 @@ private:
|
|||||||
bool save_resolve_in_select_list;
|
bool save_resolve_in_select_list;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Name_resolution_context_state() {} /* Remove gcc warning */
|
||||||
TABLE_LIST *save_next_local;
|
TABLE_LIST *save_next_local;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -1055,6 +1057,7 @@ bool agg_item_charsets(DTCollation &c, const char *name,
|
|||||||
class Item_num: public Item
|
class Item_num: public Item
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Item_num() {} /* Remove gcc warning */
|
||||||
virtual Item_num *neg()= 0;
|
virtual Item_num *neg()= 0;
|
||||||
Item *safe_charset_converter(CHARSET_INFO *tocs);
|
Item *safe_charset_converter(CHARSET_INFO *tocs);
|
||||||
};
|
};
|
||||||
|
@ -128,6 +128,8 @@ public:
|
|||||||
class Comp_creator
|
class Comp_creator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Comp_creator() {} /* Remove gcc warning */
|
||||||
|
virtual ~Comp_creator() {} /* Remove gcc warning */
|
||||||
virtual Item_bool_func2* create(Item *a, Item *b) const = 0;
|
virtual Item_bool_func2* create(Item *a, Item *b) const = 0;
|
||||||
virtual const char* symbol(bool invert) const = 0;
|
virtual const char* symbol(bool invert) const = 0;
|
||||||
virtual bool eqne_op() const = 0;
|
virtual bool eqne_op() const = 0;
|
||||||
@ -137,6 +139,8 @@ public:
|
|||||||
class Eq_creator :public Comp_creator
|
class Eq_creator :public Comp_creator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Eq_creator() {} /* Remove gcc warning */
|
||||||
|
virtual ~Eq_creator() {} /* Remove gcc warning */
|
||||||
virtual Item_bool_func2* create(Item *a, Item *b) const;
|
virtual Item_bool_func2* create(Item *a, Item *b) const;
|
||||||
virtual const char* symbol(bool invert) const { return invert? "<>" : "="; }
|
virtual const char* symbol(bool invert) const { return invert? "<>" : "="; }
|
||||||
virtual bool eqne_op() const { return 1; }
|
virtual bool eqne_op() const { return 1; }
|
||||||
@ -146,6 +150,8 @@ public:
|
|||||||
class Ne_creator :public Comp_creator
|
class Ne_creator :public Comp_creator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Ne_creator() {} /* Remove gcc warning */
|
||||||
|
virtual ~Ne_creator() {} /* Remove gcc warning */
|
||||||
virtual Item_bool_func2* create(Item *a, Item *b) const;
|
virtual Item_bool_func2* create(Item *a, Item *b) const;
|
||||||
virtual const char* symbol(bool invert) const { return invert? "=" : "<>"; }
|
virtual const char* symbol(bool invert) const { return invert? "=" : "<>"; }
|
||||||
virtual bool eqne_op() const { return 1; }
|
virtual bool eqne_op() const { return 1; }
|
||||||
@ -155,6 +161,8 @@ public:
|
|||||||
class Gt_creator :public Comp_creator
|
class Gt_creator :public Comp_creator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Gt_creator() {} /* Remove gcc warning */
|
||||||
|
virtual ~Gt_creator() {} /* Remove gcc warning */
|
||||||
virtual Item_bool_func2* create(Item *a, Item *b) const;
|
virtual Item_bool_func2* create(Item *a, Item *b) const;
|
||||||
virtual const char* symbol(bool invert) const { return invert? "<=" : ">"; }
|
virtual const char* symbol(bool invert) const { return invert? "<=" : ">"; }
|
||||||
virtual bool eqne_op() const { return 0; }
|
virtual bool eqne_op() const { return 0; }
|
||||||
@ -164,6 +172,8 @@ public:
|
|||||||
class Lt_creator :public Comp_creator
|
class Lt_creator :public Comp_creator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Lt_creator() {} /* Remove gcc warning */
|
||||||
|
virtual ~Lt_creator() {} /* Remove gcc warning */
|
||||||
virtual Item_bool_func2* create(Item *a, Item *b) const;
|
virtual Item_bool_func2* create(Item *a, Item *b) const;
|
||||||
virtual const char* symbol(bool invert) const { return invert? ">=" : "<"; }
|
virtual const char* symbol(bool invert) const { return invert? ">=" : "<"; }
|
||||||
virtual bool eqne_op() const { return 0; }
|
virtual bool eqne_op() const { return 0; }
|
||||||
@ -173,6 +183,8 @@ public:
|
|||||||
class Ge_creator :public Comp_creator
|
class Ge_creator :public Comp_creator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Ge_creator() {} /* Remove gcc warning */
|
||||||
|
virtual ~Ge_creator() {} /* Remove gcc warning */
|
||||||
virtual Item_bool_func2* create(Item *a, Item *b) const;
|
virtual Item_bool_func2* create(Item *a, Item *b) const;
|
||||||
virtual const char* symbol(bool invert) const { return invert? "<" : ">="; }
|
virtual const char* symbol(bool invert) const { return invert? "<" : ">="; }
|
||||||
virtual bool eqne_op() const { return 0; }
|
virtual bool eqne_op() const { return 0; }
|
||||||
@ -182,6 +194,8 @@ public:
|
|||||||
class Le_creator :public Comp_creator
|
class Le_creator :public Comp_creator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Le_creator() {} /* Remove gcc warning */
|
||||||
|
virtual ~Le_creator() {} /* Remove gcc warning */
|
||||||
virtual Item_bool_func2* create(Item *a, Item *b) const;
|
virtual Item_bool_func2* create(Item *a, Item *b) const;
|
||||||
virtual const char* symbol(bool invert) const { return invert? ">" : "<="; }
|
virtual const char* symbol(bool invert) const { return invert? ">" : "<="; }
|
||||||
virtual bool eqne_op() const { return 0; }
|
virtual bool eqne_op() const { return 0; }
|
||||||
@ -739,6 +753,7 @@ class cmp_item_int :public cmp_item
|
|||||||
{
|
{
|
||||||
longlong value;
|
longlong value;
|
||||||
public:
|
public:
|
||||||
|
cmp_item_int() {} /* Remove gcc warning */
|
||||||
void store_value(Item *item)
|
void store_value(Item *item)
|
||||||
{
|
{
|
||||||
value= item->val_int();
|
value= item->val_int();
|
||||||
@ -759,6 +774,7 @@ class cmp_item_real :public cmp_item
|
|||||||
{
|
{
|
||||||
double value;
|
double value;
|
||||||
public:
|
public:
|
||||||
|
cmp_item_real() {} /* Remove gcc warning */
|
||||||
void store_value(Item *item)
|
void store_value(Item *item)
|
||||||
{
|
{
|
||||||
value= item->val_real();
|
value= item->val_real();
|
||||||
@ -780,6 +796,7 @@ class cmp_item_decimal :public cmp_item
|
|||||||
{
|
{
|
||||||
my_decimal value;
|
my_decimal value;
|
||||||
public:
|
public:
|
||||||
|
cmp_item_decimal() {} /* Remove gcc warning */
|
||||||
void store_value(Item *item);
|
void store_value(Item *item);
|
||||||
int cmp(Item *arg);
|
int cmp(Item *arg);
|
||||||
int compare(cmp_item *c);
|
int compare(cmp_item *c);
|
||||||
|
@ -131,6 +131,7 @@ struct old_sql_ex
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
struct sql_ex_info
|
struct sql_ex_info
|
||||||
{
|
{
|
||||||
|
sql_ex_info() {} /* Remove gcc warning */
|
||||||
char* field_term;
|
char* field_term;
|
||||||
char* enclosed;
|
char* enclosed;
|
||||||
char* line_term;
|
char* line_term;
|
||||||
|
@ -434,6 +434,7 @@ typedef struct st_sql_list {
|
|||||||
byte *first;
|
byte *first;
|
||||||
byte **next;
|
byte **next;
|
||||||
|
|
||||||
|
st_sql_list() {} /* Remove gcc warning */
|
||||||
inline void empty()
|
inline void empty()
|
||||||
{
|
{
|
||||||
elements=0;
|
elements=0;
|
||||||
@ -1040,7 +1041,7 @@ bool close_thread_table(THD *thd, TABLE **table_ptr);
|
|||||||
void close_temporary_tables(THD *thd);
|
void close_temporary_tables(THD *thd);
|
||||||
void close_tables_for_reopen(THD *thd, TABLE_LIST **tables);
|
void close_tables_for_reopen(THD *thd, TABLE_LIST **tables);
|
||||||
TABLE_LIST *find_table_in_list(TABLE_LIST *table,
|
TABLE_LIST *find_table_in_list(TABLE_LIST *table,
|
||||||
uint offset_to_list,
|
st_table_list *TABLE_LIST::*link,
|
||||||
const char *db_name,
|
const char *db_name,
|
||||||
const char *table_name);
|
const char *table_name);
|
||||||
TABLE_LIST *unique_table(THD *thd, TABLE_LIST *table, TABLE_LIST *table_list);
|
TABLE_LIST *unique_table(THD *thd, TABLE_LIST *table, TABLE_LIST *table_list);
|
||||||
@ -1130,7 +1131,7 @@ inline TABLE_LIST *find_table_in_global_list(TABLE_LIST *table,
|
|||||||
const char *db_name,
|
const char *db_name,
|
||||||
const char *table_name)
|
const char *table_name)
|
||||||
{
|
{
|
||||||
return find_table_in_list(table, offsetof(TABLE_LIST, next_global),
|
return find_table_in_list(table, &TABLE_LIST::next_global,
|
||||||
db_name, table_name);
|
db_name, table_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1138,7 +1139,7 @@ inline TABLE_LIST *find_table_in_local_list(TABLE_LIST *table,
|
|||||||
const char *db_name,
|
const char *db_name,
|
||||||
const char *table_name)
|
const char *table_name)
|
||||||
{
|
{
|
||||||
return find_table_in_list(table, offsetof(TABLE_LIST, next_local),
|
return find_table_in_list(table, &TABLE_LIST::next_local,
|
||||||
db_name, table_name);
|
db_name, table_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1601,6 +1601,8 @@ public:
|
|||||||
{ return (void*) alloc_root(mem_root, (uint) size); }
|
{ return (void*) alloc_root(mem_root, (uint) size); }
|
||||||
static void operator delete(void *ptr,size_t size) { TRASH(ptr, size); }
|
static void operator delete(void *ptr,size_t size) { TRASH(ptr, size); }
|
||||||
static void operator delete(void *ptr, MEM_ROOT *mem_root) { /* Never called */ }
|
static void operator delete(void *ptr, MEM_ROOT *mem_root) { /* Never called */ }
|
||||||
|
virtual ~TABLE_READ_PLAN() {} /* Remove gcc warning */
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class TRP_ROR_INTERSECT;
|
class TRP_ROR_INTERSECT;
|
||||||
@ -1624,6 +1626,7 @@ public:
|
|||||||
TRP_RANGE(SEL_ARG *key_arg, uint idx_arg)
|
TRP_RANGE(SEL_ARG *key_arg, uint idx_arg)
|
||||||
: key(key_arg), key_idx(idx_arg)
|
: key(key_arg), key_idx(idx_arg)
|
||||||
{}
|
{}
|
||||||
|
virtual ~TRP_RANGE() {} /* Remove gcc warning */
|
||||||
|
|
||||||
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
|
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
|
||||||
MEM_ROOT *parent_alloc)
|
MEM_ROOT *parent_alloc)
|
||||||
@ -1645,6 +1648,8 @@ public:
|
|||||||
class TRP_ROR_INTERSECT : public TABLE_READ_PLAN
|
class TRP_ROR_INTERSECT : public TABLE_READ_PLAN
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
TRP_ROR_INTERSECT() {} /* Remove gcc warning */
|
||||||
|
virtual ~TRP_ROR_INTERSECT() {} /* Remove gcc warning */
|
||||||
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
|
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
|
||||||
MEM_ROOT *parent_alloc);
|
MEM_ROOT *parent_alloc);
|
||||||
|
|
||||||
@ -1666,6 +1671,8 @@ public:
|
|||||||
class TRP_ROR_UNION : public TABLE_READ_PLAN
|
class TRP_ROR_UNION : public TABLE_READ_PLAN
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
TRP_ROR_UNION() {} /* Remove gcc warning */
|
||||||
|
virtual ~TRP_ROR_UNION() {} /* Remove gcc warning */
|
||||||
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
|
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
|
||||||
MEM_ROOT *parent_alloc);
|
MEM_ROOT *parent_alloc);
|
||||||
TABLE_READ_PLAN **first_ror; /* array of ptrs to plans for merged scans */
|
TABLE_READ_PLAN **first_ror; /* array of ptrs to plans for merged scans */
|
||||||
@ -1682,6 +1689,8 @@ public:
|
|||||||
class TRP_INDEX_MERGE : public TABLE_READ_PLAN
|
class TRP_INDEX_MERGE : public TABLE_READ_PLAN
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
TRP_INDEX_MERGE() {} /* Remove gcc warning */
|
||||||
|
virtual ~TRP_INDEX_MERGE() {} /* Remove gcc warning */
|
||||||
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
|
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
|
||||||
MEM_ROOT *parent_alloc);
|
MEM_ROOT *parent_alloc);
|
||||||
TRP_RANGE **range_scans; /* array of ptrs to plans of merged scans */
|
TRP_RANGE **range_scans; /* array of ptrs to plans of merged scans */
|
||||||
@ -1731,6 +1740,7 @@ public:
|
|||||||
if (key_infix_len)
|
if (key_infix_len)
|
||||||
memcpy(this->key_infix, key_infix_arg, key_infix_len);
|
memcpy(this->key_infix, key_infix_arg, key_infix_len);
|
||||||
}
|
}
|
||||||
|
virtual ~TRP_GROUP_MIN_MAX() {} /* Remove gcc warning */
|
||||||
|
|
||||||
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
|
QUICK_SELECT_I *make_quick(PARAM *param, bool retrieve_full_rows,
|
||||||
MEM_ROOT *parent_alloc);
|
MEM_ROOT *parent_alloc);
|
||||||
|
@ -49,6 +49,8 @@ struct File_option
|
|||||||
class Unknown_key_hook
|
class Unknown_key_hook
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Unknown_key_hook() {} /* Remove gcc warning */
|
||||||
|
virtual ~Unknown_key_hook() {} /* Remove gcc warning */
|
||||||
virtual bool process_unknown_string(char *&unknown_key, gptr base,
|
virtual bool process_unknown_string(char *&unknown_key, gptr base,
|
||||||
MEM_ROOT *mem_root, char *end)= 0;
|
MEM_ROOT *mem_root, char *end)= 0;
|
||||||
};
|
};
|
||||||
@ -59,6 +61,7 @@ public:
|
|||||||
class File_parser_dummy_hook: public Unknown_key_hook
|
class File_parser_dummy_hook: public Unknown_key_hook
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
File_parser_dummy_hook() {} /* Remove gcc warning */
|
||||||
virtual bool process_unknown_string(char *&unknown_key, gptr base,
|
virtual bool process_unknown_string(char *&unknown_key, gptr base,
|
||||||
MEM_ROOT *mem_root, char *end);
|
MEM_ROOT *mem_root, char *end);
|
||||||
};
|
};
|
||||||
|
@ -268,6 +268,7 @@ class Select_fetch_into_spvars: public select_result_interceptor
|
|||||||
List<struct sp_pvar> *spvar_list;
|
List<struct sp_pvar> *spvar_list;
|
||||||
uint field_count;
|
uint field_count;
|
||||||
public:
|
public:
|
||||||
|
Select_fetch_into_spvars() {} /* Remove gcc warning */
|
||||||
uint get_field_count() { return field_count; }
|
uint get_field_count() { return field_count; }
|
||||||
void set_spvar_list(List<struct sp_pvar> *vars) { spvar_list= vars; }
|
void set_spvar_list(List<struct sp_pvar> *vars) { spvar_list= vars; }
|
||||||
|
|
||||||
|
@ -165,6 +165,8 @@ struct Geometry_buffer;
|
|||||||
class Geometry
|
class Geometry
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Geometry() {} /* Remove gcc warning */
|
||||||
|
virtual ~Geometry() {} /* Remove gcc warning */
|
||||||
static void *operator new(size_t size, void *buffer)
|
static void *operator new(size_t size, void *buffer)
|
||||||
{
|
{
|
||||||
return buffer;
|
return buffer;
|
||||||
@ -302,6 +304,8 @@ protected:
|
|||||||
class Gis_point: public Geometry
|
class Gis_point: public Geometry
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Gis_point() {} /* Remove gcc warning */
|
||||||
|
virtual ~Gis_point() {} /* Remove gcc warning */
|
||||||
uint32 get_data_size() const;
|
uint32 get_data_size() const;
|
||||||
bool init_from_wkt(Gis_read_stream *trs, String *wkb);
|
bool init_from_wkt(Gis_read_stream *trs, String *wkb);
|
||||||
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res);
|
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res);
|
||||||
@ -349,6 +353,8 @@ public:
|
|||||||
class Gis_line_string: public Geometry
|
class Gis_line_string: public Geometry
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Gis_line_string() {} /* Remove gcc warning */
|
||||||
|
virtual ~Gis_line_string() {} /* Remove gcc warning */
|
||||||
uint32 get_data_size() const;
|
uint32 get_data_size() const;
|
||||||
bool init_from_wkt(Gis_read_stream *trs, String *wkb);
|
bool init_from_wkt(Gis_read_stream *trs, String *wkb);
|
||||||
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res);
|
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res);
|
||||||
@ -375,6 +381,8 @@ public:
|
|||||||
class Gis_polygon: public Geometry
|
class Gis_polygon: public Geometry
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Gis_polygon() {} /* Remove gcc warning */
|
||||||
|
virtual ~Gis_polygon() {} /* Remove gcc warning */
|
||||||
uint32 get_data_size() const;
|
uint32 get_data_size() const;
|
||||||
bool init_from_wkt(Gis_read_stream *trs, String *wkb);
|
bool init_from_wkt(Gis_read_stream *trs, String *wkb);
|
||||||
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res);
|
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res);
|
||||||
@ -401,6 +409,8 @@ public:
|
|||||||
class Gis_multi_point: public Geometry
|
class Gis_multi_point: public Geometry
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Gis_multi_point() {} /* Remove gcc warning */
|
||||||
|
virtual ~Gis_multi_point() {} /* Remove gcc warning */
|
||||||
uint32 get_data_size() const;
|
uint32 get_data_size() const;
|
||||||
bool init_from_wkt(Gis_read_stream *trs, String *wkb);
|
bool init_from_wkt(Gis_read_stream *trs, String *wkb);
|
||||||
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res);
|
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res);
|
||||||
@ -423,6 +433,8 @@ public:
|
|||||||
class Gis_multi_line_string: public Geometry
|
class Gis_multi_line_string: public Geometry
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Gis_multi_line_string() {} /* Remove gcc warning */
|
||||||
|
virtual ~Gis_multi_line_string() {} /* Remove gcc warning */
|
||||||
uint32 get_data_size() const;
|
uint32 get_data_size() const;
|
||||||
bool init_from_wkt(Gis_read_stream *trs, String *wkb);
|
bool init_from_wkt(Gis_read_stream *trs, String *wkb);
|
||||||
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res);
|
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res);
|
||||||
@ -447,6 +459,8 @@ public:
|
|||||||
class Gis_multi_polygon: public Geometry
|
class Gis_multi_polygon: public Geometry
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Gis_multi_polygon() {} /* Remove gcc warning */
|
||||||
|
virtual ~Gis_multi_polygon() {} /* Remove gcc warning */
|
||||||
uint32 get_data_size() const;
|
uint32 get_data_size() const;
|
||||||
bool init_from_wkt(Gis_read_stream *trs, String *wkb);
|
bool init_from_wkt(Gis_read_stream *trs, String *wkb);
|
||||||
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res);
|
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res);
|
||||||
@ -471,6 +485,8 @@ public:
|
|||||||
class Gis_geometry_collection: public Geometry
|
class Gis_geometry_collection: public Geometry
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Gis_geometry_collection() {} /* Remove gcc warning */
|
||||||
|
virtual ~Gis_geometry_collection() {} /* Remove gcc warning */
|
||||||
uint32 get_data_size() const;
|
uint32 get_data_size() const;
|
||||||
bool init_from_wkt(Gis_read_stream *trs, String *wkb);
|
bool init_from_wkt(Gis_read_stream *trs, String *wkb);
|
||||||
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res);
|
uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res);
|
||||||
|
@ -917,6 +917,15 @@ bool close_cached_tables(THD *thd, bool if_wait_for_refresh,
|
|||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
Marks all tables in the list which were used by current substatement
|
Marks all tables in the list which were used by current substatement
|
||||||
(they are marked by its query_id) as free for reuse.
|
(they are marked by its query_id) as free for reuse.
|
||||||
|
|
||||||
|
NOTE
|
||||||
|
The reason we reset query_id is that it's not enough to just test
|
||||||
|
if table->query_id != thd->query_id to know if a table is in use.
|
||||||
|
|
||||||
|
For example
|
||||||
|
SELECT f1_that_uses_t1() FROM t1;
|
||||||
|
In f1_that_uses_t1() we will see one instance of t1 where query_id is
|
||||||
|
set to query_id of original query.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void mark_used_tables_as_free_for_reuse(THD *thd, TABLE *table)
|
static void mark_used_tables_as_free_for_reuse(THD *thd, TABLE *table)
|
||||||
@ -1230,11 +1239,11 @@ void close_temporary_tables(THD *thd)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
TABLE_LIST *find_table_in_list(TABLE_LIST *table,
|
TABLE_LIST *find_table_in_list(TABLE_LIST *table,
|
||||||
uint offset,
|
st_table_list *TABLE_LIST::*link,
|
||||||
const char *db_name,
|
const char *db_name,
|
||||||
const char *table_name)
|
const char *table_name)
|
||||||
{
|
{
|
||||||
for (; table; table= *(TABLE_LIST **) ((char*) table + offset))
|
for (; table; table= table->*link )
|
||||||
{
|
{
|
||||||
if ((table->table == 0 || table->table->s->tmp_table == NO_TMP_TABLE) &&
|
if ((table->table == 0 || table->table->s->tmp_table == NO_TMP_TABLE) &&
|
||||||
strcmp(table->db, db_name) == 0 &&
|
strcmp(table->db, db_name) == 0 &&
|
||||||
|
@ -69,6 +69,7 @@ class Query_cache;
|
|||||||
|
|
||||||
struct Query_cache_block_table
|
struct Query_cache_block_table
|
||||||
{
|
{
|
||||||
|
Query_cache_block_table() {} /* Remove gcc warning */
|
||||||
TABLE_COUNTER_TYPE n; // numbr in table (from 0)
|
TABLE_COUNTER_TYPE n; // numbr in table (from 0)
|
||||||
Query_cache_block_table *next, *prev;
|
Query_cache_block_table *next, *prev;
|
||||||
Query_cache_table *parent;
|
Query_cache_table *parent;
|
||||||
@ -78,6 +79,7 @@ struct Query_cache_block_table
|
|||||||
|
|
||||||
struct Query_cache_block
|
struct Query_cache_block
|
||||||
{
|
{
|
||||||
|
Query_cache_block() {} /* Remove gcc warning */
|
||||||
enum block_type {FREE, QUERY, RESULT, RES_CONT, RES_BEG,
|
enum block_type {FREE, QUERY, RESULT, RES_CONT, RES_BEG,
|
||||||
RES_INCOMPLETE, TABLE, INCOMPLETE};
|
RES_INCOMPLETE, TABLE, INCOMPLETE};
|
||||||
|
|
||||||
@ -143,6 +145,7 @@ struct Query_cache_query
|
|||||||
|
|
||||||
struct Query_cache_table
|
struct Query_cache_table
|
||||||
{
|
{
|
||||||
|
Query_cache_table() {} /* Remove gcc warning */
|
||||||
char *tbl;
|
char *tbl;
|
||||||
uint32 key_len;
|
uint32 key_len;
|
||||||
uint8 table_type;
|
uint8 table_type;
|
||||||
@ -171,6 +174,7 @@ struct Query_cache_table
|
|||||||
|
|
||||||
struct Query_cache_result
|
struct Query_cache_result
|
||||||
{
|
{
|
||||||
|
Query_cache_result() {} /* Remove gcc warning */
|
||||||
Query_cache_block *query;
|
Query_cache_block *query;
|
||||||
|
|
||||||
inline gptr data()
|
inline gptr data()
|
||||||
@ -197,6 +201,7 @@ extern "C" void query_cache_invalidate_by_MyISAM_filename(const char* filename);
|
|||||||
|
|
||||||
struct Query_cache_memory_bin
|
struct Query_cache_memory_bin
|
||||||
{
|
{
|
||||||
|
Query_cache_memory_bin() {} /* Remove gcc warning */
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
ulong size;
|
ulong size;
|
||||||
#endif
|
#endif
|
||||||
@ -215,8 +220,7 @@ struct Query_cache_memory_bin
|
|||||||
|
|
||||||
struct Query_cache_memory_bin_step
|
struct Query_cache_memory_bin_step
|
||||||
{
|
{
|
||||||
public:
|
Query_cache_memory_bin_step() {} /* Remove gcc warning */
|
||||||
Query_cache_memory_bin_step() {}
|
|
||||||
ulong size;
|
ulong size;
|
||||||
ulong increment;
|
ulong increment;
|
||||||
uint idx;
|
uint idx;
|
||||||
|
@ -992,6 +992,7 @@ bool select_send::send_data(List<Item> &items)
|
|||||||
protocol->remove_last_row();
|
protocol->remove_last_row();
|
||||||
else
|
else
|
||||||
DBUG_RETURN(protocol->write());
|
DBUG_RETURN(protocol->write());
|
||||||
|
protocol->remove_last_row();
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -629,6 +629,7 @@ void xid_cache_delete(XID_STATE *xid_state);
|
|||||||
|
|
||||||
class Security_context {
|
class Security_context {
|
||||||
public:
|
public:
|
||||||
|
Security_context() {} /* Remove gcc warning */
|
||||||
/*
|
/*
|
||||||
host - host of the client
|
host - host of the client
|
||||||
user - user of the client, set to NULL until the user has been read from
|
user - user of the client, set to NULL until the user has been read from
|
||||||
@ -1467,6 +1468,7 @@ public:
|
|||||||
class select_result_interceptor: public select_result
|
class select_result_interceptor: public select_result
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
select_result_interceptor() {} /* Remove gcc warning */
|
||||||
uint field_count(List<Item> &fields) const { return 0; }
|
uint field_count(List<Item> &fields) const { return 0; }
|
||||||
bool send_fields(List<Item> &fields, uint flag) { return FALSE; }
|
bool send_fields(List<Item> &fields, uint flag) { return FALSE; }
|
||||||
};
|
};
|
||||||
@ -1757,6 +1759,7 @@ class Table_ident :public Sql_alloc
|
|||||||
class user_var_entry
|
class user_var_entry
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
user_var_entry() {} /* Remove gcc warning */
|
||||||
LEX_STRING name;
|
LEX_STRING name;
|
||||||
char *value;
|
char *value;
|
||||||
ulong length;
|
ulong length;
|
||||||
|
@ -1233,10 +1233,13 @@ bool mysql_change_db(THD *thd, const char *name, bool no_access_check)
|
|||||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||||
ulong db_access;
|
ulong db_access;
|
||||||
Security_context *sctx= thd->security_ctx;
|
Security_context *sctx= thd->security_ctx;
|
||||||
|
LINT_INIT(db_access);
|
||||||
#endif
|
#endif
|
||||||
DBUG_ENTER("mysql_change_db");
|
DBUG_ENTER("mysql_change_db");
|
||||||
DBUG_PRINT("enter",("name: '%s'",name));
|
DBUG_PRINT("enter",("name: '%s'",name));
|
||||||
|
|
||||||
|
LINT_INIT(db_length);
|
||||||
|
|
||||||
/* dbname can only be NULL if malloc failed */
|
/* dbname can only be NULL if malloc failed */
|
||||||
if (!dbname || !(db_length= strlen(dbname)))
|
if (!dbname || !(db_length= strlen(dbname)))
|
||||||
{
|
{
|
||||||
@ -1254,7 +1257,7 @@ bool mysql_change_db(THD *thd, const char *name, bool no_access_check)
|
|||||||
if (check_db_name(dbname))
|
if (check_db_name(dbname))
|
||||||
{
|
{
|
||||||
my_error(ER_WRONG_DB_NAME, MYF(0), dbname);
|
my_error(ER_WRONG_DB_NAME, MYF(0), dbname);
|
||||||
x_free(dbname);
|
my_free(dbname, MYF(0));
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
DBUG_PRINT("info",("Use database: %s", dbname));
|
DBUG_PRINT("info",("Use database: %s", dbname));
|
||||||
@ -1303,8 +1306,7 @@ end:
|
|||||||
x_free(thd->db);
|
x_free(thd->db);
|
||||||
if (dbname && dbname[0] == 0)
|
if (dbname && dbname[0] == 0)
|
||||||
{
|
{
|
||||||
if (!(thd->slave_thread))
|
my_free(dbname, MYF(0));
|
||||||
x_free(dbname);
|
|
||||||
thd->db= NULL;
|
thd->db= NULL;
|
||||||
thd->db_length= 0;
|
thd->db_length= 0;
|
||||||
}
|
}
|
||||||
|
@ -4972,7 +4972,9 @@ end_with_restore_list:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
#ifndef EMBEDDED_LIBRARY
|
||||||
DBUG_ASSERT(0); /* Impossible */
|
DBUG_ASSERT(0); /* Impossible */
|
||||||
|
#endif
|
||||||
send_ok(thd);
|
send_ok(thd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -6149,10 +6151,11 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
|
|||||||
/*
|
/*
|
||||||
table_list.next points to the last inserted TABLE_LIST->next_local'
|
table_list.next points to the last inserted TABLE_LIST->next_local'
|
||||||
element
|
element
|
||||||
|
We don't use the offsetof() macro here to avoid warnings from gcc
|
||||||
*/
|
*/
|
||||||
previous_table_ref= (TABLE_LIST*) (table_list.next -
|
previous_table_ref= (TABLE_LIST*) ((char*) table_list.next -
|
||||||
offsetof(TABLE_LIST, next_local));
|
((char*) &(ptr->next_local) -
|
||||||
DBUG_ASSERT(previous_table_ref);
|
(char*) ptr));
|
||||||
/*
|
/*
|
||||||
Set next_name_resolution_table of the previous table reference to point
|
Set next_name_resolution_table of the previous table reference to point
|
||||||
to the current table reference. In effect the list
|
to the current table reference. In effect the list
|
||||||
|
@ -104,6 +104,7 @@ typedef int (*Read_record_func)(struct st_join_table *tab);
|
|||||||
Next_select_func setup_end_select_func(JOIN *join);
|
Next_select_func setup_end_select_func(JOIN *join);
|
||||||
|
|
||||||
typedef struct st_join_table {
|
typedef struct st_join_table {
|
||||||
|
st_join_table() {} /* Remove gcc warning */
|
||||||
TABLE *table;
|
TABLE *table;
|
||||||
KEYUSE *keyuse; /* pointer to first used key */
|
KEYUSE *keyuse; /* pointer to first used key */
|
||||||
SQL_SELECT *select;
|
SQL_SELECT *select;
|
||||||
@ -288,7 +289,7 @@ class JOIN :public Sql_alloc
|
|||||||
}
|
}
|
||||||
|
|
||||||
JOIN(JOIN &join)
|
JOIN(JOIN &join)
|
||||||
:fields_list(join.fields_list)
|
:Sql_alloc(), fields_list(join.fields_list)
|
||||||
{
|
{
|
||||||
init(join.thd, join.fields_list, join.select_options,
|
init(join.thd, join.fields_list, join.select_options,
|
||||||
join.result);
|
join.result);
|
||||||
|
@ -216,6 +216,8 @@ typedef struct st_table_share
|
|||||||
/* Information for one open table */
|
/* Information for one open table */
|
||||||
|
|
||||||
struct st_table {
|
struct st_table {
|
||||||
|
st_table() {} /* Remove gcc warning */
|
||||||
|
|
||||||
TABLE_SHARE *s;
|
TABLE_SHARE *s;
|
||||||
handler *file;
|
handler *file;
|
||||||
#ifdef NOT_YET
|
#ifdef NOT_YET
|
||||||
@ -490,6 +492,7 @@ public:
|
|||||||
|
|
||||||
typedef struct st_table_list
|
typedef struct st_table_list
|
||||||
{
|
{
|
||||||
|
st_table_list() {} /* Remove gcc warning */
|
||||||
/*
|
/*
|
||||||
List of tables local to a subquery (used by SQL_LIST). Considers
|
List of tables local to a subquery (used by SQL_LIST). Considers
|
||||||
views as leaves (unlike 'next_leaf' below). Created at parse time
|
views as leaves (unlike 'next_leaf' below). Created at parse time
|
||||||
@ -722,6 +725,7 @@ class Item;
|
|||||||
class Field_iterator: public Sql_alloc
|
class Field_iterator: public Sql_alloc
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Field_iterator() {} /* Remove gcc warning */
|
||||||
virtual ~Field_iterator() {}
|
virtual ~Field_iterator() {}
|
||||||
virtual void set(TABLE_LIST *)= 0;
|
virtual void set(TABLE_LIST *)= 0;
|
||||||
virtual void next()= 0;
|
virtual void next()= 0;
|
||||||
|
@ -973,6 +973,7 @@ static const String tz_SYSTEM_name("SYSTEM", 6, &my_charset_latin1);
|
|||||||
class Time_zone_system : public Time_zone
|
class Time_zone_system : public Time_zone
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Time_zone_system() {} /* Remove gcc warning */
|
||||||
virtual my_time_t TIME_to_gmt_sec(const TIME *t,
|
virtual my_time_t TIME_to_gmt_sec(const TIME *t,
|
||||||
my_bool *in_dst_time_gap) const;
|
my_bool *in_dst_time_gap) const;
|
||||||
virtual void gmt_sec_to_TIME(TIME *tmp, my_time_t t) const;
|
virtual void gmt_sec_to_TIME(TIME *tmp, my_time_t t) const;
|
||||||
@ -1066,6 +1067,7 @@ Time_zone_system::get_name() const
|
|||||||
class Time_zone_utc : public Time_zone
|
class Time_zone_utc : public Time_zone
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Time_zone_utc() {} /* Remove gcc warning */
|
||||||
virtual my_time_t TIME_to_gmt_sec(const TIME *t,
|
virtual my_time_t TIME_to_gmt_sec(const TIME *t,
|
||||||
my_bool *in_dst_time_gap) const;
|
my_bool *in_dst_time_gap) const;
|
||||||
virtual void gmt_sec_to_TIME(TIME *tmp, my_time_t t) const;
|
virtual void gmt_sec_to_TIME(TIME *tmp, my_time_t t) const;
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
class Time_zone: public Sql_alloc
|
class Time_zone: public Sql_alloc
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Time_zone() {} /* Remove gcc warning */
|
||||||
/*
|
/*
|
||||||
Converts local time in broken down TIME representation to
|
Converts local time in broken down TIME representation to
|
||||||
my_time_t (UTC seconds since Epoch) represenation.
|
my_time_t (UTC seconds since Epoch) represenation.
|
||||||
|
@ -61,12 +61,15 @@ typedef struct charset_info_st CHARSET_INFO;
|
|||||||
*/
|
*/
|
||||||
class NdbDictionary {
|
class NdbDictionary {
|
||||||
public:
|
public:
|
||||||
|
NdbDictionary() {} /* Remove gcc warning */
|
||||||
/**
|
/**
|
||||||
* @class Object
|
* @class Object
|
||||||
* @brief Meta information about a database object (a table, index, etc)
|
* @brief Meta information about a database object (a table, index, etc)
|
||||||
*/
|
*/
|
||||||
class Object {
|
class Object {
|
||||||
public:
|
public:
|
||||||
|
Object() {} /* Remove gcc warning */
|
||||||
|
virtual ~Object() {} /* Remove gcc warning */
|
||||||
/**
|
/**
|
||||||
* Status of object
|
* Status of object
|
||||||
*/
|
*/
|
||||||
|
@ -14724,9 +14724,9 @@ static void test_bug12744()
|
|||||||
|
|
||||||
mysql_close(mysql);
|
mysql_close(mysql);
|
||||||
|
|
||||||
if (rc= mysql_stmt_execute(prep_stmt))
|
if ((rc= mysql_stmt_execute(prep_stmt)))
|
||||||
{
|
{
|
||||||
if (rc= mysql_stmt_reset(prep_stmt))
|
if ((rc= mysql_stmt_reset(prep_stmt)))
|
||||||
printf("OK!\n");
|
printf("OK!\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user