-
Notifications
You must be signed in to change notification settings - Fork 995
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
39d7e35
commit 5034458
Showing
4 changed files
with
63 additions
and
0 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
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,32 @@ | ||
@@ -98,6 +98,7 @@ | ||
case MYSQL_TYPE_NULL: | ||
case MYSQL_TYPE_SHORT: | ||
case MYSQL_TYPE_STRING: | ||
+ case MYSQL_TYPE_JSON: | ||
case MYSQL_TYPE_TIME: | ||
case MYSQL_TYPE_TIMESTAMP: | ||
case MYSQL_TYPE_TINY: | ||
@@ -523,6 +524,7 @@ | ||
case MYSQL_TYPE_VARCHAR: | ||
case MYSQL_TYPE_VAR_STRING: | ||
case MYSQL_TYPE_STRING: | ||
+ case MYSQL_TYPE_JSON: | ||
case MYSQL_TYPE_DECIMAL: | ||
case MYSQL_TYPE_NEWDECIMAL: | ||
{ | ||
@@ -652,6 +654,7 @@ | ||
case MYSQL_TYPE_VARCHAR: | ||
case MYSQL_TYPE_VAR_STRING: | ||
case MYSQL_TYPE_STRING: | ||
+ case MYSQL_TYPE_JSON: | ||
case MYSQL_TYPE_DECIMAL: | ||
case MYSQL_TYPE_NEWDECIMAL: | ||
case MYSQL_TYPE_GEOMETRY: | ||
@@ -839,6 +842,7 @@ | ||
case MYSQL_TYPE_TINY_BLOB: | ||
case MYSQL_TYPE_MEDIUM_BLOB: | ||
case MYSQL_TYPE_LONG_BLOB: | ||
+ case MYSQL_TYPE_JSON: | ||
case MYSQL_TYPE_DECIMAL: | ||
case MYSQL_TYPE_NEWDECIMAL: | ||
break; |
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,20 @@ | ||
@@ -948,7 +948,7 @@ | ||
{ | ||
memcpy(r_param->buffer, current_pos, MIN(copylen, r_param->buffer_length)); | ||
if (copylen < r_param->buffer_length && | ||
- r_param->buffer_type == MYSQL_TYPE_STRING) | ||
+ ((r_param->buffer_type == MYSQL_TYPE_STRING) || (r_param->buffer_type == MYSQL_TYPE_JSON))) | ||
((char *)r_param->buffer)[copylen]= 0; | ||
} | ||
} | ||
@@ -1055,6 +1055,10 @@ | ||
mysql_ps_fetch_functions[MYSQL_TYPE_STRING].pack_len = MYSQL_PS_SKIP_RESULT_STR; | ||
mysql_ps_fetch_functions[MYSQL_TYPE_STRING].max_len = -1; | ||
|
||
+ mysql_ps_fetch_functions[MYSQL_TYPE_JSON].func = ps_fetch_string; | ||
+ mysql_ps_fetch_functions[MYSQL_TYPE_JSON].pack_len = MYSQL_PS_SKIP_RESULT_STR; | ||
+ mysql_ps_fetch_functions[MYSQL_TYPE_JSON].max_len = -1; | ||
+ | ||
mysql_ps_fetch_functions[MYSQL_TYPE_DECIMAL].func = ps_fetch_string; | ||
mysql_ps_fetch_functions[MYSQL_TYPE_DECIMAL].pack_len = MYSQL_PS_SKIP_RESULT_STR; | ||
mysql_ps_fetch_functions[MYSQL_TYPE_DECIMAL].max_len = -1; |
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,8 @@ | ||
@@ -278,6 +278,7 @@ | ||
MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR, | ||
MYSQL_TYPE_NEWDATE, MYSQL_TYPE_VARCHAR, | ||
MYSQL_TYPE_BIT, | ||
+ MYSQL_TYPE_JSON=245, | ||
MYSQL_TYPE_NEWDECIMAL=246, | ||
MYSQL_TYPE_ENUM=247, | ||
MYSQL_TYPE_SET=248, |