Re: Row-level security?

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Fri, 29 May 2009 15:08:13 -0300
Message-ID: <4a202472$0$23761$9a566e8b_at_news.aliant.net>


lawpoop wrote:

> On May 28, 7:58 pm, Bob Badour <bbad..._at_pei.sympatico.ca> wrote:
>

>>lawpoop wrote:
>>
>>>On May 28, 4:00 pm, lawpoop <lawp..._at_gmail.com> wrote:
>>
>>>>I don't think it does. The manual says that, for creating views, "The
>>>>SELECT statement cannot refer to system or user variables. "http://dev.mysql.com/doc/refman/5.0/en/create-view.html
>>
>>>I just tried it, and I got the error, "View's SELECT contains a
>>>variable or parameter"
>>
>>Without seeing the exact query, it's hard to say what's wrong.

>
> Well, I was trying to create a query that had an _at_myID in it.
>
>>One can create views that reference the user() function in mysql 5.0

>
> Cool. I guess that's because that's a function, and not a variable?

Yes, that would explain the difference entirely. _at_myID is a parameter that stands for an argument that only exists in the connection to your application so a view using it could only exist in the connection to your application. But views necessarily persist outside the scope of a connection. User() is intrinsic to the dbms and is always available. Received on Fri May 29 2009 - 20:08:13 CEST

Original text of this message