-
-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Installer switches custom are to small (100 chars)
It seems that the field in DB is limited, a manual workaround got tested, but it would be nice to get it fixed in app as well.
thanks chris
To Reproduce
Steps to reproduce the behavior:
- Packages > Package XY > Edit
- Versions > Version n.n.n > Expand
- Installers > x64 > Edit
- Custom: insert-param-longer-than-100-chars-will-lead-to-error-123456789012345678901234567890123456789012345678901234567890
- Update > Print Error
- Container log
sqlalchemy.exc.PendingRollbackError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (pymysql.err.DataError) (1406, "Data too long for column 'value' at row 1")
[SQL: UPDATE installer_switch SET value=%(value)s WHERE installer_switch.id = %(installer_switch_id)s]
[parameters: {'value': "/S /V /qn IKEY=DIHCRESX9C9DFPOISIJD SKEY=ReH046DeFyBgAbRzVozIN5nzLVEaGlHmILWY poercccccc cccc123@'# asdfasdfasdfs", 'installer_switch_id': 2}]
(Background on this error at: https://sqlalche.me/e/20/9h9h) (Background on this error at: https://sqlalche.me/e/20/7s2a)
Expected behavior
It must save the custom value
Web Container log
sqlalchemy.exc.PendingRollbackError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (pymysql.err.DataError) (1406, "Data too long for column 'value' at row 1")
[SQL: UPDATE installer_switch SET value=%(value)s WHERE installer_switch.id = %(installer_switch_id)s]
[parameters: {'value': "/S /V /qn IKEY=DIHCRESX9C9DFPOISIJD SKEY=ReH046DeFyBgAbRzVozIN5nzLVEaGlHmILWY poercccccc cccc123@'# asdfasdfasdfs", 'installer_switch_id': 2}]
(Background on this error at: https://sqlalche.me/e/20/9h9h) (Background on this error at: https://sqlalche.me/e/20/7s2a)
app details
[root@srv-pk3s03-01 ~]# kubectl get pods -o yaml | grep image: | sort -u
image: docker.io/library/mysql:8.0
image: ghcr.io/thilojaeggi/wingetty:stable
image: mysql:8.0
manual fix
mysql> desc installer_switch;
+--------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------+--------------+------+-----+---------+----------------+
| id | int | NO | PRI | NULL | auto_increment |
| installer_id | int | YES | MUL | NULL | |
| parameter | varchar(20) | YES | | NULL | |
| value | varchar(100) | YES | | NULL | |
+--------------+--------------+------+-----+---------+----------------+
4 rows in set (0.00 sec)
mysql> ALTER TABLE installer_switch MODIFY COLUMN value VARCHAR(512);
Query OK, 0 rows affected (0.00 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> desc installer_switch;
+--------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------+--------------+------+-----+---------+----------------+
| id | int | NO | PRI | NULL | auto_increment |
| installer_id | int | YES | MUL | NULL | |
| parameter | varchar(20) | YES | | NULL | |
| value | varchar(512) | YES | | NULL | |
+--------------+--------------+------+-----+---------+----------------+
4 rows in set (0.00 sec)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working