cancel
Showing results for 
Search instead for 
Did you mean: 

Issues in BLOB data type In COLUMN Store Table

0 Kudos

Hi

I had row store table with blob data type  where i was able to insert images in table in blob data type column , i was able to update blob data type too for same inserted record. The image size is not more than 2 GB.

The two scenarios were possible on this table :

1)  Insert large image and then update the inserted image with smaller size image .

2) Insert small  size image and then update inserted image with large image.

I changed  table from row store  to column store just to test the performance of table.


I inserted large size image , and tried to update this with smaller size image. The update is successful.

I inserted the small size image , but i am unable to update the small size inserted image with large size image.

Any reason why update is failing in this column store scenario .

I am doing this image testing in java code.

Accepted Solutions (0)

Answers (1)

Answers (1)

lbreddemann
Active Contributor
0 Kudos

Ok, without your code and the error messages you receive for the update, all we can do here is to be sorry for you

0 Kudos

Hi Lars

thanks for reply.

Here is the code , we are using JDBC driver ngdbc.jar in JAVA for accessing SAP HANA database.


This is simplified cut down code version.



The JAVA error i am getting after executing this code for update is(updating small size image with large one )



[129]: transaction rolled back by an internal error: Updating LOB data failed: row_count=0 but expected_count=1

JAVA CODE :

String INSERTQRY = "INSERT INTO " + "TABLE_IMAGE" + " (id, name, value, time, quality)" + " VALUES (?,?,?,?,?)";



String UPDATEQRY = "UPDATE " + "TABLE_IMAGE" + " SET value = ?, time = ?, quality = ?" + " WHERE id = ? AND name = ?";

            if (insertflag){

PreparedStatement pstmt = connection.prepareStatement(INSERTQRY);

                  pstmt.setString(1, id);

  1. pstmt.setString(2, name);
  2. pstmt.setBytes(3, value); //===> value is byte array of image
  3. pstmt.setLong(4, time);
  4. pstmt.setString(5, quality);

  1. pstmt.execute();

} else {

PreparedStatement pstmt = connection.prepareStatement(UPDATEQRY);

  1. pstmt.setBytes(1, value); //===> value is byte array of image
  2. pstmt.setLong(2, time);
  3. pstmt.setString(3, quality);
  4. pstmt.setString(4, id);
  5. pstmt.setString(5, name);

  1. pstmt.execute();
0 Kudos

Hi All

One strange behavior , as the code was not working for update statement ; i created Upsert statement

, upsert also failed  then i created Stored Procedure  and passed the required values for update.

AND IT Worked . Not sure why Update statement failed  when update is called from Java

whereas Update worked inside stored procedure when stored procedure is called from JAVA.

Any one out here to explain this behavior..

lbreddemann
Active Contributor
0 Kudos

Have you had a look into the indexserver trace file to learn more about the reported error?

In any case, this is not how it is supposed to work (or not work), therefore I recommend to open a support incident.

0 Kudos

Hi Lars

I looked into Index server log and found following log specific to transaction that i am running.

[1491]{-1}[-1/-1] 2016-09-07 12:07:42.937946 i SQLSessionCmd    tcp_listener.cc(00217) : canceled transaction still not finished (cancelation might be still on-going): transaction id=77, update trans id=0, sql_string=, statement_hash=, user_name=INF188861, conn_id=449771, thread_id=0, app_user_name=, app_name=, app_source=