Original content of column which is involved into ENCRYPT() is displayed as 
distorted view after this call
----------------------------------------------------------------------------------------------------------

                 Key: CORE-6186
                 URL: http://tracker.firebirdsql.org/browse/CORE-6186
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine
    Affects Versions: 4.0 Beta 1
            Reporter: Pavel Zotov


Query-1:
=======
Trivial:

 with
 a as (
 select s_origin
 from (
   select 'Encrypts/decrypts data using symmetric cipher' as s_origin
   from rdb$database
     )
 )
 select
 a.s_origin
 from a
 ;

It issues obvious result:
 S_ORIGIN                        Encrypts/decrypts data using symmetric cipher

Query-2:
=======
The same as Query-1, but we add call to ENCRYPT() function, see line marked as 
"[ 1 ]" below:

 with
 a as (
 select s_origin
 from (
   select 'Encrypts/decrypts data using symmetric cipher' as s_origin
   from rdb$database
     )
 )
 select
    a.s_origin
  ,encrypt( a.s_origin using aes mode ofb key '0123456789012345' iv 
'abcdefghhgfedcba') as s_encrypted ------------- [ 1 ]
 from a
 ;

 Result will be:
 S_ORIGIN 
  
456E6372797074732F64656372797074732064617461207573696E672073796D6D657472696320636970686572
 S_ENCRYPTED 
 
910805BDA8B05C475E8B5D3D0971D58649EA0D549FEA1633A8811429183E925E1C2C77CE4E3B9DCDFA0C75997E

So, content of the column 'S_ORIGIN' has been changed (and I could not find any 
way to 'materialize' CTE 'a' in such manner that content of S_ORIGIN will be 
preserved from changing).



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to