Hallo Wolle,
ich hab dasselbe Problem... das liegt daran, dass in der Tat die Syntax dieses Befehls falsch ist. Da soll eine Tabelle namens analyse angelegt werden, die eine Spalte namens 'rank' beinhaltet. Das geht schief, weil 'rank' ein Schlüsselwort in sql ist. rank() ist eine Funktion.
Das ist ungünstig designed, diese Tabelle.
Wenn man sowas machen will, dann muß das Schlüsselwort maskiert werden. In `Backticks` gepackt werden. Möglicherweise hat der DB-Programmierer das sogar berücksichtigt, aber for whatever reason wurden diese Backticks irgendwie verschluckt.
Als workaround kann man die Tabelle 'von Hand' anlegen. Als root:
Code
root@easyVDR:~# mysql epg2vdr
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 923
Server version: 8.0.31-0ubuntu0.20.04.2 (Ubuntu)
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show tables;
+-------------------+
| Tables_in_epg2vdr |
+-------------------+
| channelmap |
| components |
| episodes |
| events |
| fileref |
| imagerefs |
| images |
| messages |
| movie |
| movie_actor |
| movie_actors |
| movie_media |
| parameters |
| recordingdirs |
| recordinglist |
| searchtimers |
| series |
| series_actor |
| series_episode |
| series_media |
| snapshot |
| timers |
| timersdone |
| useevents |
| users |
| vdrs |
+-------------------+
26 rows in set (0,00 sec)
mysql> create table analyse(channelid VARCHAR(50), vdr_masterid INT(11) unsigned, vdr_eventid BIGINT(11) unsigned, vdr_starttime INT(10), vdr_duration INT(5), vdr_title VARCHAR(200), vdr_shorttext VARCHAR(300), ext_masterid INT(11) unsigned, ext_eventid BIGINT(11) unsigned, ext_starttime INT(10), ext_duration
INT(5), ext_title VARCHAR(200), ext_shorttext VARCHAR(300), ext_episode VARCHAR(1), ext_merge INT(11), ext_images VARCHAR(1), lvmin INT(3), `rank` INT(5), PRIMARY KEY(channelid DESC, vdr_eventid DESC)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
Query OK, 0 rows affected, 11 warnings (0,17 sec)
mysql> desc analyse
-> ;
+---------------+-----------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+-----------------+------+-----+---------+-------+
| channelid | varchar(50) | NO | PRI | NULL | |
| vdr_masterid | int unsigned | YES | MUL | NULL | |
| vdr_eventid | bigint unsigned | NO | PRI | NULL | |
| vdr_starttime | int | YES | | NULL | |
| vdr_duration | int | YES | | NULL | |
| vdr_title | varchar(200) | YES | | NULL | |
| vdr_shorttext | varchar(300) | YES | | NULL | |
| ext_masterid | int unsigned | YES | | NULL | |
| ext_eventid | bigint unsigned | YES | | NULL | |
| ext_starttime | int | YES | | NULL | |
| ext_duration | int | YES | | NULL | |
| ext_title | varchar(200) | YES | | NULL | |
| ext_shorttext | varchar(300) | YES | | NULL | |
| ext_episode | varchar(1) | YES | | NULL | |
| ext_merge | int | YES | | NULL | |
| ext_images | varchar(1) | YES | | NULL | |
| lvmin | int | YES | | NULL | |
| rank | int | YES | | NULL | |
+---------------+-----------------+------+-----+---------+-------+
18 rows in set (0,00 sec)
mysql> show tables;
+-------------------+
| Tables_in_epg2vdr |
+-------------------+
| analyse |
| channelmap |
| components |
| episodes |
| events |
| fileref |
| imagerefs |
| images |
| messages |
| movie |
| movie_actor |
| movie_actors |
| movie_media |
| parameters |
| recordingdirs |
| recordinglist |
| searchtimers |
| series |
| series_actor |
| series_episode |
| series_media |
| snapshot |
| timers |
| timersdone |
| useevents |
| users |
| vdrs |
+-------------------+
27 rows in set (0,00 sec)
Alles anzeigen
Grüße
Peter