mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
Add one more check to skip getting into code that will do nothing
This commit is contained in:
parent
e6e5d3535d
commit
90cad3de2f
@ -40,24 +40,24 @@
|
||||
static void mysqli_tx_cor_options_to_string(const MYSQL * const conn, smart_str * str, const unsigned int mode)
|
||||
{
|
||||
if (mode & TRANS_COR_AND_CHAIN && !(mode & TRANS_COR_AND_NO_CHAIN)) {
|
||||
if (str->s) {
|
||||
if (str->s && str->s->len) {
|
||||
smart_str_appendl(str, " ", sizeof(" ") - 1);
|
||||
}
|
||||
smart_str_appendl(str, "AND CHAIN", sizeof("AND CHAIN") - 1);
|
||||
} else if (mode & TRANS_COR_AND_NO_CHAIN && !(mode & TRANS_COR_AND_CHAIN)) {
|
||||
if (str->s) {
|
||||
if (str->s && str->s->len) {
|
||||
smart_str_appendl(str, " ", sizeof(" ") - 1);
|
||||
}
|
||||
smart_str_appendl(str, "AND NO CHAIN", sizeof("AND NO CHAIN") - 1);
|
||||
}
|
||||
|
||||
if (mode & TRANS_COR_RELEASE && !(mode & TRANS_COR_NO_RELEASE)) {
|
||||
if (str->s) {
|
||||
if (str->s && str->s->len) {
|
||||
smart_str_appendl(str, " ", sizeof(" ") - 1);
|
||||
}
|
||||
smart_str_appendl(str, "RELEASE", sizeof("RELEASE") - 1);
|
||||
} else if (mode & TRANS_COR_NO_RELEASE && !(mode & TRANS_COR_RELEASE)) {
|
||||
if (str->s) {
|
||||
if (str->s && str->s->len) {
|
||||
smart_str_appendl(str, " ", sizeof(" ") - 1);
|
||||
}
|
||||
smart_str_appendl(str, "NO RELEASE", sizeof("NO RELEASE") - 1);
|
||||
|
Loading…
Reference in New Issue
Block a user