~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pbms/src/parameters_ms.cc

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:26:39 UTC
  • mfrom: (2157.2.2 give-in-to-pkg-config)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172639-nhy7i72sfhoq13ms
Merged in pkg-config fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (c) 2010 PrimeBase Technologies GmbH, Germany
 
1
/* Copyright (C) 2010 PrimeBase Technologies GmbH, Germany
2
2
 *
3
3
 * PrimeBase Media Stream for MySQL
4
4
 *
14
14
 *
15
15
 * You should have received a copy of the GNU General Public License
16
16
 * along with this program; if not, write to the Free Software
17
 
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
17
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
18
 *
19
19
 * Barry Leslie
20
20
 *
30
30
#include <drizzled/common.h>
31
31
#include <drizzled/plugin.h>
32
32
#include <drizzled/session.h>
33
 
using namespace drizzled;
34
 
using namespace drizzled::plugin;
 
33
 
35
34
 
36
35
#define my_strdup(a,b) strdup(a)
37
36
 
44
43
#endif 
45
44
 
46
45
#include <inttypes.h>
 
46
#include <string.h>
47
47
 
48
48
#include "cslib/CSDefs.h"
49
49
#include "cslib/CSObject.h"
57
57
#include "database_ms.h"
58
58
#include "parameters_ms.h"
59
59
 
 
60
using namespace std;
 
61
using namespace drizzled;
 
62
using namespace drizzled::plugin;
 
63
 
 
64
#include <drizzled/module/option_map.h>
 
65
#include <boost/program_options.hpp>
 
66
namespace po= boost::program_options;
60
67
#ifndef PBMS_PORT
61
68
#define PBMS_PORT 8080
62
69
#endif
63
70
 
64
 
 
65
 
static int my_port_number = PBMS_PORT;
 
71
/* Note: 'new' used here is NOT CSObject::new which is a DEBUG define*/
 
72
#ifdef new
 
73
#undef new
 
74
#endif
 
75
 
 
76
 
 
77
#ifdef DRIZZLED
 
78
static port_constraint pbms_port_number;
 
79
 
 
80
static std::string my_repository_threshold;
 
81
static std::string my_temp_log_threshold;
 
82
static std::string my_http_metadata_headers;
 
83
 
 
84
typedef drizzled::constrained_check<uint32_t, 100, 0> percent_constraint;
 
85
static percent_constraint my_garbage_threshold;
 
86
static uint32_nonzero_constraint my_temp_blob_timeout;
 
87
static uint32_nonzero_constraint my_max_keep_alive;
 
88
static uint32_nonzero_constraint my_backup_db_id;
 
89
 
 
90
static uint32_t my_server_id = 1;
 
91
#else
 
92
uint32_t pbms_port_number;
66
93
 
67
94
static char             *my_repository_threshold = NULL;
68
95
static char             *my_temp_log_threshold = NULL;
74
101
 
75
102
static u_long   my_backup_db_id = 1;
76
103
static uint32_t my_server_id = 1;
 
104
#endif
77
105
 
78
106
#ifdef DRIZZLED
79
107
static set<string> my_black_list;
81
109
static CSMutex my_table_list_lock;
82
110
 
83
111
typedef enum {MATCH_ALL, MATCH_DBS, MATCH_SOME, MATCH_NONE, MATCH_UNKNOWN, MATCH_ERROR} TableMatchState;
84
 
static char *my_table_list = NULL;
85
 
static const char *dflt_my_table_list = "*";
 
112
static std::string my_table_list;
86
113
 
87
114
static TableMatchState my_table_match = MATCH_UNKNOWN;
88
115
 
89
 
static int32_t my_before_insert_position= 1;      // Call this event observer first.
90
 
static int32_t my_before_update_position= 1;
 
116
typedef constrained_check<int32_t, INT32_MAX-1, 1> before_position_constraint;
 
117
static before_position_constraint my_before_insert_position;      // Call this event observer first.
 
118
static before_position_constraint my_before_update_position;
91
119
 
92
120
using namespace drizzled;
93
121
using namespace drizzled::plugin;
121
149
#endif
122
150
 
123
151
//--------------
124
 
uint32_t PBMSParameters::getPortNumber(){ return my_port_number;}
 
152
uint32_t PBMSParameters::getPortNumber(){ return pbms_port_number;}
125
153
 
126
154
//--------------
127
155
uint32_t PBMSParameters::getServerID(){ return my_server_id;}
129
157
//--------------
130
158
uint64_t PBMSParameters::getRepoThreshold()
131
159
{
 
160
#ifdef DRIZZLED
 
161
  return (uint64_t) cs_byte_size_to_int8(my_repository_threshold.c_str());
 
162
#else
132
163
        if (my_repository_threshold)
133
164
                return((uint64_t) cs_byte_size_to_int8(my_repository_threshold));
134
165
 
135
166
        return((uint64_t) cs_byte_size_to_int8(MS_REPO_THRESHOLD_DEF));
 
167
#endif
136
168
}
137
169
 
138
170
//--------------
139
171
uint64_t PBMSParameters::getTempLogThreshold()
140
172
{
 
173
#ifdef DRIZZLED
 
174
  return (uint64_t) cs_byte_size_to_int8(my_temp_log_threshold.c_str());
 
175
#else
141
176
        if (my_temp_log_threshold)
142
177
                return((uint64_t) cs_byte_size_to_int8(my_temp_log_threshold));
143
178
 
144
179
        return((uint64_t) cs_byte_size_to_int8(MS_TEMP_LOG_THRESHOLD_DEF));
 
180
#endif
145
181
}
146
182
 
147
183
//--------------
148
 
uint32_t PBMSParameters::getTempBlobTimeout(){ return my_temp_blob_timeout;}
149
 
 
150
 
//--------------
151
 
uint32_t PBMSParameters::getGarbageThreshold(){ return my_garbage_threshold;}
152
 
 
153
 
//--------------
154
 
uint32_t PBMSParameters::getMaxKeepAlive(){ return my_max_keep_alive;}
 
184
uint32_t PBMSParameters::getTempBlobTimeout(){ return static_cast<uint32_t>(my_temp_blob_timeout);}
 
185
 
 
186
//--------------
 
187
uint32_t PBMSParameters::getGarbageThreshold(){ return static_cast<uint32_t>(my_garbage_threshold);}
 
188
 
 
189
//--------------
 
190
uint32_t PBMSParameters::getMaxKeepAlive(){ return static_cast<uint32_t>(my_max_keep_alive);}
155
191
 
156
192
//--------------
157
193
const char * PBMSParameters::getDefaultMetaDataHeaders()
158
194
{
 
195
#ifdef DRIZZLED
 
196
        return my_http_metadata_headers.c_str();
 
197
#else
159
198
        if (my_http_metadata_headers)
160
199
                return my_http_metadata_headers; 
161
200
                
162
201
        return MS_HTTP_METADATA_HEADERS_DEF; 
 
202
#endif
163
203
}
164
204
 
165
205
//-----------------
166
 
uint32_t PBMSParameters::getBackupDatabaseID() { return my_backup_db_id;}
 
206
uint32_t PBMSParameters::getBackupDatabaseID() { return static_cast<uint32_t>(my_backup_db_id);}
167
207
 
168
208
//-----------------
169
209
void PBMSParameters::setBackupDatabaseID(uint32_t id) { my_backup_db_id = id;}
292
332
        return NULL;
293
333
}
294
334
 
 
335
#ifdef DRIZZLED
 
336
static void temp_blob_timeout_update(Session*, sql_var_t)
 
337
{
 
338
        CSThread                *self;
 
339
        PBMSResultRec   result;
 
340
        
 
341
        if (MSEngine::enterConnectionNoThd(&self, &result))
 
342
                return;
 
343
        try_(a) {
 
344
                MSDatabase::wakeTempLogThreads();
 
345
        }
 
346
        
 
347
        catch_(a);
 
348
        cont_(a);
 
349
}
 
350
//----------
 
351
static int table_list_validate(Session*, set_var *var)
 
352
{
 
353
        const char *list= var->value->str_value.ptr();
 
354
        if (list == NULL)
 
355
                return 1;
 
356
 
 
357
        TableMatchState state = set_match_type(list);
 
358
        if (state == MATCH_ERROR)
 
359
                return 1;
 
360
                
 
361
        std::string new_list(list);
 
362
 
 
363
        my_table_list_lock.lock();
 
364
        my_table_list.swap(new_list);
 
365
        my_table_match = state;
 
366
        my_table_list_lock.unlock();
 
367
 
 
368
        return 0;
 
369
}
 
370
 
 
371
//----------
 
372
#endif
 
373
 
295
374
//--------------
296
375
// Parameter update functions are not called for parameters that are set on
297
376
// the command line. PBMSParameters::startUp() will perform any initialization required.
298
 
void PBMSParameters::startUp()
 
377
#ifdef DRIZZLED
 
378
void PBMSParameters::startUp(drizzled::module::Context &context)
 
379
#else
 
380
void PBMSParameters::startup()
 
381
#endif
299
382
 
383
 
 
384
#ifdef DRIZZLED
 
385
        my_table_match = set_match_type(my_table_list.c_str());
 
386
        const module::option_map &vm= context.getOptions();
 
387
        my_events_enabled= (vm.count("watch-disable")) ? false : true;
 
388
 
 
389
        context.registerVariable(new sys_var_constrained_value_readonly<in_port_t>("port",
 
390
                                                                         pbms_port_number));
 
391
        context.registerVariable(new sys_var_std_string("repository_threshold",
 
392
                                                        my_repository_threshold));
 
393
        context.registerVariable(new sys_var_std_string("temp_log_threshold",
 
394
                                                        my_temp_log_threshold));
 
395
        context.registerVariable(new sys_var_const_string("http_metadata_headers",
 
396
                                                          my_http_metadata_headers));
 
397
        context.registerVariable(new sys_var_constrained_value_readonly<uint32_t>("garbage_threshold", my_garbage_threshold));
 
398
        context.registerVariable(new sys_var_constrained_value<uint32_t>("temp_blob_timeout",
 
399
                                                                         my_temp_blob_timeout,
 
400
                                                                         temp_blob_timeout_update));
 
401
        context.registerVariable(new sys_var_constrained_value<uint32_t>("max_keep_alive",
 
402
                                                                         my_max_keep_alive));
 
403
        context.registerVariable(new sys_var_constrained_value<uint32_t>("next_backup_db_id",
 
404
                                                                         my_backup_db_id));
 
405
        context.registerVariable(new sys_var_std_string("watch_tables",
 
406
                                                        my_table_list,
 
407
                                                        table_list_validate));
 
408
        context.registerVariable(new sys_var_bool_ptr("watch_enable",
 
409
                                                      &my_events_enabled));
 
410
        context.registerVariable(new sys_var_constrained_value<int32_t>("before_insert_position",
 
411
                                                                        my_before_insert_position));
 
412
        context.registerVariable(new sys_var_constrained_value<int32_t>("before_update_position",
 
413
                                                                        my_before_update_position));
 
414
 
 
415
#else
300
416
        my_table_match = set_match_type(my_table_list);
301
 
}
 
417
#endif
 
418
}
 
419
 
 
420
 
 
421
#ifdef DRIZZLED
 
422
void PBMSParameters::initOptions(drizzled::module::option_context &context)
 
423
{
 
424
        context("port",
 
425
                po::value<port_constraint>(&pbms_port_number)->default_value(DEFAULT_PBMS_PORT),
 
426
                _("Port number to use for connection or 0 for default PBMS port "));
 
427
        context("repository-threshold",
 
428
                po::value<std::string>(&my_repository_threshold)->default_value(MS_REPO_THRESHOLD_DEF),
 
429
                _("The maximum size of a BLOB repository file."));
 
430
        context("temp-log-threshold",
 
431
                po::value<std::string>(&my_temp_log_threshold)->default_value(MS_TEMP_LOG_THRESHOLD_DEF),
 
432
                _("The maximum size of a temorary BLOB log file."));
 
433
        context("http-metadata-headers",
 
434
                po::value<std::string>(&my_http_metadata_headers)->default_value(MS_HTTP_METADATA_HEADERS_DEF),
 
435
                _("A ':' delimited list of metadata header names to be used to initialize "
 
436
                   "the pbms_metadata_header table when a database is created."));
 
437
        context("garbage-threshold",
 
438
                po::value<percent_constraint>(&my_garbage_threshold)->default_value(MS_DEFAULT_GARBAGE_LEVEL),
 
439
                _("The percentage of garbage in a repository file before it is compacted."));
 
440
        context("temp-blob-timeout",
 
441
                po::value<uint32_nonzero_constraint>(&my_temp_blob_timeout)->default_value(MS_DEFAULT_TEMP_LOG_WAIT),
 
442
                _("The timeout, in seconds, for temporary BLOBs. Uploaded blob data is removed after this time, unless committed to the database."));
 
443
        context("max-keep-alive",
 
444
                po::value<uint32_nonzero_constraint>(&my_temp_blob_timeout)->default_value(MS_DEFAULT_KEEP_ALIVE),
 
445
                _("The timeout, in milli-seconds, before the HTTP server will close an inactive HTTP connection."));
 
446
        context("next-backup-db-id",
 
447
                po::value<uint32_nonzero_constraint>(&my_backup_db_id)->default_value(1),
 
448
                _("The next backup ID to use when backing up a PBMS database."));
 
449
        context("watch-tables",
 
450
                po::value<std::string>(&my_table_list)->default_value("*"),
 
451
                _("A comma delimited list of tables to watch of the format: <database>.<table>, ..."));
 
452
        context("watch-disable",
 
453
                _("Enable PBMS daemon Insert/Update/Delete event scanning"));
 
454
 
 
455
        context("before-insert-position",
 
456
                po::value<before_position_constraint>(&my_before_insert_position)->default_value(1),
 
457
                _("Before insert row event observer call position"));
 
458
 
 
459
        context("before-update-position",
 
460
                po::value<before_position_constraint>(&my_before_update_position)->default_value(1),
 
461
                _("Before update row event observer call position"));
 
462
 
 
463
}
 
464
#endif
302
465
 
303
466
//-----------------
304
467
bool PBMSParameters::isBlackListedDB(const char *db)
316
479
}               
317
480
 
318
481
//-----------------
 
482
bool PBMSParameters::try_LocateDB(CSThread *self, const char *db, bool *found)
 
483
{
 
484
        volatile bool rtc = true;
 
485
        try_(a) {
 
486
                lock_(&my_table_list_lock);     
 
487
                
 
488
                        
 
489
                *found = (locate_db(my_table_list.c_str(), db, strlen(db)) != NULL);
 
490
                        
 
491
                unlock_(&my_table_list_lock);
 
492
                rtc = false;
 
493
        }
 
494
        
 
495
        catch_(a)
 
496
        cont_(a);
 
497
        return rtc;
 
498
}
 
499
 
 
500
//-----------------
319
501
bool PBMSParameters::isBLOBDatabase(const char *db)
320
502
{
321
 
        CSThread *self;
 
503
        CSThread *self= NULL;
322
504
        int             err;
323
505
        PBMSResultRec result;
324
506
        bool found = false;
327
509
                return false;
328
510
                
329
511
        if (my_table_match == MATCH_UNKNOWN)
330
 
                my_table_match = set_match_type(my_table_list);
 
512
        {
 
513
                try_(a) {
 
514
                        lock_(&my_table_list_lock);     
 
515
                        my_table_match = set_match_type(my_table_list.c_str());
 
516
                        unlock_(&my_table_list_lock);
 
517
                }
 
518
 
 
519
                catch_(a)
 
520
                cont_(a);
 
521
        }
331
522
 
332
523
        if (my_table_match == MATCH_NONE)
333
524
                return false;
338
529
        if ((err = MSEngine::enterConnectionNoThd(&self, &result)) == 0) {
339
530
 
340
531
                inner_();
341
 
                try_(a) {
342
 
                        lock_(&my_table_list_lock);     
343
 
                        
344
 
                                
345
 
                        found = (locate_db(my_table_list, db, strlen(db)) != NULL);
346
 
                                
347
 
                        unlock_(&my_table_list_lock);
348
 
                }
349
 
                
350
 
                catch_(a) {
 
532
                if (try_LocateDB(self, db, &found)) {
351
533
                        err = MSEngine::exceptionToResult(&self->myException, &result);
352
 
                }
353
 
                cont_(a);
 
534
                }               
354
535
                outer_();
355
536
        
356
537
        }
364
545
}
365
546
        
366
547
//-----------------
 
548
bool PBMSParameters::try_LocateTable(CSThread *self, const char *db, const char *table, bool *found)
 
549
{
 
550
        volatile bool rtc = true;
 
551
        try_(a) {
 
552
                int db_len, table_len, match_len;
 
553
                
 
554
                lock_(&my_table_list_lock);     
 
555
                                
 
556
                db_len = strlen(db);
 
557
                table_len = strlen(table);
 
558
                
 
559
                const char *ptr = my_table_list.c_str();
 
560
                while (ptr) {
 
561
                        ptr = locate_db(ptr, db, db_len);
 
562
                        if (ptr) {
 
563
                                match_len = 0;
 
564
                                if (*ptr == '*')
 
565
                                        match_len = 1;
 
566
                                else if (strncmp(ptr, table, table_len) == 0)
 
567
                                        match_len = table_len;
 
568
                                        
 
569
                                if (match_len) {
 
570
                                        ptr += match_len;
 
571
                                        if ((!*ptr) || (*ptr == ',') || isspace(*ptr)) {
 
572
                                                *found = true;
 
573
                                                break;
 
574
                                        }
 
575
                                }
 
576
                                
 
577
                                NEXT_IN_TABLE_LIST(ptr);
 
578
                        }
 
579
                }
 
580
                        
 
581
                unlock_(&my_table_list_lock);
 
582
                rtc = false;
 
583
        }
 
584
        
 
585
        catch_(a)
 
586
        cont_(a);
 
587
        return rtc;
 
588
}
 
589
 
 
590
//-----------------
367
591
bool PBMSParameters::isBLOBTable(const char *db, const char *table)
368
592
{
369
 
        CSThread *self;
 
593
        CSThread *self= NULL;
370
594
        int             err;
371
595
        PBMSResultRec result;
372
596
        bool found = false;
373
 
        const char *ptr;
374
 
        int db_len, table_len, match_len;
375
597
        
376
598
        if (isBlackListedDB(db))
377
599
                return false;
378
600
                
379
601
        if (my_table_match == MATCH_UNKNOWN)
380
 
                my_table_match = set_match_type(my_table_list);
 
602
        {
 
603
                try_(a) {
 
604
                        lock_(&my_table_list_lock);     
 
605
                        my_table_match = set_match_type(my_table_list.c_str());
 
606
                        unlock_(&my_table_list_lock);
 
607
                }
 
608
 
 
609
                catch_(a)
 
610
                cont_(a);
 
611
        }
381
612
 
382
613
        if (my_table_match == MATCH_NONE)
383
614
                return false;
388
619
        if ((err = MSEngine::enterConnectionNoThd(&self, &result)) == 0) {
389
620
 
390
621
                inner_();
391
 
                try_(a) {
392
 
                        lock_(&my_table_list_lock);     
393
 
                                        
394
 
                        db_len = strlen(db);
395
 
                        table_len = strlen(table);
396
 
                        
397
 
                        ptr = my_table_list;
398
 
                        while (ptr) {
399
 
                                ptr = locate_db(ptr, db, db_len);
400
 
                                if (ptr) {
401
 
                                        match_len = 0;
402
 
                                        if (*ptr == '*')
403
 
                                                match_len = 1;
404
 
                                        else if (strncmp(ptr, table, table_len) == 0)
405
 
                                                match_len = table_len;
406
 
                                                
407
 
                                        if (match_len) {
408
 
                                                ptr += match_len;
409
 
                                                if ((!*ptr) || (*ptr == ',') || isspace(*ptr)) {
410
 
                                                        found = true;
411
 
                                                        break;
412
 
                                                }
413
 
                                        }
414
 
                                        
415
 
                                        NEXT_IN_TABLE_LIST(ptr);
416
 
                                }
417
 
                        }
418
 
                                
419
 
                        unlock_(&my_table_list_lock);
420
 
                }
421
 
                catch_(a) {
 
622
                if (try_LocateTable(self, db, table, &found)) {
422
623
                        err = MSEngine::exceptionToResult(&self->myException, &result);
423
 
                }
424
 
                cont_(a);
 
624
                }               
425
625
                outer_();
426
626
        
427
627
        }
436
636
 
437
637
 
438
638
//-----------------
439
 
int32_t PBMSParameters::getBeforeUptateEventPosition() { return my_before_update_position;}
 
639
int32_t PBMSParameters::getBeforeUptateEventPosition() { return static_cast<int32_t>(my_before_update_position);}
440
640
 
441
641
//-----------------
442
 
int32_t PBMSParameters::getBeforeInsertEventPosition() { return my_before_insert_position;}
 
642
int32_t PBMSParameters::getBeforeInsertEventPosition() { return static_cast<int32_t>(my_before_insert_position);}
443
643
#endif // DRIZZLED
444
644
 
445
645
//-----------------
 
646
#ifndef DRIZZLED
446
647
static void pbms_temp_blob_timeout_func(THD *thd, struct st_mysql_sys_var *var, void *trg, CONST_SAVE void *save)
447
648
{
448
649
        CSThread                *self;
462
663
        catch_(a);
463
664
        cont_(a);
464
665
}
465
 
 
466
 
//-----------------
467
 
//-----------------
468
 
static MYSQL_SYSVAR_INT(port, my_port_number,
469
 
        PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY,
 
666
#endif
 
667
//-----------------
 
668
//-----------------
 
669
 
 
670
#ifndef DRIZZLED
 
671
 
 
672
static MYSQL_SYSVAR_UINT(port, pbms_port_number,
 
673
        PLUGIN_VAR_READONLY,
470
674
        "The port for the server stream-based communications.",
471
675
        NULL, NULL, PBMS_PORT, 0, 64*1024, 1);
472
676
 
506
710
        "The next backup ID to use when backing up a PBMS database.",
507
711
        NULL, NULL, 1, 1, UINT32_MAX, 1);
508
712
 
509
 
 
510
 
#ifdef DRIZZLED
511
 
 
512
 
//----------
513
 
static int check_table_list(THD *, struct st_mysql_sys_var *, void *save, drizzle_value *value)
514
 
{
515
 
        char buffer[100];
516
 
        int len = 100;
517
 
        const char *list = value->val_str(value, buffer, &len);
518
 
        TableMatchState state;
519
 
        
520
 
        state = set_match_type(list);
521
 
        if (state == MATCH_ERROR)
522
 
                return 1;
523
 
                
524
 
        char *new_list = strdup(list);
525
 
        if (!new_list)
526
 
                return 1;
527
 
        
528
 
        my_table_list_lock.lock();
529
 
        if (my_table_list && (my_table_list != dflt_my_table_list)) free(my_table_list);
530
 
        my_table_list = new_list;
531
 
        
532
 
        my_table_match = state;
533
 
        my_table_list_lock.unlock();
534
 
 
535
 
   *static_cast<const char**>(save)= my_table_list;
536
 
 
537
 
        return 0;
538
 
}
539
 
 
540
 
//----------
541
 
static void set_table_list(THD *, struct st_mysql_sys_var *, void *var_ptr, CONST_SAVE void *)
542
 
{
543
 
        // Everything was done in check_table_list()
544
 
  *static_cast<const char**>(var_ptr)= my_table_list;
545
 
}
546
 
 
547
 
//----------
548
 
 
549
 
static MYSQL_SYSVAR_STR(watch_tables,
550
 
                           my_table_list,
551
 
                           PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_MEMALLOC,
552
 
                           N_("A comma delimited list of tables to watch of the format: <database>.<table>, ..."),
553
 
                           check_table_list, /* check func */
554
 
                           set_table_list, /* update func */
555
 
                           dflt_my_table_list /* default */);
556
 
 
557
 
static MYSQL_SYSVAR_BOOL(watch_enable,
558
 
                           my_events_enabled,
559
 
                           PLUGIN_VAR_OPCMDARG,
560
 
                           N_("Enable PBMS daemon Insert/Update/Delete event scanning"),
561
 
                           NULL, /* check func */
562
 
                           NULL, /* update func */
563
 
                           true /* default */);
564
 
 
565
 
static MYSQL_SYSVAR_INT(before_insert_position,
566
 
                           my_before_insert_position,
567
 
                           PLUGIN_VAR_OPCMDARG,
568
 
                           N_("Before insert row event observer call position"),
569
 
                           NULL, /* check func */
570
 
                           NULL, /* update func */
571
 
                           1, /* default */
572
 
                           1, /* min */
573
 
                           INT32_MAX -1, /* max */
574
 
                           0 /* blk */);
575
 
 
576
 
static MYSQL_SYSVAR_INT(before_update_position,
577
 
                           my_before_update_position,
578
 
                           PLUGIN_VAR_OPCMDARG,
579
 
                           N_("Before update row event observer call position"),
580
 
                           NULL, /* check func */
581
 
                           NULL, /* update func */
582
 
                           1, /* default */
583
 
                           1, /* min */
584
 
                           INT32_MAX -1, /* max */
585
 
                           0 /* blk */);
586
 
 
587
 
#endif // DRIZZLED
588
 
 
589
713
struct st_mysql_sys_var* pbms_system_variables[] = {
590
714
        MYSQL_SYSVAR(port),
591
715
        MYSQL_SYSVAR(repository_threshold),
595
719
        MYSQL_SYSVAR(http_metadata_headers),
596
720
        MYSQL_SYSVAR(max_keep_alive),
597
721
        MYSQL_SYSVAR(next_backup_db_id),
598
 
        
599
 
#ifdef DRIZZLED
600
 
        MYSQL_SYSVAR(watch_tables),
601
 
        MYSQL_SYSVAR(watch_enable),
602
 
        
603
 
        MYSQL_SYSVAR(before_insert_position),
604
 
        MYSQL_SYSVAR(before_update_position),
605
 
#endif
606
 
  
607
722
        NULL
608
723
};
609
724
 
610
 
 
611
 
 
612
 
 
613
 
 
 
725
#endif // !DRIZZLED
 
726
 
 
727
 
 
728
// vim:noexpandtab:sts=8:sw=8:tabstop=8:smarttab: