Skip to content

Commit

Permalink
disable put get on driver side
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-ext-simba-hx committed Jan 30, 2025
1 parent e0b931f commit e9c6be9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
# have to specify patch version on windows
# otherwise could get version mismatch issue when running test on github
# need to keep track on the latest version
php-version: ['8.1.31', '8.2.27', '8.3.16', '8.4.3']
php-version: ['8.1.31', '8.2.27', '8.3.16']
# The type of runner that the job will run on
runs-on: windows-2019
env:
Expand Down
15 changes: 15 additions & 0 deletions snowflake_stmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ static int pdo_snowflake_stmt_dtor(pdo_stmt_t *stmt) /* {{{ */
}
/* }}} */

extern sf_bool STDCALL _is_put_get_command(char* sql_text);

/**
* Execute a prepared statement. This is called by pdo_snowflake_stmt_execute.
*
Expand All @@ -122,6 +124,19 @@ static int pdo_snowflake_stmt_execute_prepared(pdo_stmt_t *stmt) /* {{{ */
pdo_snowflake_stmt *S = stmt->driver_data;
pdo_snowflake_db_handle *H = S->H;

if (_is_put_get_command(S->stmt->sql_text))
{
PDO_LOG_ERR("Unsupported query type %s.", S->stmt->sql_text);
set_snowflake_error(&S->stmt->error,
SF_STATUS_ERROR_GENERAL,
"Unsupported query type.",
SF_SQLSTATE_GENERAL_ERROR,
snowflake_sfqid(S->stmt),
__FILE__, __LINE__);
pdo_snowflake_error_stmt(stmt);
PDO_LOG_RETURN(0);
}

/* execute */
query_status = snowflake_execute(S->stmt);

Expand Down

0 comments on commit e9c6be9

Please sign in to comment.