You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "chenws1012 (via GitHub)" <gi...@apache.org> on 2023/03/10 03:36:35 UTC

[GitHub] [shardingsphere] chenws1012 opened a new issue, #24535: Exception "Column index out of range" happend when add new column to 'table' and execute sql "select * from table"

chenws1012 opened a new issue, #24535:
URL: https://github.com/apache/shardingsphere/issues/24535

   ## Bug Report
   
   Exception "Column index out of range" happend when add new column for 'table' and execute sql "select * from table"
   Before report a bug, make sure you have:
   
   ### Which version of ShardingSphere did you use?
   5.2.1
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-JDBC
   
   ### Expected behavior
   success
   ### Actual behavior
   java.sql.SQLException: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 6
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   
   1. start service
   2. add new column to a table on database
   3. request api to execute  a sql similar "select * from table" 
   
   ### Example codes for reproduce this issue (such as a github link).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] chenws1012 commented on issue #24535: Exception "Column index out of range" happend after add new column to 'table' and execute sql similar "select * from table"

Posted by "chenws1012 (via GitHub)" <gi...@apache.org>.
chenws1012 commented on issue #24535:
URL: https://github.com/apache/shardingsphere/issues/24535#issuecomment-1469126728

   > Hi @chenws1012 , I tested on proxy (code from master branch). Add column and query on proxy, it works.
   > 
   > ```
   > mysql> alter table t_order add column c1 int after status;
   > Query OK, 0 rows affected (2.44 sec)
   > 
   > mysql> select count(1) from t_order;
   > +----------+
   > | count(1) |
   > +----------+
   > |     3020 |
   > +----------+
   > 1 row in set (0.03 sec)
   > ```
   > 
   > From the steps, the step 2 is `add new column to a table on database`. Could you try to add column via `ShardingSphereDataSource` but not underlying database?
   Thanks!
   Try with `select * form t_order;` , and I use the way of integrating sharding-jdbc jar into the project.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] chenws1012 commented on issue #24535: Exception "Column index out of range" happend after add new column to 'table' and execute sql similar "select * from table"

Posted by "chenws1012 (via GitHub)" <gi...@apache.org>.
chenws1012 commented on issue #24535:
URL: https://github.com/apache/shardingsphere/issues/24535#issuecomment-1464868803

   <img width="1112" alt="image" src="https://user-images.githubusercontent.com/17613152/224476107-83354851-04d1-4362-bd85-9ec00fe5136c.png">
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] sandynz commented on issue #24535: Exception "Column index out of range" happend after add new column to 'table' and execute sql similar "select * from table"

Posted by "sandynz (via GitHub)" <gi...@apache.org>.
sandynz commented on issue #24535:
URL: https://github.com/apache/shardingsphere/issues/24535#issuecomment-1470029881

   `select * form t_order;` works too:
   ```
   mysql> select * from t_order limit 1;
   +----------+---------+--------+------+-------------+------------+-----------+----------------+----------------------+---------------------+--------------------+---------+------------+-----------+---------------------+---------------------+------------+----------+------------+-------+----------------------------------------------------------------------------------------------------------------------------------+-------------+--------+--------------+--------+--------------------------+--------------+--------+-------+----------------------------------------------+
   | order_id | user_id | status | c1   | t_mediumint | t_smallint | t_tinyint | t_unsigned_int | t_unsigned_mediumint | t_unsigned_smallint | t_unsigned_tinyint | t_float | t_double   | t_decimal | t_timestamp         | t_datetime          | t_date     | t_time   | t_year     | t_bit | t_binary                                                                                                                         | t_varbinary | t_blob | t_mediumblob | t_char | t_text                   | t_mediumtext | t_enum | t_set | t_json                                       |
   +----------+---------+--------+------+-------------+------------+-----------+----------------+----------------------+---------------------+--------------------+---------+------------+-----------+---------------------+---------------------+------------+----------+------------+-------+----------------------------------------------------------------------------------------------------------------------------------+-------------+--------+--------------+--------+--------------------------+--------------+--------+-------+----------------------------------------------+
   |        5 |      42 | AJAcjN | NULL |          55 |         55 |        55 |             98 |                   98 |                  98 |                 98 |   -8.96 | 416.695765 |    251.51 | 2023-03-14 15:18:19 | 2023-03-14 15:18:19 | 2023-03-14 | 15:18:18 | 2023-01-01 |    1  | t                                                                                                                                | e           | s      | t            | ey     | ☠️x☺️x✋x☹️               | r            | 1      | 2     | {"test": "qkLXMCJJFIenDUNEfZwyPYeBcnwmYOTO"} |
   +----------+---------+--------+------+-------------+------------+-----------+----------------+----------------------+---------------------+--------------------+---------+------------+-----------+---------------------+---------------------+------------+----------+------------+-------+----------------------------------------------------------------------------------------------------------------------------------+-------------+--------+--------------+--------+--------------------------+--------------+--------+-------+----------------------------------------------+
   1 row in set (0.18 sec)
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] azexcy commented on issue #24535: Exception "Column index out of range" happend after add new column to 'table' and execute sql similar "select * from table"

Posted by "azexcy (via GitHub)" <gi...@apache.org>.
azexcy commented on issue #24535:
URL: https://github.com/apache/shardingsphere/issues/24535#issuecomment-1463348196

   Thanks for feedback, can you try the latest version?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] chenws1012 commented on issue #24535: Exception "Column index out of range" happend after add new column to 'table' and execute sql similar "select * from table"

Posted by "chenws1012 (via GitHub)" <gi...@apache.org>.
chenws1012 commented on issue #24535:
URL: https://github.com/apache/shardingsphere/issues/24535#issuecomment-1463980874

   > Thanks for feedback, can you try the latest version?
    
   the same to 5.3.1 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Exception "Column index out of range" happend after add new column to 'table' and execute sql similar "select * from table" [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu closed issue #24535: Exception "Column index out of range" happend after add new column to 'table' and execute sql similar "select * from table"
URL: https://github.com/apache/shardingsphere/issues/24535


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] chenws1012 commented on issue #24535: Exception "Column index out of range" happend after add new column to 'table' and execute sql similar "select * from table"

Posted by "chenws1012 (via GitHub)" <gi...@apache.org>.
chenws1012 commented on issue #24535:
URL: https://github.com/apache/shardingsphere/issues/24535#issuecomment-1463990116

   When publishing, modify the table structure first, and  exception will appear online at this time ,until the new version service is launched


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] sandynz commented on issue #24535: Exception "Column index out of range" happend after add new column to 'table' and execute sql similar "select * from table"

Posted by "sandynz (via GitHub)" <gi...@apache.org>.
sandynz commented on issue #24535:
URL: https://github.com/apache/shardingsphere/issues/24535#issuecomment-1468070055

   Hi @chenws1012 , I tested on proxy (code from master branch). Add column and query on proxy, it works.
   
   ```
   mysql> alter table t_order add column c1 int after status;
   Query OK, 0 rows affected (2.44 sec)
   
   mysql> select count(1) from t_order;
   +----------+
   | count(1) |
   +----------+
   |     3020 |
   +----------+
   1 row in set (0.03 sec)
   ```
   
   From the steps, the step 2 is `add new column to a table on database`. Could you try to add column via `ShardingSphereDataSource` but not underlying database?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org