Could not mark QSO as uploaded

9 posts / 0 new
Last post
OY1R
Could not mark QSO as uploaded

every time i log a qso, cqrlog starts uploading qsos that have been uploaded before. starts at same qso.

i tried to "mark all qso's as uploaded" but then i get an error >
"Could not mark QSO as uploaded:TMySQL57Connection : Error executing query: Data too long for column 'cmd' at row 1"

running cqrlog 2.3.0 (001) and linux mint 19.1

de OY1R

oh1kh
Could not mark QSO as uploaded

--
Saku
OH1KH

OY1R
I Have no long notes, it is

I Have no long notes, it is empty.

Regin
OY1R

oh1kh
I Have no long notes, it is

Hi!

It is not question of long notes. it is the text in field 'cmd'.
Start cqrlog from console as:
cqrlog debug=1 > /tmp/debug.txt

Do thing that causes this error. After cqrlog has stopped try to find this text (source code follows, look bold part of it):

dLogUpload.pas: Q.SQL.Text := 'insert into log_changes (cmd) values('+QuotedStr(C_ALLDONE)+')';
dLogUpload.pas: Q.SQL.Text := 'insert into log_changes (cmd) values('+QuotedStr(LogName+'DONE')+')';

Easy way to find it is using console command:
grep "insert into log_changes (cmd) values" /tmp/debug.txt

Look what comes after word "values" (in parenthesis) it may not be longer than 10 characters. If it is, try to figure out where it is coming from your log data and clean it. Could it be your log name + DONE that exceeds 10 characters ?

What I tried to point out from https://www.cqrlog.com/node/2008 is that you can make field "cmd" bigger than 10 characters:
----
Making it little longer could be done from sql console with:

ALTER TABLE log_changes MODIFY cmd VARCHAR(20);

This should not make any harm when column gets bigger. If it gets smaller it may cut some data.
--------

Just make backup of your ~/.config/cqrlog folder before trying that !

--
Saku
OH1KH

OY1R
reggy@reggy-asus:~$ mysql -S

reggy@reggy-asus:~$ mysql -S /home/reggy/.config/cqrlog/database/sock
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.7.25-0ubuntu0.18.04.2 (Ubuntu)

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

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> cqrlog001
-> ALTER TABLE log_changes MODIFY cmd VARCHAR(20);
ERROR 1064 (42000): 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 'cqrlog001
ALTER TABLE log_changes MODIFY cmd VARCHAR(20)' at line 1
mysql>

Still not working

Regin OY1R

DL2KI
Hello,

Hello,

is there a detailed guide to the matter? I am not a database specialist.

Where do I enter the line "ALTER TABLE log_changes MODIFY cmd VARCHAR(20);".

73, Wolfgang

oh1kh
Hello,

Hi!

First of all: Do backup your ~/.config/cqrlog directory with all files and sub folders before trying following.

If you use "save log data to local machine" then open first cqrlog select log you want to change (if several logs).
Note the log number when opening it.
Then open console and give commands as follows (bold). You need log number in first command !

[saku@hamtpad ~]$ mysql --socket ~/.config/cqrlog/database/sock cqrlog006
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 MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 15
Server version: 10.2.22-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [cqrlog006]> show columns from log_changes;
+----------------+---------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------------+---------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| id_cqrlog_main | int(11) | YES | MUL | NULL | |
| cmd | varchar(10) | NO | | NULL | |
| qsodate | date | YES | | NULL | |
| time_on | varchar(5) | YES | | NULL | |
| callsign | varchar(20) | YES | | NULL | |
| mode | varchar(12) | YES | | NULL | |
| band | varchar(6) | YES | | NULL | |
| freq | decimal(10,4) | YES | | NULL | |
| old_qsodate | date | YES | | NULL | |
| old_time_on | varchar(5) | YES | | NULL | |
| old_callsign | varchar(20) | YES | | NULL | |
| old_mode | varchar(12) | YES | | NULL | |
| old_band | varchar(6) | YES | | NULL | |
| old_freq | decimal(10,4) | YES | | NULL | |
| upddeleted | int(1) | YES | | 1 | |
+----------------+---------------+------+-----+---------+----------------+
16 rows in set (0.01 sec)

MariaDB [cqrlog006]> ALTER TABLE log_changes MODIFY cmd VARCHAR(20);
Query OK, 1 row affected (0.01 sec)
Records: 1 Duplicates: 0 Warnings: 0

MariaDB [cqrlog006]> show columns from log_changes;
+----------------+---------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------------+---------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| id_cqrlog_main | int(11) | YES | MUL | NULL | |
| cmd | varchar(20) | YES | | NULL | |
| qsodate | date | YES | | NULL | |
| time_on | varchar(5) | YES | | NULL | |
| callsign | varchar(20) | YES | | NULL | |
| mode | varchar(12) | YES | | NULL | |
| band | varchar(6) | YES | | NULL | |
| freq | decimal(10,4) | YES | | NULL | |
| old_qsodate | date | YES | | NULL | |
| old_time_on | varchar(5) | YES | | NULL | |
| old_callsign | varchar(20) | YES | | NULL | |
| old_mode | varchar(12) | YES | | NULL | |
| old_band | varchar(6) | YES | | NULL | |
| old_freq | decimal(10,4) | YES | | NULL | |
| upddeleted | int(1) | YES | | 1 | |
+----------------+---------------+------+-----+---------+----------------+
16 rows in set (0.01 sec)

MariaDB [cqrlog006]> quit
Bye
[saku@hamtpad ~]$

Making column bigger should not destroy any data. Making it smaller may do so if there is a long entry in that data.

--
Saku
OH1KH

DL2KI
Hi Saku,

Hi Saku,

thank you for the manual. I was able to do something with it and the bug is now fixed.

73, Wolfgang

OY1R
Superbe support.

Cqrlog is once again up and running.

Thanks.

73, Regin