-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- All (MariaDB and MySQL) events are now supported - Added new api functions: - mariadb_rpl_error: returns error message - mariadb_rpl_errno: returns error number - mariadb_rpl_extract_rows: extract values of ROW_EVENTS - Added decryption support - Added uncompression -
- Loading branch information
Showing
10 changed files
with
1,679 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "external/crypto_wrapper"] | ||
path = external/crypto_wrapper | ||
url = https://github.com/9EOR9/crypto_wrapper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule crypto_wrapper
added at
006ee6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* Copyright (C) 2000 Sergei Golubchik | ||
*/ | ||
|
||
#ifndef _decimal_h | ||
#define _decimal_h | ||
|
||
typedef enum {TRUNCATE=0, HALF_EVEN, HALF_UP, CEILING, FLOOR} decimal_round_mode; | ||
typedef int32 decimal_digit; | ||
|
||
typedef struct st_decimal { | ||
int intg, frac, len; | ||
my_bool sign; | ||
decimal_digit *buf; | ||
} decimal; | ||
|
||
int decimal2string(decimal *from, char *to, int *to_len); | ||
int bin2decimal(const char *from, decimal *to, int precision, int scale); | ||
|
||
int decimal_size(int precision, int scale); | ||
int decimal_bin_size(int precision, int scale); | ||
int decimal_result_size(decimal *from1, decimal *from2, char op, int param); | ||
|
||
|
||
/* set a decimal to zero */ | ||
|
||
#define decimal_make_zero(dec) do { \ | ||
(dec)->buf[0]=0; \ | ||
(dec)->intg=1; \ | ||
(dec)->frac=0; \ | ||
(dec)->sign=0; \ | ||
} while(0) | ||
|
||
/* | ||
returns the length of the buffer to hold string representation | ||
of the decimal (including decimal dot, possible sign and \0) | ||
*/ | ||
|
||
#define decimal_string_size(dec) ((dec)->intg + (dec)->frac + ((dec)->frac > 0) + 2) | ||
|
||
/* negate a decimal */ | ||
#define decimal_neg(dec) do { (dec)->sign^=1; } while(0) | ||
|
||
/* | ||
conventions: | ||
decimal_smth() == 0 -- everything's ok | ||
decimal_smth() <= 1 -- result is usable, but precision loss is possible | ||
decimal_smth() <= 2 -- result can be unusable, most significant digits | ||
could've been lost | ||
decimal_smth() > 2 -- no result was generated | ||
*/ | ||
|
||
#define E_DEC_OK 0 | ||
#define E_DEC_TRUNCATED 1 | ||
#define E_DEC_OVERFLOW 2 | ||
#define E_DEC_DIV_ZERO 4 | ||
#define E_DEC_BAD_NUM 8 | ||
#define E_DEC_OOM 16 | ||
|
||
#define E_DEC_ERROR 31 | ||
#define E_DEC_FATAL_ERROR 30 | ||
|
||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.