-
Notifications
You must be signed in to change notification settings - Fork 373
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
PDO lastInsertId primary bigInt, after id 999999999 return '' #735
Comments
Hi @Litiano, |
Hi @yitam . I used
Table: |
Thanks @Litiano |
Hi @Litiano, the buffer allocated in our driver when returning the lastinsertid() has the size of a maximum integer (10 digits), and in your case, a bigint over 999999999 has exceeded the limit. |
Hi @yitam , How can we solve this? |
Yes @Litiano we can fix it, but will check the plan when to release a preview. Please stay tuned. |
Fixed in 5.2.1-preview. Please reopen the issue if otherwise, @Litiano |
+## Driver version or file name
+v5.2.0 TS
+
+## SQL Server version
+13.0.4206.0
+
+## Client operating system
+Windows 10 x64.
+
+## PHP version
+7.2.3 x86
+
+## Microsoft ODBC Driver version
+13 (13.1.14414.46).
+
+## Table schema
CREATE TABLE [dbo].[big_int](
[id] [bigint] IDENTITY(1,1) NOT NULL,
[name] nvarchar NOT NULL,
[created_at] [datetime] NULL,
[updated_at] [datetime] NULL,
PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
+
+## Problem description
+PDO lastInsertId no work correctly with primary bigInt, after id 999999999 return ''
+
The text was updated successfully, but these errors were encountered: