Skip to content

Commit

Permalink
Added back missing subversion changes for 4.013
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Galbraith committed Apr 15, 2010
1 parent a82a5dd commit 6e296ab
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 7 deletions.
11 changes: 9 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
2010-04-14 Patrick Galbraith <[email protected]> (4.013)
2010-04-14 Patrick Galbraith <[email protected]> (4.014)
* BUG 30033 Fixed handling of comments to allow comments that contain characters
that might otherwise cause placeholder detection to not work properly
* BUG 53844, Fix for memory leak in stats. (Gregory Burmistrov)
* BUG 49719, Fix for handling of NULLs in prepared statements (Gert Pache)
* BUG 49484, Added mysql_init_command option. (Peter John Edwards)
* BUG 55627, Fix for testing failure due to strict mode (Yves)
* BUG 51784, Fix for mysqladmin on Windows in Makefile (Zeeshan Muhammad)
* BUG 41630, Typo in Makefile
* Had to define true and false in dbdimp.h. Didn't work out of the box on Linux

2009-09-16 Patrick Galbraith <[email protected]> (4.013)

* #49484: PATCH add support for MYSQL_INIT_COMMAND - Peter John Edwards
* #48242: 'mysql_bind_type_guessing' doesn't work correctly
with minus sign - Thanks Serguei Trouchelle!
* #45616: t/40blobs.t cannot pass without database access -
ServerError() not declared - Thanks ysth http://ysth.livejournal.com/

2009-06-18 Patrick Galbraith <[email protected]> (4.012)

* Patch to bind_type_guessing from Craigslist,
Expand Down
27 changes: 22 additions & 5 deletions dbdimp.c
Original file line number Diff line number Diff line change
Expand Up @@ -4472,13 +4472,28 @@ int dbd_bind_ph (SV *sth, imp_sth_t *imp_sth, SV *param, SV *value,
if (imp_sth->use_server_side_prepare)
{
switch(sql_type) {
case SQL_NUMERIC: case SQL_INTEGER: case SQL_SMALLINT: case SQL_BIGINT: case SQL_TINYINT:
case SQL_NUMERIC:
case SQL_INTEGER:
case SQL_SMALLINT:
case SQL_BIGINT:
case SQL_TINYINT:
buffer_type= MYSQL_TYPE_LONG;
break;
case SQL_DOUBLE: case SQL_DECIMAL: case SQL_FLOAT: case SQL_REAL:
case SQL_DOUBLE:
case SQL_DECIMAL:
case SQL_FLOAT:
case SQL_REAL:
buffer_type= MYSQL_TYPE_DOUBLE;
break;
case SQL_CHAR: case SQL_VARCHAR: case SQL_DATE: case SQL_TIME: case SQL_TIMESTAMP: case SQL_LONGVARCHAR: case SQL_BINARY: case SQL_VARBINARY: case SQL_LONGVARBINARY:
case SQL_CHAR:
case SQL_VARCHAR:
case SQL_DATE:
case SQL_TIME:
case SQL_TIMESTAMP:
case SQL_LONGVARCHAR:
case SQL_BINARY:
case SQL_VARBINARY:
case SQL_LONGVARBINARY:
buffer_type= MYSQL_TYPE_BLOB;
break;
default:
Expand Down Expand Up @@ -4840,9 +4855,10 @@ static int parse_number(char *string, STRLEN len, char **end)
int seen_dec;
int seen_e;
int seen_plus;
int seen_digit;
char *cp;

seen_neg= seen_dec= seen_e= seen_plus= 0;
seen_neg= seen_dec= seen_e= seen_plus= seen_digit= 0;

if (len <= 0) {
len= strlen(string);
Expand Down Expand Up @@ -4896,14 +4912,15 @@ static int parse_number(char *string, STRLEN len, char **end)
}
else if (!isdigit(*cp))
{
seen_digit= 1;
break;
}
}

*end= cp;

/* length 0 -> not a number */
if (len == 0 || cp - string < (int) len) {
if (len == 0 || cp - string < (int) len || seen_digit == 0) {
return -1;
}

Expand Down

0 comments on commit 6e296ab

Please sign in to comment.