Bug #10165 powerbuilder
Submitted: 26 Apr 2005 0:25 Modified: 30 May 2013 12:36
Reporter: Keith Roberts Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version:3.51 OS:Linux (Linux Red Hat 9)
Assigned to: Bogdan Degtyariov CPU Architecture:Any

[26 Apr 2005 0:25] Keith Roberts
Description:
When connecting with PowerBuilder 10.2, get an error message "This column's data type (column name) requires the use of an embedded sql statement" when selecting a data column type of blob.

I can use the AES_DECRYPT function against the blob and the decrypted data is selected with no problems.

If I force the column data type to be string in the datawindow, then I get the data to return, but it is converted into a string and the special characters are converted into string data.

I do not get this error when using SQLyog.

How to repeat:
Use PowerBuilder 10.x, MySQL 4.1.11-standard-log.  Use the database painter to select a blob column.  You will get an error of "this column's data type (column name) requires the use of an embedded sql statement".

Suggested fix:
I am not sure if the ODBC driver needs to be fixed or if a bind variable was missed during the installation.
[19 May 2005 7:06] Vasily Kishkin
Hi! Could you please to write here what the version of mysql odbc driver you use?
[19 May 2005 16:23] Keith Roberts
ODBC Administrator Properties:
MySQL ODBC 3.51 Driver 3.51.10.00 MYODBC3.DLL 10/25/2004

File Properties:
myodbc3 
3.51.09 (production)
[1 Jun 2005 6:27] Vasily Kishkin
Tested PowerBuilder 10, MySQL 4.1.13, MyODBC 3.51.11, Suse 9.3
[27 Jul 2007 12:56] Susanne Ebrecht
I think that this old bug needs re-verifying
[11 Sep 2007 14:07] Tonci Grgin
Hi all.

Reverifying with 3.51.20 and 5.1 on Windows gives correct results (SQLVARCHAR 12) for AES_DECRYPT column in standalone C++ test case (attached):

Server version: 5.0.50-pb1046-log MySQL Pushbuild Edition, build 1046

mysql> show create table foo;
| Table | Create Table
| foo   | CREATE TABLE `foo` (
  `RecId` int(10) unsigned NOT NULL auto_increment,
  `Results` longblob NOT NULL,
  `vcField` varchar(255) default NULL,
  PRIMARY KEY  (`RecId`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 |

mysql> select AES_DECRYPT(Results,"tony") from foo limit 0;
Field   1:  `AES_DECRYPT(Results,"tony")`
Catalog:    `def`
Database:   ``
Table:      ``
Org_table:  ``
Type:       VAR_STRING
Collation:  binary (63)
Length:     4294967295
Max_length: 0
Decimals:   31
Flags:      BINARY

Now, if someone can just attach PB 11 project which I can use to see if there is a problem with PB...
[11 Sep 2007 14:09] Tonci Grgin
C++ test case

Attachment: Bug10165.cpp (text/x-c++), 4.93 KiB.

[11 Sep 2007 14:11] Tonci Grgin
SQL script used for testing

Attachment: 10165.zip (application/x-zip-compressed, text), 2.26 KiB.

[11 Oct 2007 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[30 May 2013 12:36] Bogdan Degtyariov
I'm closing this bug because I can not continue without feedback from the reporter. If you have new info, please reopen the report.