Skip to content

Commit 8f51df7

Browse files
authored
Merge pull request #4799 from sysown/v3.0_session_parameter_tracking
Session parameter/variable tracking for PostgreSQL - v3.0
2 parents fdd744a + 9f7cb59 commit 8f51df7

37 files changed

+3740
-3947
lines changed

include/Base_Session.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ class MySQL_Session;
2121
class PgSQL_Session;
2222

2323
enum SESSION_FORWARD_TYPE : uint8_t {
24-
SESSION_FORWARD_TYPE_NONE = 0x00,
25-
SESSION_FORWARD_TYPE_PERMANENT = 0x01,
26-
SESSION_FORWARD_TYPE_TEMPORARY = 0x02,
27-
SESSION_FORWARD_TYPE_COPY_STDIN = 0x04 | SESSION_FORWARD_TYPE_TEMPORARY,
28-
SESSION_FORWARD_TYPE_START_REPLICATION = 0x08 | SESSION_FORWARD_TYPE_TEMPORARY,
24+
SESSION_FORWARD_TYPE_NONE = 0x00,
25+
SESSION_FORWARD_TYPE_PERMANENT = 0x01,
26+
SESSION_FORWARD_TYPE_TEMPORARY = 0x02,
27+
SESSION_FORWARD_TYPE_COPY_FROM_STDIN_STDOUT = 0x04 | SESSION_FORWARD_TYPE_TEMPORARY,
28+
SESSION_FORWARD_TYPE_START_REPLICATION = 0x08 | SESSION_FORWARD_TYPE_TEMPORARY,
2929
};
3030

3131
template<typename S, typename DS, typename B, typename T>

include/set_parser.h renamed to include/MySQL_Set_Stmt_Parser.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
#ifndef __CLASS_SET_PARSER_H
2-
#define __CLASS_SET_PARSER_H
1+
#ifndef __CLASS_MYSQL_SET_STMT_PARSER_H
2+
#define __CLASS_MYSQL_SET_STMT_PARSER_H
3+
34
#include <string>
45
#include <map>
56
#include <vector>
@@ -9,7 +10,7 @@
910

1011
//#define PARSERDEBUG
1112

12-
class SetParser {
13+
class MySQL_Set_Stmt_Parser {
1314
private:
1415
// parse1v2 variables used for compile the RE only once
1516
bool parse1v2_init;
@@ -20,13 +21,13 @@ class SetParser {
2021
#ifdef PARSERDEBUG
2122
int verbosity;
2223
public:
23-
SetParser(std::string q, int verb = 0);
24+
MySQL_Set_Stmt_Parser(std::string q, int verb = 0);
2425
#else
2526
public:
26-
SetParser(std::string q);
27+
MySQL_Set_Stmt_Parser(std::string q);
2728
#endif
28-
// set_query() allows to change the query associated to a SetParser.
29-
// This allow to parse multiple queries using just a single SetParser.
29+
// set_query() allows to change the query associated to a MySQL_Set_Stmt_Parser.
30+
// This allow to parse multiple queries using just a single MySQL_Set_Stmt_Parser.
3031
// At the moment this makes sense only when using parse1v2() because it
3132
// allows to compile the regular expression only once
3233
void set_query(const std::string& q);
@@ -48,8 +49,7 @@ class SetParser {
4849
// built-in testing
4950
void test_parse_USE_query();
5051
#endif // DEBUG
51-
~SetParser();
52+
~MySQL_Set_Stmt_Parser();
5253
};
5354

54-
55-
#endif /* __CLASS_SET_PARSER_H */
55+
#endif /* __CLASS_MYSQL_SET_STMT_PARSER_H */

include/MySQL_Thread.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#include "prometheus_helpers.h"
1616

17-
#include "set_parser.h"
17+
#include "MySQL_Set_Stmt_Parser.h"
1818

1919
/*
2020
#define MIN_POLL_LEN 8
@@ -192,7 +192,7 @@ class __attribute__((aligned(64))) MySQL_Thread : public Base_Thread
192192
pthread_mutex_t thread_mutex;
193193

194194
// if set_parser_algorithm == 2 , a single thr_SetParser is used
195-
SetParser *thr_SetParser;
195+
MySQL_Set_Stmt_Parser* thr_SetParser;
196196

197197
MySQL_Thread();
198198
~MySQL_Thread();

0 commit comments

Comments
 (0)