Commit 63ccdfea authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msi: Support NULL value in INSERT query.

parent b052fc3c
...@@ -658,6 +658,12 @@ const_val: ...@@ -658,6 +658,12 @@ const_val:
if( !$$ ) if( !$$ )
YYABORT; YYABORT;
} }
| TK_NULL
{
$$ = EXPR_sval( info, NULL );
if ( !$$ )
YYABORT;
}
; ;
column_val: column_val:
...@@ -921,7 +927,8 @@ static struct expr * EXPR_sval( void *info, const struct sql_str *str ) ...@@ -921,7 +927,8 @@ static struct expr * EXPR_sval( void *info, const struct sql_str *str )
if( e ) if( e )
{ {
e->type = EXPR_SVAL; e->type = EXPR_SVAL;
if( SQL_getstring( info, str, (LPWSTR *)&e->u.sval ) != ERROR_SUCCESS ) if( !str) e->u.sval = NULL;
else if( SQL_getstring( info, str, (LPWSTR *)&e->u.sval ) != ERROR_SUCCESS )
return NULL; /* e will be freed by query destructor */ return NULL; /* e will be freed by query destructor */
} }
return e; return e;
......
...@@ -3705,7 +3705,7 @@ static void test_states(void) ...@@ -3705,7 +3705,7 @@ static void test_states(void)
add_custom_action_entry( hdb, "'ConditionCheck7', 19, '', 'Condition check failed (7)'" ); add_custom_action_entry( hdb, "'ConditionCheck7', 19, '', 'Condition check failed (7)'" );
add_custom_action_entry( hdb, "'ConditionCheck8', 19, '', 'Condition check failed (8)'" ); add_custom_action_entry( hdb, "'ConditionCheck8', 19, '', 'Condition check failed (8)'" );
add_custom_action_entry( hdb, add_custom_action_entry( hdb,
"'VBFeatureRequest', 38, '', 'Session.FeatureRequestState(\"three\") = 3'" ); "'VBFeatureRequest', 38, NULL, 'Session.FeatureRequestState(\"three\") = 3'" );
add_install_execute_sequence_entry( hdb, "'ConditionCheck1', 'REINSTALL', '798'" ); add_install_execute_sequence_entry( hdb, "'ConditionCheck1', 'REINSTALL', '798'" );
add_install_execute_sequence_entry( hdb, "'ConditionCheck2', 'NOT REMOVE AND Preselected', '799'" ); add_install_execute_sequence_entry( hdb, "'ConditionCheck2', 'NOT REMOVE AND Preselected', '799'" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment