[MCOL-5572] callastinsertid after alter table doesn't show correct autoincrement value Created: 2023-09-08  Updated: 2023-10-02  Resolved: 2023-10-02

Status: Closed
Project: MariaDB ColumnStore
Component/s: ?
Affects Version/s: 23.10.1
Fix Version/s: 23.10.0

Type: Bug Priority: Blocker
Reporter: Kirill Perov Assignee: Gagan Goel (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Sprint: 2023-10, 2023-11
Assigned for Testing: Kirill Perov Kirill Perov

 Description   

Part of regr test005 failing:

create table foo (col1 int) engine=columnstore;
insert into foo values ( 1 ), ( 2 ), ( 3 ), ( 4 ), ( 5 );
Alter table foo add column newcol bigint comment 'autoincrement';
select callastinsertid('foo');

should give result = 5 but now gives 0

Similar problem if column is not added but changed from non-autoincrement to autoincrement.

Test:
https://github.com/mariadb-corporation/mariadb-columnstore-regression-test/blob/MCOL-5558-KP-regr-fix-test005-test013/mysql/queries/working_dml/misc/autoincrement.negative.sql
lines 31-43

Is broken since 06 Sep 2023 in develop.



 Comments   
Comment by Daniel Lee (Inactive) [ 2023-09-22 ]

Build tested: Develop branch, PR build

[dlee@aloha rocky8]$ cat buildinfo.txt
engine: f37150e04891361987209f2e2b39eeeadd8d2080
server: 33ee6715a5ddbf75fccd023c9bb55d862240de33
buildNo: 8732

With new installation, the fix worked.
Installation upgrade to this build failed for all distros.

Sanity test failed with the following errors:

ERROR 1815 (HY000) at line 9: Internal error: CAL0001: Insert Failed: MCS-2044: An internal error occurred. Check the error log file & contact support.
  ERROR 1815 (HY000) at line 10: Internal error: CAL0001: Insert Failed: MCS-2044: An internal error occurred. Check the error log file & contact support.
  ERROR 1815 (HY000) at line 11: Internal error: Lost connection to ExeMgr. Please contact your administrator
  ERROR 1815 (HY000) at line 12: Internal error: InetStreamSocket::connect: connect() error: Connection refused to: InetStreamSocket: sd: 65 inet: 10.0.0.11 port: 8601
  ERROR 1815 (HY000) at line 13: Internal error: InetStreamSocket::connect: connect() error: Connection refused to: InetStreamSocket: sd: 65 inet: 10.0.0.11 port: 8601
  ERROR 1815 (HY000) at line 14: Internal error: Lost connection to ExeMgr. Please contact your administrator
  ERROR 1815 (HY000) at line 15: Internal error: MCS-2033: Error occurred when calling system catalog.

Query on system catalog table failed

MariaDB [calpontsys]> select * from syscolumn;
ERROR 1815 (HY000): Internal error: An unexpected condition within the query caused an internal processing error within Columnstore. Please check the log files for more details. Additional Information: error in BatchPrimitivePro

err.log

Sep 22 16:17:33 rocky8 PrimProc[48967]: 33.263990 |0|0|0| C 28 CAL0000: /mdb/verylongdirnameforverystrangecpackbehavior/storage/columnstore/columnstore/primitives/primproc/columncommand.cpp error on projectResultRG for oid 1036 lbid 184320: input rids 27, output rids 7#012: Restarted a syscat job 120 times, bailing#012     %%10%%
Sep 22 16:17:33 rocky8 joblist[49015]: 33.267407 |2147483653|0|0| C 05 CAL0000: st: 2 TupleBPS::receiveMultiPrimitiveMessages() caught an exception originally thrown by PrimProc:     %%10%%
Sep 22 16:17:33 rocky8 dmlpackageproc[49015]: 33.267868 |0|0|0| E 21 CAL0001: Insert Failed: MCS-2044: An internal error occurred. Check the error log file & contact support.
Sep 22 16:19:33 rocky8 PrimProc[48967]: 33.809924 |0|0|0| C 28 CAL0000: /mdb/verylongdirnameforverystrangecpackbehavior/storage/columnstore/columnstore/primitives/primproc/columncommand.cpp error on projectResultRG for oid 1036 lbid 184320: input rids 27, output rids 7#012: Restarted a syscat job 120 times, bailing#012     %%10%%
Sep 22 16:19:33 rocky8 joblist[49015]: 33.812113 |2147483653|0|0| C 05 CAL0000: st: 2 TupleBPS::receiveMultiPrimitiveMessages() caught an exception originally thrown by PrimProc:     %%10%%
Sep 22 16:19:33 rocky8 dmlpackageproc[49015]: 33.812410 |0|0|0| E 21 CAL0001: Insert Failed: MCS-2044: An internal error occurred. Check the error log file & contact support.
Sep 22 16:21:34 rocky8 PrimProc[48967]: 34.293938 |0|0|0| C 28 CAL0000: /mdb/verylongdirnameforverystrangecpackbehavior/storage/columnstore/columnstore/primitives/primproc/columncommand.cpp error on projectResultRG for oid 1036 lbid 184320: input rids 27, output rids 7#012: Restarted a syscat job 120 times, bailing#012     %%10%%
Sep 22 16:23:37 rocky8 PrimProc[52925]: 37.208960 |0|0|0| C 28 CAL0000: /mdb/verylongdirnameforverystrangecpackbehavior/storage/columnstore/columnstore/primitives/primproc/columncommand.cpp error on projectResultRG for oid 1036 lbid 184320: input rids 27, output rids 7#012: Restarted a syscat job 120 times, bailing#012     %%10%%
Sep 22 16:25:40 rocky8 PrimProc[54163]: 40.160414 |0|0|0| C 28 CAL0000: /mdb/verylongdirnameforverystrangecpackbehavior/storage/columnstore/columnstore/primitives/primproc/columncommand.cpp error on projectResultRG for oid 1036 lbid 184320: input rids 27, output rids 7#012: Restarted a syscat job 120 times, bailing#012     %%10%%
Sep 22 16:27:42 rocky8 PrimProc[55387]: 42.681428 |0|0|0| C 28 CAL0000: /mdb/verylongdirnameforverystrangecpackbehavior/storage/columnstore/columnstore/primitives/primproc/columncommand.cpp error on projectResultRG for oid 1036 lbid 184320: input rids 27, output rids 7#012: Restarted a syscat job 120 times, bailing#012     %%10%%

Comment by Daniel Lee (Inactive) [ 2023-10-02 ]

Build verified: develop branch

engine: fce971dcd2578bd9ce08065cb143d031da62b797
server: 33ee6715a5ddbf75fccd023c9bb55d862240de33
buildNo: 8844

Upgrade is now working

Generated at Thu Feb 08 02:58:51 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.