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 Insert Row connector in logicapp and power automate is expecting value for auto increment fields. There is no workaround for this either #1052

Open
srinims opened this issue Mar 25, 2024 · 2 comments
Labels

Comments

@srinims
Copy link

srinims commented Mar 25, 2024

Describe the Bug with repro steps

1, Create table with ID as auto increment and primary key

2, Add insert row for mysql

3, since ID is primary key, it is non nullable field. logic app is expecting the value to be passed here though it is not required.

Please note this issue is not happening in power apps.

What type of Logic App Is this happening in?

Consumption (Portal)

Are you using new designer or old designer

New Designer

Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg

Yes

Workflow JSON

No response

Screenshots or Videos

No response

Browser

chrome

Additional context

No response

@srinims
Copy link
Author

srinims commented Mar 25, 2024

power automate is not asking the value for the auto increment nullable field. However, it is causing failure during insertion.

### below is the create table script.

CREATE TABLE customer_updates (
ID int NOT NULL AUTO_INCREMENT,
customer_id varchar(50) NOT NULL,
message varchar(255) DEFAULT NULL,
last_updated datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (ID,buyer_id)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

### below is the error message
{
"status": 400,
"message": "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 '43ab1d1c-14d6-4dec-8e6e-ea65d693a3c8'' AND ID = 9' at line 1\r\nclientRequestId: edae4a96-646a-47a1-ae81-6295c90d7754",
"error": {
"message": "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 '43ab1d1c-14d6-4dec-8e6e-ea65d693a3c8'' AND ID = 9' at line 1"
},
"source": "azuremysql-uks.azconn-uks-002.p.azurewebsites.net"
}

Below is the json code from logic app
"Insert_row": {
"inputs": {
"body": {
"buyer_id": "@{variables('buyerid')}",
"message": "Email address updated '@{body('Get_row')['email_address']}'"
},
"host": {
"connection": {
"name": "@parameters('$connections')['azuremysql']['connectionId']"
}
},
"method": "post",
"path": "/datasets/@{encodeURIComponent(encodeURIComponent('default'))},@{encodeURIComponent(encodeURIComponent('db1'))}/tables/@{encodeURIComponent(encodeURIComponent('[db1].[customer_updates]'))}/items"
}

@srinims srinims changed the title insert row is expecting value for auto incremented items Mysql Insert Row connector in logicapp and power automate is expecting value for auto increment fields. There is no workaround for this either Mar 27, 2024
@hartra344 hartra344 transferred this issue from Azure/LogicAppsUX May 3, 2024
Copy link

This issue is stale because it has been open for 45 days with no activity.

@github-actions github-actions bot added the stale label Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant