phpmyadmin / phpmyadmin/phpmyadmin

MySQL 8.0.30: GIPK Mode insert errors

Open
#19,539 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
7.9k
Forks
3.6k
Avg merge
4d 18h
Merged PRs (30d)
36

Description

Hi! I try to use new feature of MySQL 8.0.30: GIPK Mode.
https://blogs.oracle.com/mysql/post/mysql-uuids

CREATE TABLE `user` (
 `my_row_id` bigint unsigned NOT NULL AUTO_INCREMENT /*!80023 INVISIBLE */,
 `id` char(36) NOT NULL,
 `created_at` timestamp NOT NULL,
 `updated_at` timestamp NULL DEFAULT NULL,
 PRIMARY KEY (`my_row_id`),
 UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci

When I try to insert data row in PhpMyAdmin I have an errors:

Warning in ./libraries/classes/InsertEdit.php#2091
 Undefined array key 5

Backtrace

InsertEdit.php#2506: PhpMyAdmin\InsertEdit->getHtmlForInsertEditFormColumn(
array,
integer 5,
array,
boolean false,
,
string 'onchange',
integer 0,
string '[multi_edit][0]',
boolean true,
array,
integer 0,
integer 5,
integer 6,
boolean true,
array,
integer 0,
string 'email',
string 'xauth',
integer 0,
integer 0,
string 'input',
string 'ltr',
array,
array,
string '',
)
ChangeController.php#222: PhpMyAdmin\InsertEdit->getHtmlForInsertEditRow(
array,
array,
array,
boolean false,
,
string 'onchange',
integer 0,
string '[multi_edit][0]',
boolean true,
array,
integer 0,
integer 5,
integer 6,
boolean true,
array,
integer 0,
string 'email',
string 'xauth',
integer 0,
integer 0,
string 'ltr',
array,
array,
)
Routing.php#191: PhpMyAdmin\Controllers\Table\ChangeController->__invoke(
,
array,
)
index.php#43: PhpMyAdmin\Routing::callControllerForRoute(
,
string '/table/change',
,
,
)
Warning in ./libraries/classes/InsertEdit.php#2091
 Attempt to read property "length" on null

Backtrace

InsertEdit.php#2506: PhpMyAdmin\InsertEdit->getHtmlForInsertEditFormColumn(
array,
integer 5,
array,
boolean false,
,
string 'onchange',
integer 0,
string '[multi_edit][0]',
boolean true,
array,
integer 0,
integer 5,
integer 6,
boolean true,
array,
integer 0,
string 'email',
string 'xauth',
integer 0,
integer 0,
string 'input',
string 'ltr',
array,
array,
string '',
)
ChangeController.php#222: PhpMyAdmin\InsertEdit->getHtmlForInsertEditRow(
array,
array,
array,
boolean false,
,
string 'onchange',
integer 0,
string '[multi_edit][0]',
boolean true,
array,
integer 0,
integer 5,
integer 6,
boolean true,
array,
integer 0,
string 'email',
string 'xauth',
integer 0,
integer 0,
string 'ltr',
array,
array,
)
Routing.php#191: PhpMyAdmin\Controllers\Table\ChangeController->__invoke(
,
array,
)
index.php#43: PhpMyAdmin\Routing::callControllerForRoute(
,
string '/table/change',
,
,
)

Image

Error
SQL query: [Copy](https://pma4.freicon.ru/index.php?route=/table/change&db=xauth&table=user#) Edit


INSERT INTO `user` (`my_row_id`, `id`, `created_at`, `updated_at`) VALUES ('', '5e5c279e-1c35-49bf-963d-fc9c67597024', NOW(), NULL)
MySQL said: Documentation

#1366 - Incorrect integer value: '' for column 'my_row_id' at row 1
Server: Server 1 (Localhost via UNIX socket)
Server type: MySQL
Server connection: SSL is not being used Documentation
Server version: 8.0.36 - Gentoo Linux mysql-8.0.36
Protocol version: 10
User: root@localhost
Server charset: UTF-8 Unicode (utf8mb4)

nginx/1.25.3
Database client version: libmysql - mysqlnd 8.1.20
PHP extension: mysqli Documentation curl Documentation mbstring Documentation
PHP version: 8.1.20

Version information: 5.2.1 (up to date)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at libraries/classes/InsertEdit.php around line 2091 and follow the /table/change path through ChangeController.php. Reproduce the issue with the provided MySQL table definition and insert form, then verify that GIPK tables no longer produce the reported warnings or include an invalid empty value for my_row_id.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, php
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.