Skip to content

Commit c2ad45b

Browse files
committed
fixing NON-PS compilation issue.
1 parent 83a9e36 commit c2ad45b

File tree

6 files changed

+77
-2
lines changed

6 files changed

+77
-2
lines changed

include/mysql/psi/mysql_sp.h

+3
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
NULL
6161
#endif
6262

63+
#ifdef HAVE_PSI_SP_INTERFACE
6364
/**
6465
Enum values for the various OBJECT_TYPE.
6566
*/
@@ -106,3 +107,5 @@ inline_mysql_get_sp_share(uint object_type,
106107
object_name, object_name_length);
107108
}
108109
#endif
110+
111+
#endif

sql/event_data_objects.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ void init_scheduler_psi_keys()
4646

4747
PSI_server->register_statement(category, & Event_queue_element_for_exec::psi_info, 1);
4848
}
49-
#endif
5049

5150
PSI_statement_info Event_queue_element_for_exec::psi_info=
5251
{ 0, "event", 0};
52+
#endif
5353

5454
/*************************************************************************/
5555

sql/event_data_objects.h

+2
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,15 @@ class Event_queue_element_for_exec
5050
/* Prevent use of these */
5151
Event_queue_element_for_exec(const Event_queue_element_for_exec &);
5252
void operator=(Event_queue_element_for_exec &);
53+
#ifdef HAVE_PSI_INTERFACE
5354
public:
5455
PSI_statement_info* get_psi_info()
5556
{
5657
return & psi_info;
5758
}
5859

5960
static PSI_statement_info psi_info;
61+
#endif
6062
};
6163

6264

sql/sp.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1631,7 +1631,7 @@ sp_drop_db_routines(THD *thd, char *db)
16311631
uint db_name_length= strlen(db);
16321632

16331633
enum_sp_object_type sp_type;
1634-
if (table->field[MYSQL_PROC_MYSQL_TYPE]->ptr[0] == '2')
1634+
if ((int)table->field[MYSQL_PROC_MYSQL_TYPE]->ptr[0] == (int)SP_TYPE_FUNCTION)
16351635
{
16361636
sp_type= SP_OBJECT_TYPE_FUNCTION;
16371637
}

sql/sp_instr.cc

+34
Original file line numberDiff line numberDiff line change
@@ -719,8 +719,10 @@ void sp_lex_instr::get_query(String *sql_query) const
719719
// sp_instr_stmt implementation.
720720
///////////////////////////////////////////////////////////////////////////
721721

722+
#ifdef HAVE_PSI_INTERFACE
722723
PSI_statement_info sp_instr_stmt::psi_info=
723724
{ 0, "stmt", 0};
725+
#endif
724726

725727
bool sp_instr_stmt::execute(THD *thd, uint *nextp)
726728
{
@@ -899,8 +901,10 @@ bool sp_instr_stmt::exec_core(THD *thd, uint *nextp)
899901
// sp_instr_set implementation.
900902
///////////////////////////////////////////////////////////////////////////
901903

904+
#ifdef HAVE_PSI_INTERFACE
902905
PSI_statement_info sp_instr_set::psi_info=
903906
{ 0, "set", 0};
907+
#endif
904908

905909
bool sp_instr_set::exec_core(THD *thd, uint *nextp)
906910
{
@@ -948,8 +952,10 @@ void sp_instr_set::print(String *str)
948952
// sp_instr_set_trigger_field implementation.
949953
///////////////////////////////////////////////////////////////////////////
950954

955+
#ifdef HAVE_PSI_INTERFACE
951956
PSI_statement_info sp_instr_set_trigger_field::psi_info=
952957
{ 0, "set_trigger_field", 0};
958+
#endif
953959

954960
bool sp_instr_set_trigger_field::exec_core(THD *thd, uint *nextp)
955961
{
@@ -999,8 +1005,10 @@ void sp_instr_set_trigger_field::cleanup_before_parsing(THD *thd)
9991005
// sp_instr_jump implementation.
10001006
///////////////////////////////////////////////////////////////////////////
10011007

1008+
#ifdef HAVE_PSI_INTERFACE
10021009
PSI_statement_info sp_instr_jump::psi_info=
10031010
{ 0, "jump", 0};
1011+
#endif
10041012

10051013
void sp_instr_jump::print(String *str)
10061014
{
@@ -1056,8 +1064,10 @@ void sp_instr_jump::opt_move(uint dst, List<sp_branch_instr> *bp)
10561064
// sp_instr_jump_if_not class implementation
10571065
///////////////////////////////////////////////////////////////////////////
10581066

1067+
#ifdef HAVE_PSI_INTERFACE
10591068
PSI_statement_info sp_instr_jump_if_not::psi_info=
10601069
{ 0, "jump_if_not", 0};
1070+
#endif
10611071

10621072
bool sp_instr_jump_if_not::exec_core(THD *thd, uint *nextp)
10631073
{
@@ -1150,8 +1160,10 @@ void sp_lex_branch_instr::opt_move(uint dst, List<sp_branch_instr> *bp)
11501160
// sp_instr_jump_case_when implementation.
11511161
///////////////////////////////////////////////////////////////////////////
11521162

1163+
#ifdef HAVE_PSI_INTERFACE
11531164
PSI_statement_info sp_instr_jump_case_when::psi_info=
11541165
{ 0, "jump_case_when", 0};
1166+
#endif
11551167

11561168
bool sp_instr_jump_case_when::exec_core(THD *thd, uint *nextp)
11571169
{
@@ -1229,8 +1241,10 @@ bool sp_instr_jump_case_when::build_expr_items(THD *thd)
12291241
// sp_instr_freturn implementation.
12301242
///////////////////////////////////////////////////////////////////////////
12311243

1244+
#ifdef HAVE_PSI_INTERFACE
12321245
PSI_statement_info sp_instr_freturn::psi_info=
12331246
{ 0, "freturn", 0};
1247+
#endif
12341248

12351249
bool sp_instr_freturn::exec_core(THD *thd, uint *nextp)
12361250
{
@@ -1269,8 +1283,10 @@ void sp_instr_freturn::print(String *str)
12691283
// sp_instr_hpush_jump implementation.
12701284
///////////////////////////////////////////////////////////////////////////
12711285

1286+
#ifdef HAVE_PSI_INTERFACE
12721287
PSI_statement_info sp_instr_hpush_jump::psi_info=
12731288
{ 0, "hpush_jump", 0};
1289+
#endif
12741290

12751291
bool sp_instr_hpush_jump::execute(THD *thd, uint *nextp)
12761292
{
@@ -1333,8 +1349,10 @@ uint sp_instr_hpush_jump::opt_mark(sp_head *sp, List<sp_instr> *leads)
13331349
// sp_instr_hpop implementation.
13341350
///////////////////////////////////////////////////////////////////////////
13351351

1352+
#ifdef HAVE_PSI_INTERFACE
13361353
PSI_statement_info sp_instr_hpop::psi_info=
13371354
{ 0, "hpop", 0};
1355+
#endif
13381356

13391357
bool sp_instr_hpop::execute(THD *thd, uint *nextp)
13401358
{
@@ -1348,8 +1366,10 @@ bool sp_instr_hpop::execute(THD *thd, uint *nextp)
13481366
// sp_instr_hreturn implementation.
13491367
///////////////////////////////////////////////////////////////////////////
13501368

1369+
#ifdef HAVE_PSI_INTERFACE
13511370
PSI_statement_info sp_instr_hreturn::psi_info=
13521371
{ 0, "hreturn", 0};
1372+
#endif
13531373

13541374
bool sp_instr_hreturn::execute(THD *thd, uint *nextp)
13551375
{
@@ -1418,8 +1438,10 @@ uint sp_instr_hreturn::opt_mark(sp_head *sp, List<sp_instr> *leads)
14181438
// sp_instr_cpush implementation.
14191439
///////////////////////////////////////////////////////////////////////////
14201440

1441+
#ifdef HAVE_PSI_INTERFACE
14211442
PSI_statement_info sp_instr_cpush::psi_info=
14221443
{ 0, "cpush", 0};
1444+
#endif
14231445

14241446
bool sp_instr_cpush::execute(THD *thd, uint *nextp)
14251447
{
@@ -1469,8 +1491,10 @@ void sp_instr_cpush::print(String *str)
14691491
// sp_instr_cpop implementation.
14701492
///////////////////////////////////////////////////////////////////////////
14711493

1494+
#ifdef HAVE_PSI_INTERFACE
14721495
PSI_statement_info sp_instr_cpop::psi_info=
14731496
{ 0, "cpop", 0};
1497+
#endif
14741498

14751499
bool sp_instr_cpop::execute(THD *thd, uint *nextp)
14761500
{
@@ -1495,8 +1519,10 @@ void sp_instr_cpop::print(String *str)
14951519
// sp_instr_copen implementation.
14961520
///////////////////////////////////////////////////////////////////////////
14971521

1522+
#ifdef HAVE_PSI_INTERFACE
14981523
PSI_statement_info sp_instr_copen::psi_info=
14991524
{ 0, "copen", 0};
1525+
#endif
15001526

15011527
bool sp_instr_copen::execute(THD *thd, uint *nextp)
15021528
{
@@ -1568,8 +1594,10 @@ void sp_instr_copen::print(String *str)
15681594
// sp_instr_cclose implementation.
15691595
///////////////////////////////////////////////////////////////////////////
15701596

1597+
#ifdef HAVE_PSI_INTERFACE
15711598
PSI_statement_info sp_instr_cclose::psi_info=
15721599
{ 0, "cclose", 0};
1600+
#endif
15731601

15741602
bool sp_instr_cclose::execute(THD *thd, uint *nextp)
15751603
{
@@ -1609,8 +1637,10 @@ void sp_instr_cclose::print(String *str)
16091637
// sp_instr_cfetch implementation.
16101638
///////////////////////////////////////////////////////////////////////////
16111639

1640+
#ifdef HAVE_PSI_INTERFACE
16121641
PSI_statement_info sp_instr_cfetch::psi_info=
16131642
{ 0, "cfetch", 0};
1643+
#endif
16141644

16151645
bool sp_instr_cfetch::execute(THD *thd, uint *nextp)
16161646
{
@@ -1661,8 +1691,10 @@ void sp_instr_cfetch::print(String *str)
16611691
// sp_instr_error implementation.
16621692
///////////////////////////////////////////////////////////////////////////
16631693

1694+
#ifdef HAVE_PSI_INTERFACE
16641695
PSI_statement_info sp_instr_error::psi_info=
16651696
{ 0, "error", 0};
1697+
#endif
16661698

16671699
void sp_instr_error::print(String *str)
16681700
{
@@ -1678,8 +1710,10 @@ void sp_instr_error::print(String *str)
16781710
// sp_instr_set_case_expr implementation.
16791711
///////////////////////////////////////////////////////////////////////////
16801712

1713+
#ifdef HAVE_PSI_INTERFACE
16811714
PSI_statement_info sp_instr_set_case_expr::psi_info=
16821715
{ 0, "set_case_expr", 0};
1716+
#endif
16831717

16841718
bool sp_instr_set_case_expr::exec_core(THD *thd, uint *nextp)
16851719
{

0 commit comments

Comments
 (0)