transactd 3.7.2 → 3.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/common/tdclc_32_3_7.dll +0 -0
- data/bin/common/tdclc_64_3_7.dll +0 -0
- data/build/tdclc/tdclc.rc +4 -4
- data/build/tdclcpp/tdclcpp.rc +4 -4
- data/build/tdclrb/tdclrb.rc +4 -4
- data/source/bzs/db/engine/mysql/database.cpp +1 -1
- data/source/bzs/db/engine/mysql/mysqlInternal.h +111 -77
- data/source/bzs/db/engine/mysql/mysqlProtocol.cpp +46 -46
- data/source/bzs/db/engine/mysql/mysqlThd.cpp +4 -2
- data/source/bzs/db/protocol/tdap/mysql/databaseSchema.cpp +3 -6
- data/source/bzs/db/protocol/tdap/tdapcapi.h +3 -3
- data/source/bzs/test/tdclphp/transactd_Test.php +1 -1
- data/source/bzs/test/tdclphp/transactd_v3_Test.php +0 -1
- data/source/bzs/test/tdclrb/transactd_spec.rb +1 -1
- data/source/bzs/test/tdclrb/transactd_v3_spec.rb +0 -1
- data/source/bzs/test/trdclengn/test_trdclengn.cpp +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e43c70f7ba625145762a498772fa4b02ba02e150
|
4
|
+
data.tar.gz: 71c277ba399849a65d6310d59ba37bad75325ce2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea6b61172b73a0e7446ce90c1b01e848fbb09b14e527ae10a91c78d68e9920d308b8ae8f7cc987c300239048b96b6bdb3c67988e0ed4a22b623c7d20c641fb66
|
7
|
+
data.tar.gz: 46c7a9a28edef3f95a9e4dc4ec083862724cdb9b496d8e32ad973deff47ef1e01cc4f07913f93d046c38337ff5030d540cb9561b29c220c7e3b13fa87fa37d6a
|
data/bin/common/tdclc_32_3_7.dll
CHANGED
Binary file
|
data/bin/common/tdclc_64_3_7.dll
CHANGED
Binary file
|
data/build/tdclc/tdclc.rc
CHANGED
@@ -29,8 +29,8 @@
|
|
29
29
|
//
|
30
30
|
|
31
31
|
VS_VERSION_INFO VERSIONINFO
|
32
|
-
FILEVERSION 3,7,
|
33
|
-
PRODUCTVERSION 3,7,
|
32
|
+
FILEVERSION 3,7,3,252
|
33
|
+
PRODUCTVERSION 3,7,3,252
|
34
34
|
FILEFLAGSMASK 0x3fL
|
35
35
|
#ifdef _DEBUG
|
36
36
|
FILEFLAGS 0x1L
|
@@ -47,9 +47,9 @@ BEGIN
|
|
47
47
|
BEGIN
|
48
48
|
VALUE "CompanyName", "BizStation Corp."
|
49
49
|
VALUE "FileDescription", "Transactd C client"
|
50
|
-
VALUE "FileVersion", "3.7.
|
50
|
+
VALUE "FileVersion", "3.7.3.252"
|
51
51
|
VALUE "LegalCopyright", "Copyright(C) 2016 BizStation Corp"
|
52
|
-
VALUE "ProductVersion", "3.7.
|
52
|
+
VALUE "ProductVersion", "3.7.3.252"
|
53
53
|
VALUE "ProductName", "Transactd Client (GPL V2)"
|
54
54
|
END
|
55
55
|
END
|
data/build/tdclcpp/tdclcpp.rc
CHANGED
@@ -29,8 +29,8 @@
|
|
29
29
|
//
|
30
30
|
|
31
31
|
VS_VERSION_INFO VERSIONINFO
|
32
|
-
FILEVERSION 3,7,
|
33
|
-
PRODUCTVERSION 3,7,
|
32
|
+
FILEVERSION 3,7,3,252
|
33
|
+
PRODUCTVERSION 3,7,3,252
|
34
34
|
FILEFLAGSMASK 0x3fL
|
35
35
|
#ifdef _DEBUG
|
36
36
|
FILEFLAGS 0x1L
|
@@ -47,9 +47,9 @@ BEGIN
|
|
47
47
|
BEGIN
|
48
48
|
VALUE "CompanyName", "BizStation Corp."
|
49
49
|
VALUE "FileDescription", "Transactd C++ client"
|
50
|
-
VALUE "FileVersion", "3.7.
|
50
|
+
VALUE "FileVersion", "3.7.3.252"
|
51
51
|
VALUE "LegalCopyright", "Copyright(C) 2016 BizStation Corp"
|
52
|
-
VALUE "ProductVersion", "3.7.
|
52
|
+
VALUE "ProductVersion", "3.7.3.252"
|
53
53
|
VALUE "ProductName", "Transactd Client (GPL V2)"
|
54
54
|
END
|
55
55
|
END
|
data/build/tdclrb/tdclrb.rc
CHANGED
@@ -29,8 +29,8 @@
|
|
29
29
|
//
|
30
30
|
|
31
31
|
VS_VERSION_INFO VERSIONINFO
|
32
|
-
FILEVERSION 3,7,
|
33
|
-
PRODUCTVERSION 3,7,
|
32
|
+
FILEVERSION 3,7,3,252
|
33
|
+
PRODUCTVERSION 3,7,3,252
|
34
34
|
FILEFLAGSMASK 0x3fL
|
35
35
|
#ifdef _DEBUG
|
36
36
|
FILEFLAGS 0x1L
|
@@ -47,9 +47,9 @@ BEGIN
|
|
47
47
|
BEGIN
|
48
48
|
VALUE "CompanyName", "BizStation Corp."
|
49
49
|
VALUE "FileDescription", "Transactd Ruby client"
|
50
|
-
VALUE "FileVersion", "3.7.
|
50
|
+
VALUE "FileVersion", "3.7.3.252"
|
51
51
|
VALUE "LegalCopyright", "Copyright(C) 2016 BizStation Corp"
|
52
|
-
VALUE "ProductVersion", "3.7.
|
52
|
+
VALUE "ProductVersion", "3.7.3.252"
|
53
53
|
VALUE "ProductName", "Transactd Client (GPL V2)"
|
54
54
|
END
|
55
55
|
END
|
@@ -123,7 +123,7 @@ void tableCacheCounter::release(const std::string& dbname,
|
|
123
123
|
bool lockTable(THD* thd, TABLE* tb)
|
124
124
|
{
|
125
125
|
bool append = (thd->lock != 0);
|
126
|
-
#
|
126
|
+
#if defined(MARIADB_10_1) || defined(MARIADB_10_2)
|
127
127
|
thd->variables.option_bits |= OPTION_TABLE_LOCK;
|
128
128
|
#endif
|
129
129
|
MYSQL_LOCK* lock = mysql_lock_tables(thd, &tb, 1, 0);
|
@@ -54,7 +54,9 @@
|
|
54
54
|
#include <mysql_version.h>
|
55
55
|
|
56
56
|
#if defined(MARIADB_BASE_VERSION)
|
57
|
-
# if (MYSQL_VERSION_ID >
|
57
|
+
# if (MYSQL_VERSION_ID > 100200)
|
58
|
+
# define MARIADB_10_2 MYSQL_VERSION_ID
|
59
|
+
# elif (MYSQL_VERSION_ID > 100107)
|
58
60
|
# define MARIADB_10_1 MYSQL_VERSION_ID
|
59
61
|
# elif (MYSQL_VERSION_ID > 100000)
|
60
62
|
# define MARIADB_10_0 MYSQL_VERSION_ID
|
@@ -75,9 +77,9 @@
|
|
75
77
|
#include "my_global.h"
|
76
78
|
#include <math.h>
|
77
79
|
#if defined(MYSQL_5_7)
|
78
|
-
#ifndef HAVE_REPLICATION
|
79
|
-
#define HAVE_REPLICATION
|
80
|
-
#endif
|
80
|
+
#ifndef HAVE_REPLICATION
|
81
|
+
#define HAVE_REPLICATION
|
82
|
+
#endif
|
81
83
|
|
82
84
|
// Not use malloc service
|
83
85
|
#define MYSQL_SERVICE_MYSQL_ALLOC_INCLUDED
|
@@ -187,7 +189,7 @@ extern "C" {
|
|
187
189
|
#define cp_master_accsess() master_access()
|
188
190
|
#define cp_priv_host() host().str
|
189
191
|
#define cp_priv_user() user().str
|
190
|
-
#else // MySQL 5.6 Mariadb 10.0 10.1
|
192
|
+
#else // MySQL 5.6 Mariadb 10.0 10.1 10.2
|
191
193
|
#define cp_get_sql_error() get_stmt_da()->sql_errno()
|
192
194
|
#define cp_isOk() get_stmt_da()->is_ok()
|
193
195
|
#define cp_set_overwrite_status(A) get_stmt_da()->set_overwrite_status(A)
|
@@ -195,7 +197,6 @@ extern "C" {
|
|
195
197
|
#define cp_master_accsess() master_access
|
196
198
|
#define cp_priv_host() priv_host
|
197
199
|
#define cp_priv_user() priv_user
|
198
|
-
|
199
200
|
#endif
|
200
201
|
|
201
202
|
#if defined(MYSQL_5_5)
|
@@ -220,7 +221,7 @@ extern "C" {
|
|
220
221
|
# endif
|
221
222
|
#endif
|
222
223
|
|
223
|
-
#if ((MYSQL_VERSION_NUM < 50600) || defined(MARIADB_BASE_VERSION)) //MySQL 5.5 Mariadb 5.5 10.0 10.1
|
224
|
+
#if ((MYSQL_VERSION_NUM < 50600) || defined(MARIADB_BASE_VERSION)) // MySQL 5.5 Mariadb 5.5 10.0 10.1 10.2
|
224
225
|
|
225
226
|
inline void add_global_thread(THD* thd) {}
|
226
227
|
|
@@ -231,7 +232,9 @@ inline void cp_thd_release_resources(THD* thd) {}
|
|
231
232
|
inline void cp_restore_globals(THD* thd)
|
232
233
|
{
|
233
234
|
my_pthread_setspecific_ptr(THR_THD, 0);
|
235
|
+
#if ! defined(MARIADB_10_2)
|
234
236
|
my_pthread_setspecific_ptr(THR_MALLOC, 0);
|
237
|
+
#endif
|
235
238
|
}
|
236
239
|
#if (MYSQL_VERSION_ID < 50600)
|
237
240
|
inline void cp_thd_set_read_only(THD* thd, bool v) {}
|
@@ -251,7 +254,7 @@ inline bool cp_thd_get_global_read_only(THD* thd)
|
|
251
254
|
inline bool cp_open_table(THD* thd, TABLE_LIST* tables,
|
252
255
|
Open_table_context* ot_act)
|
253
256
|
{
|
254
|
-
#if defined(MARIADB_10_1)
|
257
|
+
#if defined(MARIADB_10_1) || defined(MARIADB_10_2)
|
255
258
|
return open_table(thd, tables, ot_act);
|
256
259
|
#else
|
257
260
|
return open_table(thd, tables, thd->mem_root, ot_act);
|
@@ -259,16 +262,16 @@ inline bool cp_open_table(THD* thd, TABLE_LIST* tables,
|
|
259
262
|
}
|
260
263
|
#define set_mysys_var(A)
|
261
264
|
|
262
|
-
inline bool cp_has_insert_default_function(Field* fd)
|
263
|
-
{
|
264
|
-
return fd->unireg_check == Field::TIMESTAMP_DN_FIELD ||
|
265
|
-
fd->unireg_check == Field::TIMESTAMP_DNUN_FIELD;
|
266
|
-
}
|
267
|
-
|
268
|
-
inline bool cp_has_update_default_function(Field* fd)
|
269
|
-
{
|
270
|
-
return fd->unireg_check == Field::TIMESTAMP_UN_FIELD ||
|
271
|
-
fd->unireg_check == Field::TIMESTAMP_DNUN_FIELD;
|
265
|
+
inline bool cp_has_insert_default_function(Field* fd)
|
266
|
+
{
|
267
|
+
return fd->unireg_check == Field::TIMESTAMP_DN_FIELD ||
|
268
|
+
fd->unireg_check == Field::TIMESTAMP_DNUN_FIELD;
|
269
|
+
}
|
270
|
+
|
271
|
+
inline bool cp_has_update_default_function(Field* fd)
|
272
|
+
{
|
273
|
+
return fd->unireg_check == Field::TIMESTAMP_UN_FIELD ||
|
274
|
+
fd->unireg_check == Field::TIMESTAMP_DNUN_FIELD;
|
272
275
|
}
|
273
276
|
|
274
277
|
inline void cp_evaluate_insert_default_function(Field* fd)
|
@@ -333,15 +336,15 @@ inline bool cp_open_table(THD* thd, TABLE_LIST* tables,
|
|
333
336
|
return open_table(thd, tables, ot_act);
|
334
337
|
}
|
335
338
|
|
336
|
-
inline bool cp_has_insert_default_function(Field* fd)
|
337
|
-
{
|
338
|
-
return fd->has_insert_default_function();
|
339
|
-
}
|
340
|
-
|
341
|
-
inline bool cp_has_update_default_function(Field* fd)
|
342
|
-
{
|
343
|
-
return fd->has_update_default_function();
|
344
|
-
|
339
|
+
inline bool cp_has_insert_default_function(Field* fd)
|
340
|
+
{
|
341
|
+
return fd->has_insert_default_function();
|
342
|
+
}
|
343
|
+
|
344
|
+
inline bool cp_has_update_default_function(Field* fd)
|
345
|
+
{
|
346
|
+
return fd->has_update_default_function();
|
347
|
+
|
345
348
|
}
|
346
349
|
|
347
350
|
inline void cp_evaluate_insert_default_function(Field* fd)
|
@@ -359,7 +362,7 @@ inline unsigned char* cp_null_ptr(Field* fd, unsigned char* record)
|
|
359
362
|
return fd->null_offset() + record;
|
360
363
|
}
|
361
364
|
|
362
|
-
#endif
|
365
|
+
#endif
|
363
366
|
|
364
367
|
#if (MYSQL_VERSION_NUM < 50611)
|
365
368
|
#define ha_index_read_map index_read_map
|
@@ -510,7 +513,10 @@ inline void cp_set_new_thread_id(THD* thd)
|
|
510
513
|
{
|
511
514
|
mysql_mutex_lock(&LOCK_thread_count);
|
512
515
|
++g_openDatabases;
|
516
|
+
#if defined(MARIADB_BASE_VERSION) && (MYSQL_VERSION_ID > 100200) // MARIADB_10_2
|
517
|
+
#else // Not MARIADB_10_2
|
513
518
|
thd->variables.pseudo_thread_id = thread_id++;
|
519
|
+
#endif
|
514
520
|
add_global_thread(thd);
|
515
521
|
mysql_mutex_unlock(&LOCK_thread_count);
|
516
522
|
thd->thread_id = thd->variables.pseudo_thread_id;
|
@@ -579,7 +585,11 @@ inline void cp_open_error_release(THD* thd, TABLE_LIST& tables) {}
|
|
579
585
|
|
580
586
|
inline bool cp_query_command(THD* thd, char* str)
|
581
587
|
{
|
588
|
+
#if defined(MARIADB_BASE_VERSION) && (MYSQL_VERSION_ID > 100200) // MARIADB_10_2
|
589
|
+
return dispatch_command(COM_QUERY, thd, str, (uint)strlen(str), FALSE, FALSE);
|
590
|
+
#else // Not MARIADB_10_2
|
582
591
|
return dispatch_command(COM_QUERY, thd, str, (uint)strlen(str));
|
592
|
+
#endif
|
583
593
|
}
|
584
594
|
|
585
595
|
inline void cp_lex_clear(THD* thd)
|
@@ -587,40 +597,45 @@ inline void cp_lex_clear(THD* thd)
|
|
587
597
|
thd->lex->many_values.empty();
|
588
598
|
}
|
589
599
|
|
590
|
-
#if defined(MARIADB_10_1) ||
|
600
|
+
#if defined(MARIADB_10_2) || defined(MARIADB_10_1) || defined(MARIADB_10_0) // MariaDB 10.0 10.1 10.2
|
591
601
|
#define NO_LOCK_OPEN
|
592
602
|
inline TABLE_SHARE* cp_get_cached_table_share(THD* thd, const char *db, const char *name)
|
593
603
|
{
|
594
|
-
|
604
|
+
#if defined(MARIADB_BASE_VERSION) && (MYSQL_VERSION_ID > 100200) // MARIADB_10_2
|
605
|
+
TABLE_LIST table;
|
606
|
+
table.init_one_table(db, strlen(db), name, strlen(name), name, TL_READ);
|
607
|
+
return tdc_acquire_share(thd, &table, GTS_VIEW |GTS_TABLE);
|
608
|
+
#else // Not MARIADB_10_2
|
609
|
+
return tdc_acquire_share(thd, db, name, GTS_VIEW |GTS_TABLE);
|
610
|
+
#endif
|
595
611
|
}
|
596
612
|
inline void cp_tdc_release_share(TABLE_SHARE* s)
|
597
613
|
{
|
598
614
|
tdc_release_share(s);
|
599
615
|
}
|
600
616
|
|
601
|
-
#if defined(MARIADB_10_1)
|
617
|
+
#if defined(MARIADB_10_2) || defined(MARIADB_10_1) // MariaDB 10.1 10.2
|
602
618
|
inline int cp_store_create_info(THD *thd, TABLE_LIST *table_list, String *packet,
|
603
619
|
void *create_info_arg, int with_db_name)
|
604
620
|
{
|
605
621
|
return show_create_table(thd, table_list, packet,
|
606
622
|
(Table_specification_st*)create_info_arg, (enum_with_db_name) with_db_name);
|
607
623
|
}
|
608
|
-
#elif (MARIADB_10_0 >= 100013)
|
624
|
+
#elif (MARIADB_10_0 >= 100013) // MariaDB 10.0.13 or later
|
609
625
|
inline int cp_store_create_info(THD *thd, TABLE_LIST *table_list, String *packet,
|
610
626
|
void *create_info_arg, int with_db_name)
|
611
627
|
{
|
612
628
|
return show_create_table(thd, table_list, packet,
|
613
629
|
(HA_CREATE_INFO*)create_info_arg, (enum_with_db_name) with_db_name);
|
614
630
|
}
|
615
|
-
#else //Mariadb 10.0.
|
631
|
+
#else // Mariadb 10.0.12 or lesser
|
616
632
|
inline int cp_store_create_info(THD *thd, TABLE_LIST *table_list, String *packet,
|
617
633
|
HA_CREATE_INFO* create_info_arg, int with_db_name)
|
618
634
|
{
|
619
635
|
return store_create_info(thd, table_list, packet, create_info_arg, with_db_name!=0, FALSE);
|
620
636
|
}
|
621
|
-
|
622
637
|
#endif
|
623
|
-
#else // Not
|
638
|
+
#else // Not MariaDB 10.0 10.1 10.2
|
624
639
|
|
625
640
|
|
626
641
|
inline TABLE_SHARE* cp_get_cached_table_share(THD* /*thd*/, const char *db, const char *name)
|
@@ -635,27 +650,37 @@ inline int cp_store_create_info(THD *thd, TABLE_LIST *table_list, String *packet
|
|
635
650
|
|
636
651
|
#define cp_get_executed_gtids get_logged_gtids
|
637
652
|
|
638
|
-
#endif //
|
653
|
+
#endif // MariaDB 10.0 10.1 10.2
|
639
654
|
|
640
|
-
#define STATUS_VAR_SCOPE
|
655
|
+
#define STATUS_VAR_SCOPE
|
656
|
+
|
657
|
+
#if defined(MARIADB_10_2)
|
658
|
+
#define DSMRR_SIZE sizeof(DsMrr_impl)
|
659
|
+
#else
|
641
660
|
#define DSMRR_SIZE 0
|
642
|
-
#endif
|
661
|
+
#endif
|
643
662
|
|
663
|
+
#endif
|
644
664
|
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
665
|
+
|
666
|
+
#if defined(MARIADB_10_2) // MariaDB 10.2
|
667
|
+
inline bool cp_tdc_open_view(THD *thd, TABLE_LIST *table_list, const char *alias,
|
668
|
+
const char *cache_key, uint cache_key_length, uint flags)
|
669
|
+
{
|
670
|
+
return tdc_open_view(thd, table_list, flags);
|
671
|
+
}
|
672
|
+
#elif defined(MARIADB_10_0) // MariaDB 10.0
|
673
|
+
inline bool cp_tdc_open_view(THD *thd, TABLE_LIST *table_list, const char *alias,
|
674
|
+
const char *cache_key, uint cache_key_length, uint flags)
|
675
|
+
{
|
676
|
+
return tdc_open_view(thd, table_list, alias, cache_key , cache_key_length, thd->mem_root, flags);
|
677
|
+
}
|
678
|
+
#elif (MYSQL_VERSION_ID < 50600) // MySQL 5.5
|
679
|
+
inline bool cp_tdc_open_view(THD *thd, TABLE_LIST *table_list, const char *alias,
|
680
|
+
const char *cache_key, uint cache_key_length, uint flags)
|
681
|
+
{
|
682
|
+
return tdc_open_view(thd, table_list, alias, (char *)cache_key , cache_key_length, thd->mem_root, flags);
|
683
|
+
}
|
659
684
|
#else
|
660
685
|
#define cp_tdc_open_view tdc_open_view
|
661
686
|
#endif
|
@@ -675,9 +700,9 @@ inline uint cp_get_table_def_key(THD *thd, TABLE_LIST* tables, const char** key)
|
|
675
700
|
make_db_list function is not static, but it is not list in sql_show.h.
|
676
701
|
*/
|
677
702
|
|
678
|
-
#if (defined(MARIADB_10_0) || defined(MARIADB_10_1))
|
703
|
+
#if (defined(MARIADB_10_0) || defined(MARIADB_10_1) || defined(MARIADB_10_2)) // MariaDB 10.0 10.1 10.2
|
679
704
|
typedef Dynamic_array<LEX_STRING*> SQL_Strings;
|
680
|
-
#if (
|
705
|
+
#if (defined(MARIADB_10_0))
|
681
706
|
typedef struct st_lookup_field_values
|
682
707
|
{
|
683
708
|
LEX_STRING db_value, table_value;
|
@@ -693,29 +718,29 @@ inline uint cp_get_table_def_key(THD *thd, TABLE_LIST* tables, const char** key)
|
|
693
718
|
memset(&lv, 0 ,sizeof(LOOKUP_FIELD_VALUES));
|
694
719
|
return make_db_list(thd, files, &lv);
|
695
720
|
}
|
696
|
-
#else
|
721
|
+
#else // Not MariaDB 10.0 10.1 10.2
|
697
722
|
typedef List<LEX_STRING> SQL_Strings;
|
698
723
|
inline int db_list(THD *thd, SQL_Strings *files)
|
699
724
|
{
|
700
725
|
#ifdef FINDFILE_6PRAMS
|
701
|
-
MEM_ROOT tmp_mem_root;
|
702
|
-
# ifdef MYSQL_578_LATER
|
703
|
-
init_sql_alloc(key_memory_get_all_tables, &tmp_mem_root, TABLE_ALLOC_BLOCK_SIZE, 0);
|
704
|
-
# else
|
726
|
+
MEM_ROOT tmp_mem_root;
|
727
|
+
# ifdef MYSQL_578_LATER
|
728
|
+
init_sql_alloc(key_memory_get_all_tables, &tmp_mem_root, TABLE_ALLOC_BLOCK_SIZE, 0);
|
729
|
+
# else
|
705
730
|
init_sql_alloc(&tmp_mem_root, TABLE_ALLOC_BLOCK_SIZE, 0);
|
706
731
|
# endif
|
707
732
|
return find_files(thd, files, NullS, mysql_data_home, "", true, &tmp_mem_root);
|
708
733
|
#else
|
709
734
|
return find_files(thd, files, NullS, mysql_data_home, "", true);
|
710
|
-
#endif
|
711
|
-
}
|
712
735
|
#endif
|
736
|
+
}
|
737
|
+
#endif // MariaDB 10.0 10.1 10.2
|
713
738
|
|
714
739
|
|
715
|
-
#if (defined(MARIADB_10_1) && MARIADB_10_1 > 100108)
|
740
|
+
#if defined(MARIADB_10_2) || (defined(MARIADB_10_1) && MARIADB_10_1 > 100108) // later than MariaDB 10.1.8
|
716
741
|
inline void cp_setup_rpl_bitmap(TABLE* table)
|
717
742
|
{
|
718
|
-
bitmap_set_all(table->write_set);
|
743
|
+
bitmap_set_all(table->write_set);
|
719
744
|
table->rpl_write_set = table->write_set;
|
720
745
|
}
|
721
746
|
#else
|
@@ -724,6 +749,15 @@ inline void cp_setup_rpl_bitmap(TABLE* table){};
|
|
724
749
|
|
725
750
|
#endif
|
726
751
|
|
752
|
+
inline frm_type_enum cp_dd_frm_type(THD *thd, char *path)
|
753
|
+
{
|
754
|
+
#if defined(MARIADB_10_2) || (defined(MARIADB_10_1) && MARIADB_10_1 >= 100122) // MariaDB 10.1.22 or later
|
755
|
+
return dd_frm_type(thd, path, NULL);
|
756
|
+
#else
|
757
|
+
enum legacy_db_type not_used;
|
758
|
+
return dd_frm_type(thd, path, ¬_used);
|
759
|
+
#endif
|
760
|
+
}
|
727
761
|
|
728
762
|
class safe_mysql_mutex_lock
|
729
763
|
{
|
@@ -744,20 +778,20 @@ public:
|
|
744
778
|
|
745
779
|
struct innodb_prebuit
|
746
780
|
{
|
747
|
-
ulong magic_n;
|
748
|
-
void* table;
|
749
|
-
void* index;
|
750
|
-
void* trx;
|
751
|
-
//unsigned int dummy; // Bit flags
|
752
|
-
|
753
|
-
unsigned sql_stat_start:1;
|
754
|
-
#
|
755
|
-
unsigned mysql_has_locked:1;
|
756
|
-
#endif
|
757
|
-
unsigned clust_index_was_generated:1;
|
758
|
-
unsigned index_usable:1;
|
759
|
-
unsigned read_just_key:1;
|
760
|
-
unsigned used_in_HANDLER:1;
|
781
|
+
ulong magic_n;
|
782
|
+
void* table;
|
783
|
+
void* index;
|
784
|
+
void* trx;
|
785
|
+
//unsigned int dummy; // Bit flags
|
786
|
+
|
787
|
+
unsigned sql_stat_start:1;
|
788
|
+
#if ! (defined(MYSQL_5_7) || defined(MARIADB_10_2))
|
789
|
+
unsigned mysql_has_locked:1;
|
790
|
+
#endif
|
791
|
+
unsigned clust_index_was_generated:1;
|
792
|
+
unsigned index_usable:1;
|
793
|
+
unsigned read_just_key:1;
|
794
|
+
unsigned used_in_HANDLER:1;
|
761
795
|
unsigned template_type:2;
|
762
796
|
|
763
797
|
void* dummy2; //mysql_row_templ_t* mysql_template
|
@@ -82,19 +82,19 @@ public:
|
|
82
82
|
bool send_result_set_metadata(List<Item> *list, uint flags){return false;}
|
83
83
|
virtual bool write(){return false;};
|
84
84
|
virtual void prepare_for_resend(){}
|
85
|
-
virtual bool store_null(){return false;}
|
86
|
-
virtual bool store_tiny(longlong from){return store_longlong(from, false);}
|
87
|
-
virtual bool store_short(longlong from){return store_longlong(from, false);}
|
88
|
-
virtual bool store_long(longlong from){return store_longlong(from, false);}
|
89
|
-
virtual bool store_decimal(const my_decimal *){return false;}
|
90
|
-
virtual bool store(float from, uint32 decimals, String *buffer){return false;}
|
91
|
-
virtual bool store(double from, uint32 decimals, String *buffer){return false;}
|
92
|
-
virtual bool store(MYSQL_TIME *time, uint precision){return false;}
|
93
|
-
virtual bool store_date(MYSQL_TIME *time){return false;}
|
94
|
-
virtual bool store_time(MYSQL_TIME *time, uint precision){return false;}
|
95
|
-
virtual bool store(Field *field){return false;}
|
96
|
-
virtual bool store(const char *from, size_t length, const CHARSET_INFO *fromcs,
|
97
|
-
const CHARSET_INFO* /*tocs*/){return false;}
|
85
|
+
virtual bool store_null(){return false;}
|
86
|
+
virtual bool store_tiny(longlong from){return store_longlong(from, false);}
|
87
|
+
virtual bool store_short(longlong from){return store_longlong(from, false);}
|
88
|
+
virtual bool store_long(longlong from){return store_longlong(from, false);}
|
89
|
+
virtual bool store_decimal(const my_decimal *){return false;}
|
90
|
+
virtual bool store(float from, uint32 decimals, String *buffer){return false;}
|
91
|
+
virtual bool store(double from, uint32 decimals, String *buffer){return false;}
|
92
|
+
virtual bool store(MYSQL_TIME *time, uint precision){return false;}
|
93
|
+
virtual bool store_date(MYSQL_TIME *time){return false;}
|
94
|
+
virtual bool store_time(MYSQL_TIME *time, uint precision){return false;}
|
95
|
+
virtual bool store(Field *field){return false;}
|
96
|
+
virtual bool store(const char *from, size_t length, const CHARSET_INFO *fromcs,
|
97
|
+
const CHARSET_INFO* /*tocs*/){return false;}
|
98
98
|
|
99
99
|
virtual bool send_out_parameters(List<Item_param> *sp_params){return false;}
|
100
100
|
virtual Protocol::enum_protocol_type type(void){ return CP_PROTOCOL; };
|
@@ -104,7 +104,7 @@ public:
|
|
104
104
|
#elif defined(MYSQL_5_5)
|
105
105
|
virtual bool store_time(MYSQL_TIME *time){return true;};
|
106
106
|
virtual bool store(MYSQL_TIME *time){return true;}
|
107
|
-
virtual bool store(const char *from, size_t length,
|
107
|
+
virtual bool store(const char *from, size_t length,
|
108
108
|
CHARSET_INFO *fromcs, CHARSET_INFO *tocs){return false;}
|
109
109
|
#elif defined(MYSQL_5_7)
|
110
110
|
bool store_decimal(const my_decimal *, uint, uint){ return true; }
|
@@ -161,15 +161,15 @@ public:
|
|
161
161
|
return false;
|
162
162
|
}
|
163
163
|
#else
|
164
|
-
bool store(const char *from, size_t length, const CHARSET_INFO *cs)
|
164
|
+
bool store(const char *from, size_t length, const CHARSET_INFO *cs)
|
165
165
|
{
|
166
166
|
if (m_index == 0)
|
167
167
|
strncpy(m_bpos->filename, from, BINLOGNAME_SIZE);
|
168
168
|
else if (m_index == 3)
|
169
169
|
{
|
170
|
-
if (length)
|
171
|
-
{
|
172
|
-
m_bpos->type = REPL_POSTYPE_GTID;
|
170
|
+
if (length)
|
171
|
+
{
|
172
|
+
m_bpos->type = REPL_POSTYPE_GTID;
|
173
173
|
m_bb->addBlob((unsigned int)length + 1, 0, (const unsigned char *)from);
|
174
174
|
m_bb->setFieldCount(1);
|
175
175
|
}
|
@@ -199,7 +199,7 @@ bool safe_commit_lock::lock()
|
|
199
199
|
#else
|
200
200
|
mdl_request.init(MDL_key::COMMIT, "", "", MDL_SHARED, MDL_EXPLICIT);
|
201
201
|
#endif
|
202
|
-
if (m_thd->mdl_context.acquire_lock(&mdl_request,
|
202
|
+
if (m_thd->mdl_context.acquire_lock(&mdl_request,
|
203
203
|
m_thd->variables.lock_wait_timeout))
|
204
204
|
return false;
|
205
205
|
m_commits_lock = mdl_request.ticket;
|
@@ -260,22 +260,22 @@ safe_commit_lock::~safe_commit_lock()
|
|
260
260
|
inline void readGtid(binlogPos* bpos, bzs::db::IblobBuffer* bb)
|
261
261
|
{
|
262
262
|
#if (MYSQL_VERSION_ID > 50600)
|
263
|
-
char p[1024] = { 0 };
|
264
|
-
char* buf = p;
|
263
|
+
char p[1024] = { 0 };
|
264
|
+
char* buf = p;
|
265
265
|
global_sid_lock->wrlock();
|
266
|
-
const Gtid_set* gtid_set = gtid_state->cp_get_executed_gtids();
|
267
|
-
int size = gtid_set->get_string_length();
|
268
|
-
if (size)
|
269
|
-
{
|
270
|
-
++size;
|
271
|
-
if (size > 1024) buf = new char[size];
|
272
|
-
gtid_set->to_string(buf);
|
273
|
-
bpos->type = REPL_POSTYPE_GTID;
|
266
|
+
const Gtid_set* gtid_set = gtid_state->cp_get_executed_gtids();
|
267
|
+
int size = gtid_set->get_string_length();
|
268
|
+
if (size)
|
269
|
+
{
|
270
|
+
++size;
|
271
|
+
if (size > 1024) buf = new char[size];
|
272
|
+
gtid_set->to_string(buf);
|
273
|
+
bpos->type = REPL_POSTYPE_GTID;
|
274
274
|
bb->addBlob((unsigned int)size, TD_EXTENDED_VAR_BINLOG_GTID, (const unsigned char *)buf);
|
275
275
|
bb->setFieldCount(1);
|
276
|
-
if (p != buf) delete[] buf;
|
277
|
-
}
|
278
|
-
global_sid_lock->unlock();
|
276
|
+
if (p != buf) delete[] buf;
|
277
|
+
}
|
278
|
+
global_sid_lock->unlock();
|
279
279
|
#endif
|
280
280
|
}
|
281
281
|
|
@@ -380,7 +380,7 @@ public:
|
|
380
380
|
return str_store(from, length);
|
381
381
|
}
|
382
382
|
#else
|
383
|
-
bool store(const char *from, size_t length, const CHARSET_INFO *cs)
|
383
|
+
bool store(const char *from, size_t length, const CHARSET_INFO *cs)
|
384
384
|
{
|
385
385
|
return str_store(from, length);
|
386
386
|
}
|
@@ -489,7 +489,7 @@ public:
|
|
489
489
|
return false;
|
490
490
|
}
|
491
491
|
#else
|
492
|
-
bool store(const char *from, size_t length, const CHARSET_INFO *cs)
|
492
|
+
bool store(const char *from, size_t length, const CHARSET_INFO *cs)
|
493
493
|
{
|
494
494
|
return str_store(from, length);
|
495
495
|
}
|
@@ -516,7 +516,7 @@ public:
|
|
516
516
|
#pragma warning(disable : 4271)
|
517
517
|
#pragma warning(disable : 4267)
|
518
518
|
#pragma warning(disable : 4244)
|
519
|
-
#if (defined(MARIADB_10_0) || defined(MARIADB_10_1))
|
519
|
+
#if (defined(MARIADB_10_0) || defined(MARIADB_10_1) || defined(MARIADB_10_2))
|
520
520
|
#include "sql/slave.h"
|
521
521
|
#include "sql/rpl_mi.h"
|
522
522
|
|
@@ -545,12 +545,12 @@ int getChannels(THD* /*thd*/, connection::records& recs)
|
|
545
545
|
#include "sql/rpl_msr.h" //channel_map
|
546
546
|
int getChannels(THD* thd, connection::records& recs)
|
547
547
|
{
|
548
|
-
channel_map.rdlock();
|
548
|
+
channel_map.rdlock();
|
549
549
|
uint_td size = channel_map.get_num_instances();
|
550
550
|
if (size)
|
551
551
|
{
|
552
|
-
for (mi_map::iterator it = channel_map.begin(); it != channel_map.end(); it++)
|
553
|
-
{
|
552
|
+
for (mi_map::iterator it = channel_map.begin(); it != channel_map.end(); it++)
|
553
|
+
{
|
554
554
|
Master_info* mi = it->second;
|
555
555
|
if (mi && mi->host[0])
|
556
556
|
{
|
@@ -583,7 +583,7 @@ int getSlaveStatus(THD* thd, const char* channel, connection::records& recs, bzs
|
|
583
583
|
char tmp[128];
|
584
584
|
#if (defined(MYSQL_5_7))
|
585
585
|
sprintf_s(tmp, 128, "show slave status for channel '%s'", channel);
|
586
|
-
#elif (defined(MARIADB_10_1) || defined(MARIADB_10_0))
|
586
|
+
#elif (defined(MARIADB_10_2) || defined(MARIADB_10_1) || defined(MARIADB_10_0))
|
587
587
|
sprintf_s(tmp, 128, "show slave '%s' status", channel);
|
588
588
|
#else
|
589
589
|
sprintf_s(tmp, 128, "show slave status");
|
@@ -616,7 +616,7 @@ void readDbList(THD* thd, connection::records& recs)
|
|
616
616
|
{
|
617
617
|
SQL_Strings files;
|
618
618
|
db_list(thd, &files);
|
619
|
-
#if (defined(MARIADB_10_0) || defined(MARIADB_10_1))
|
619
|
+
#if (defined(MARIADB_10_0) || defined(MARIADB_10_1) || defined(MARIADB_10_2))
|
620
620
|
for (int i = 0; i < (int)files.elements(); ++i)
|
621
621
|
appenDbList(recs, files.at(i));
|
622
622
|
#else
|
@@ -633,7 +633,7 @@ void readDbList(THD* thd, connection::records& recs)
|
|
633
633
|
|
634
634
|
bool setGrant(THD* thd, const char* host, const char* user, const char* db)
|
635
635
|
{
|
636
|
-
// sctx->master_access and sctx->db_access
|
636
|
+
// sctx->master_access and sctx->db_access
|
637
637
|
return (acl_getroot(cp_security_ctx(thd), cp_strdup(user, MYF(0)),
|
638
638
|
cp_strdup(host, MYF(0)), cp_strdup(host, MYF(0)), (char*)db)) == false;
|
639
639
|
}
|
@@ -669,11 +669,11 @@ public:
|
|
669
669
|
}
|
670
670
|
#ifdef NOTUSE_BINLOG_VAR
|
671
671
|
close_cached_tables(NULL, NULL, FALSE , 50000000L);
|
672
|
-
if (m_thd->global_read_lock.make_global_read_lock_block_commit(m_thd))
|
673
|
-
{
|
674
|
-
m_thd->global_read_lock.unlock_global_read_lock(m_thd);
|
675
|
-
m_thd = NULL;
|
676
|
-
return false;
|
672
|
+
if (m_thd->global_read_lock.make_global_read_lock_block_commit(m_thd))
|
673
|
+
{
|
674
|
+
m_thd->global_read_lock.unlock_global_read_lock(m_thd);
|
675
|
+
m_thd = NULL;
|
676
|
+
return false;
|
677
677
|
}
|
678
678
|
#endif
|
679
679
|
return true;
|
@@ -128,10 +128,12 @@ THD* buildTHD()
|
|
128
128
|
{
|
129
129
|
if (!mysqld_server_started)
|
130
130
|
waitForServerStart();
|
131
|
-
|
131
|
+
#if defined(MARIADB_10_2)
|
132
|
+
THD* thd = new THD(next_thread_id());
|
133
|
+
#else
|
132
134
|
THD* thd = new THD();
|
133
|
-
|
134
135
|
cp_set_new_thread_id(thd);
|
136
|
+
#endif
|
135
137
|
|
136
138
|
thd->thread_stack = reinterpret_cast<char*>(&thd);
|
137
139
|
thd->store_globals();
|
@@ -226,7 +226,7 @@ tabledef* schemaBuilder::getTabledef(engine::mysql::table* src, int id,
|
|
226
226
|
}
|
227
227
|
|
228
228
|
if (fd.type == ft_mydecimal)
|
229
|
-
fd.digits = my_decimal_length_to_precision(f->field_length, f->decimals(),
|
229
|
+
fd.digits = my_decimal_length_to_precision(f->field_length, f->decimals(),
|
230
230
|
(f->flags & UNSIGNED_FLAG) != 0);
|
231
231
|
|
232
232
|
fd.setPadCharSettings(false, true);
|
@@ -413,9 +413,7 @@ void schemaBuilder::listTable(database* db, std::vector<std::string>& tables, in
|
|
413
413
|
std::string s = it->path().string(); // fullpath
|
414
414
|
if (isFrmFile(it->path().filename().string(), false)) // filename
|
415
415
|
{
|
416
|
-
|
417
|
-
|
418
|
-
frm_type_enum ftype = dd_frm_type(db->thd(), (char*)s.c_str(), ¬_used);
|
416
|
+
frm_type_enum ftype = cp_dd_frm_type(db->thd(), (char*)s.c_str());
|
419
417
|
filename_to_tablename(it->path().stem().string().c_str(), path, FN_REFLEN);
|
420
418
|
std::string tablename = path;
|
421
419
|
|
@@ -476,8 +474,7 @@ short schemaBuilder::execute(database* db, table* mtb, bool nouseNullkey)
|
|
476
474
|
std::string s = it->path().filename().string();
|
477
475
|
if (isFrmFile(s))
|
478
476
|
{
|
479
|
-
|
480
|
-
frm_type_enum ftype = dd_frm_type(db->thd(), (char*)it->path().string().c_str(), ¬_used);
|
477
|
+
frm_type_enum ftype = cp_dd_frm_type(db->thd(), (char*)it->path().string().c_str());
|
481
478
|
if (ftype == FRMTYPE_TABLE)
|
482
479
|
{
|
483
480
|
filename_to_tablename(it->path().stem().string().c_str(), path,
|
@@ -670,7 +670,7 @@ struct handshale_t
|
|
670
670
|
*/
|
671
671
|
#define C_INTERFACE_VER_MAJOR "3"//##1 Build marker! Don't remove
|
672
672
|
#define C_INTERFACE_VER_MINOR "7"//##2 Build marker! Don't remove
|
673
|
-
#define C_INTERFACE_VER_RELEASE "
|
673
|
+
#define C_INTERFACE_VER_RELEASE "3"//##3 Build marker! Don't remove
|
674
674
|
|
675
675
|
/* dnamic load library name.
|
676
676
|
The default extention of Mac is ".boudle", Therefore ".so" is popular. */
|
@@ -734,7 +734,7 @@ struct handshale_t
|
|
734
734
|
|
735
735
|
#define CPP_INTERFACE_VER_MAJOR "3"//##4 Build marker! Don't remove
|
736
736
|
#define CPP_INTERFACE_VER_MINOR "7"//##5 Build marker! Don't remove
|
737
|
-
#define CPP_INTERFACE_VER_RELEASE "
|
737
|
+
#define CPP_INTERFACE_VER_RELEASE "3"//##6 Build marker! Don't remove
|
738
738
|
|
739
739
|
/* use autolink tdclcpp */
|
740
740
|
#if (__BCPLUSPLUS__ || _MSC_VER)
|
@@ -771,6 +771,6 @@ struct handshale_t
|
|
771
771
|
|
772
772
|
#define TRANSACTD_VER_MAJOR 3//##7 Build marker! Don't remove
|
773
773
|
#define TRANSACTD_VER_MINOR 7//##8 Build marker! Don't remove
|
774
|
-
#define TRANSACTD_VER_RELEASE
|
774
|
+
#define TRANSACTD_VER_RELEASE 3//##9 Build marker! Don't remove
|
775
775
|
|
776
776
|
#endif // BZS_DB_PROTOCOL_TDAP_TDAPCAPI_H
|
@@ -345,7 +345,7 @@ class TransactdTest extends PHPUnit_Framework_TestCase
|
|
345
345
|
$this->assertEquals($client_ver->minorVersion, Transactd::CPP_INTERFACE_VER_MINOR);
|
346
346
|
$this->assertEquals(chr($client_ver->type), 'N');
|
347
347
|
$my5x = ($server_ver->majorVersion == 5) && ($server_ver->minorVersion >= 5);
|
348
|
-
$maria10 = ($server_ver->majorVersion == 10) && ($server_ver->minorVersion <=
|
348
|
+
$maria10 = ($server_ver->majorVersion == 10) && ($server_ver->minorVersion <= 2);
|
349
349
|
$this->assertTrue($my5x || $maria10);
|
350
350
|
$tmp = (chr($server_ver->type) == 'M') || (chr($server_ver->type) == 'A');
|
351
351
|
$this->assertTrue($tmp);
|
@@ -903,7 +903,6 @@ class TransactdTest extends PHPUnit_Framework_TestCase
|
|
903
903
|
$db->execSql("create view idlessthan5 as select * from user where id < 5");
|
904
904
|
$view = $db->getCreateViewSql("idlessthan5");
|
905
905
|
$this->assertEquals((strpos($view, "idlessthan5") !== false), true);
|
906
|
-
$this->assertEquals((strpos($view, "名前") !== false), true);
|
907
906
|
//echo($view);
|
908
907
|
$tb = $db->openTable("user");
|
909
908
|
$this->assertEquals($db->stat(), 0);
|
@@ -236,7 +236,7 @@ def testVersion()
|
|
236
236
|
expect(client_ver.minorVersion.to_s).to eq Transactd::CPP_INTERFACE_VER_MINOR.to_s
|
237
237
|
expect(client_ver.type.chr).to eq 'N'
|
238
238
|
my5x = (server_ver.majorVersion == 5) && (server_ver.minorVersion >= 5)
|
239
|
-
maria10 = (server_ver.majorVersion == 10) && (server_ver.minorVersion <=
|
239
|
+
maria10 = (server_ver.majorVersion == 10) && (server_ver.minorVersion <= 2)
|
240
240
|
expect(my5x || maria10).to be true
|
241
241
|
tmp = (server_ver.type.chr == 'M') || (server_ver.type.chr == 'A')
|
242
242
|
expect(tmp).to be true
|
@@ -932,7 +932,6 @@ describe Transactd, 'V3Features' do
|
|
932
932
|
db.execSql("create view idlessthan5 as select * from user where id < 5")
|
933
933
|
view = db.getCreateViewSql("idlessthan5")
|
934
934
|
expect(view.include?("idlessthan5")).to eq true
|
935
|
-
expect(view.include?("名前")).to eq true
|
936
935
|
#puts("view" + view)
|
937
936
|
tb = db.openTable("user")
|
938
937
|
expect(db.stat()).to eq 0
|
@@ -316,7 +316,7 @@ void testVersion(database* db)
|
|
316
316
|
"mysql_server_Major = " << vv.versions[VER_IDX_DB_SERVER].majorVersion);
|
317
317
|
BOOST_CHECK_MESSAGE(
|
318
318
|
((5 <= vv.versions[VER_IDX_DB_SERVER].minorVersion) ||
|
319
|
-
(
|
319
|
+
(2 >= vv.versions[VER_IDX_DB_SERVER].minorVersion)),
|
320
320
|
"mysql_server_Miner = " << vv.versions[VER_IDX_DB_SERVER].minorVersion);
|
321
321
|
int type = (int)vv.versions[VER_IDX_DB_SERVER].type;
|
322
322
|
BOOST_CHECK_MESSAGE(((int)'M' == type) || ((int)'A' == type),
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: transactd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.7.
|
4
|
+
version: 3.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BizStation Corp.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Transactd client for ruby gem
|
14
14
|
email: transactd@bizstation.jp
|