Skip to content
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

MySQL Syntax error on multiple SQL command #92

Open
KamranBiglari opened this issue Jan 16, 2023 · 0 comments
Open

MySQL Syntax error on multiple SQL command #92

KamranBiglari opened this issue Jan 16, 2023 · 0 comments

Comments

@KamranBiglari
Copy link

Hi there,

I have an issue with multiple insert by using the migration directory or without it.
I always getting MySQL syntax error if I have multiple line and any command but if I remove the rest and each file I add just one MySQL command it works.

INSERT INTO ReferenceData.topics (topicName,isTenor,batchSize,intervalTime,lambdaId,description) VALUES('derivedData',0,1500,10,NULL,'Data generated by KDA derived from the fiat topics'),('M1',1,1500,5,NULL,'Forward tenor'),('M10',1,1500,10,NULL,'Forward tenor'),('M11',1,1500,10,NULL,'Forward tenor'),('M12',1,1500,10,NULL,'Forward tenor'),('M18',1,1500,60,NULL,'Forward tenor'),('M2',1,1500,10,NULL,'Forward tenor'),('M21',1,1500,300,NULL,'Forward tenor'),('M3',1,1500,10,NULL,'Forward tenor'),('M4',1,1500,10,NULL,'Forward tenor');
INSERT INTO ReferenceData.topics (topicName,isTenor,batchSize,intervalTime,lambdaId,description) VALUES('M5',1,1500,10,NULL,'Forward tenor'),('M6',1,1500,10,NULL,'Forward tenor'),('M7',1,1500,10,NULL,'Forward tenor'),('M8',1,1500,10,NULL,'Forward tenor'),('M9',1,1500,10,NULL,'Forward tenor'),('ON',1,1500,5,NULL,'Forward tenor'),('SN',1,1500,5,NULL,'Forward tenor'),('SPT',1,1500,1,NULL,'Spot data'),('TN',1,1500,5,NULL,'Forward tenor'),('W1',1,1500,5,NULL,'Forward tenor');
INSERT INTO ReferenceData.topics (topicName,isTenor,batchSize,intervalTime,lambdaId,description) VALUES('W2',1,1500,5,NULL,'Forward tenor'),('W3',1,1500,5,NULL,'Forward tenor'),('Y2',1,1500,600,NULL,'Forward tenor'),('Y3',1,1500,6000,NULL,'Forward tenor'),('Y4',1,1500,6000,NULL,'Forward tenor'),('Y5',1,1500,6000,NULL,'Forward tenor');

Terraform Version

v1.3.6

Panic Output

│ Error: Plugin error
│
│ The plugin returned an unexpected error from plugin6.(*GRPCProvider).ApplyResourceChange: rpc error: code = Unknown
│ desc = Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server
│ version for the right syntax to use near 'INSERT INTO ReferenceData.topics
│ (topicName,isTenor,batchSize,intervalTime,lambd' at line 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant