[1/3](Resend) msi: Add support for table names in select statements
Nathan Gallaher
ngallaher at deepthought.org
Tue Nov 24 07:29:29 CST 2009
Propagate tablename from 'SELECT tablename.column from tablename' queries
into VIEW_find_column(). Previously, the tablename had been dropped.
-------------- next part --------------
From 5703d1592b079ea7030db1dc5655d0e35cef3161 Mon Sep 17 00:00:00 2001
From: Nathan Gallaher <ngallaher at deepthought.org>
Date: Mon, 9 Nov 2009 20:41:43 -0500
Subject: msi: Add support for table names in select statements
Propagate tablename from 'SELECT tablename.column from tablename' queries
into VIEW_find_column(). Previously, the tablename had been dropped.
---
dlls/msi/select.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/msi/select.c b/dlls/msi/select.c
index c4b9e80..f6b5dae 100644
--- a/dlls/msi/select.c
+++ b/dlls/msi/select.c
@@ -368,12 +368,14 @@ static const MSIVIEWOPS select_ops =
NULL,
};
-static UINT SELECT_AddColumn( MSISELECTVIEW *sv, LPCWSTR name )
+static UINT SELECT_AddColumn( MSISELECTVIEW *sv, LPCWSTR name,
+ LPCWSTR table_name )
{
UINT r, n=0;
MSIVIEW *table;
- TRACE("%p adding %s\n", sv, debugstr_w( name ) );
+ TRACE("%p adding %s.%s\n", sv, debugstr_w( table_name ),
+ debugstr_w( name ));
if( sv->view.ops != &select_ops )
return ERROR_FUNCTION_FAILED;
@@ -389,7 +391,7 @@ static UINT SELECT_AddColumn( MSISELECTVIEW *sv, LPCWSTR name )
if( sv->num_cols >= sv->max_cols )
return ERROR_FUNCTION_FAILED;
- r = VIEW_find_column( table, name, NULL, &n );
+ r = VIEW_find_column( table, name, table_name, &n );
if( r != ERROR_SUCCESS )
return r;
@@ -433,7 +435,7 @@ UINT SELECT_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table,
while( columns )
{
- r = SELECT_AddColumn( sv, columns->column );
+ r = SELECT_AddColumn( sv, columns->column, columns->table );
if( r )
break;
columns = columns->next;
--
1.6.0.4
More information about the wine-patches
mailing list