-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug Report: Insert query cannot accept now(3) as timestamp value (Major regression from v17.0.4 and above) during upgradation #14740
Comments
The error seems to be related to providing value |
I cannot repeat the issue on main or v17.0.4:
I got an error trying to do the insert w/o the ID value. I'm guessing that you have that using a sequence on your side. So clearly there's something else missing here. You didn't share other details like the MySQL version (8.0.34 in my case) or Vitess config flags (vtgate and vttablet). |
Hi Matt
This will be reproducible if vtgate are on v16 and vttablets are on v17.
We saw this error during upgrade procedure. It works fine when enter stack
is on v17.
…On Sat, Dec 9, 2023, 20:52 Matt Lord ***@***.***> wrote:
I cannot repeat the issue on main or v17.0.4:
git checkout v17.0.4
make build
pushd examples/local
./101_initial_cluster.sh
echo "create table test (id int not null auto_increment primary key, ts timestamp);
insert into test values (1, now(3));
CREATE TABLE `contest_user_team_mapping` ( `id` bigint NOT NULL, `user_match_mapping_id` bigint NOT NULL, `contest_id` bigint NOT
NULL, `entry_fee_type` int DEFAULT NULL, `channel_id` int DEFAULT NULL, `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `ticket_source` int DEFAULT NULL, `ticket_discount` decimal(10,2) DEFAULT NULL, `entry_fee` decimal(10,2) DEFAULT NULL, `match_id` bigint DEFAULT NULL, `multiplier` decimal(5,2) DEFAULT NULL, `lb_id` bigint DEFAULT NULL, `additional_info` text CHARACTER SET utf8 COLLATE utf8_general_ci, `user_id` bigint DEFAULT NULL, `bucket_id` bigint DEFAULT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `contest_user` (`contest_id`,`user_match_mapping_id`), KEY `idx_contest_id` (`contest_id`), KEY `idx_updated_at` (`updated_at`), KEY `idx_match_id` (`match_id`,`id`), KEY `idx_user_id` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
insert into contest_user_team_mapping (id, user_match_mapping_id,contest_id,entry_fee_type,channel_id,ticket_source,ticket_discount,entry_fee,match_id,multiplier, lb_id, additional_info,user_id,bucket_id,created_at) values (1, 1, 2, 3,4,null,null,10.0,10,null, null, null, 1, null, now(3));
I got an error trying to do the insert w/o the ID value. I'm guessing that
you have that using a sequence on your side.
So clearly there's something else missing here. You didn't share other
details like the MySQL version (8.0.34 in my case) or Vitess config flags
(vtgate and vttablet).
—
Reply to this email directly, view it on GitHub
<#14740 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD4L52W6VX4MSKV7SNB7DTYIR64XAVCNFSM6AAAAABANVMXFKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBYGQZTQOBXGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I confirm |
Is there any workaround for upgrade? |
There are two workaround here:
We plan to fix this issue and release a patch next week. |
Overview of the Issue
We are seeing complete insert failures on our table which was working fine on vitess v16.0.2.
After doing rolling upgrades on our tablets from v16.0.2-> v17.0.4. When we switched over the primary tablet to vitess v17.0.4 version, we can see complete failures.
Reproduction Steps:
Create a vschema
Reproduction Steps
Apply the insert statement
Output:
Binary Version
Version: 17.0.4 (Git revision 9a3d0f4a69a840cfa2cb86654abd4afa0be6e0aa branch 'HEAD') built on Mon Nov 13 08:18:05 UTC 2023 by runner@fv-az173-607 using go1.20.11 linux/amd64
Operating System and Environment details
Log Fragments
The text was updated successfully, but these errors were encountered: