ERROR 1060 (42S21): Duplicate column name 'info'

10 posts / 0 new
Last post
JE8VZK
ERROR 1060 (42S21): Duplicate column name 'info'

The middle of last Dec., I found that my CQRlog did not export , or etc to adif.(Also Ubuntu 18.04.3)
I decide to install Ubuntu 18.04.3 into an another SSD.
On the new SSD, I installed CQRlog 2.4.0.1 deb.
Now in the QSOlist, I have lost "Comment to QSO" column.
And when I search by DXCC, I input e.x. 5B, the error occurred.
TMySQL57Connection: Error executing query: Unknown column 'dxcc_ref' in 'where clause'.

Then I tried according to https://www.cqrlog.com/node/2340
------------------
$ mysql -S ~/.config/cqrlog/database/sock
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.1.43-MariaDB-0ubuntu0.18.04.1 Ubuntu 18.04

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 [(none)]> use cqrlog001;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [cqrlog001]> alter table freqmem add info varchar(25) null;
ERROR 1060 (42S21): Duplicate column name 'info'
MariaDB [cqrlog001]>
--------------------
How must I coorect "Duplicate column name 'info'" ?

Former SSD has in /home/NAME/.config/cqrlog/database/mysql.err:
2019-12-30T02:08:59.668280Z 0 [Warning] Can't open and lock time zone table: Table 'mysql.time_zone_leap_second' doesn't exist trying to live without them
2019-12-30T02:08:59.668321Z 0 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist

oh1kh
ERROR 1060 (42S21): Duplicate column name 'info'

Hi!

If you installed new version of cqrlog it makes database upgrades if needed.
So look mysql:

show columns from freqmem;

You should see that there is already "info" column and that is what error text tries to say when you try to add column "info" with "alter" command.

If "comments to qso" is lost look at:
preferences/visible columns
Is comments to qso checked there?

Unfortunately it shows out in "qso list" column with its database column name "remarks" that may be confusing.
If "remarks" column does not show up when preferences/visible coluns/commants to qso is checked look if it does not fit to window, or is so narrow that it does not show out.
You can alter column widths in "qso list" window if you put mouse on border of 2 columns (on column name line) push left mouse button and drag border line.

DXCC search with filter has bug. Thanks for reporting! I will check it.

--
Saku
OH1KH

oh1kh
ERROR 1060 (42S21): Duplicate column name 'info'

Addition:

You can also select "auto column width" for "qso list". Columns will be adjusted on next list update by longest text in column.
When button is blue it is enabled, when red it is disabled. (see picture)
Keep it disabled if you like manually drag column widths with mouse.

You can also change column order if you set mouse in middle of column name, press mouse left and drag column to another place.

File: 

--
Saku
OH1KH

JE8VZK
Kiitoksia Saku,

Kiitoksia Saku,

The column "remarks", I have not checked, sorry.

I run with "show columns from freqmem;", and no errors in the terminal,
5 rows in set (0.00 sec)

MariaDB [cqrlog001]> quit;
Bye

When searching with DXCC with a filter, the previous error still appears. And mentioned tags are not exported to adif output.
One concern is the current error log:

2020-01-02 21:45:04 140571656146048 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.1.43-MariaDB-0ubuntu0.18.04.1' socket: '/home/NAME/.config/cqrlog/database/sock' port: 64000 Ubuntu 18.04
2020-01-02 21:45:05 7fd963957700 InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
2020-01-02 22:26:42 140571609356032 [Note] /usr/sbin/mysqld: Normal shutdown
2020-01-02 22:26:42 140571037390592 [Note] InnoDB: FTS optimize thread exiting.
2020-01-02 22:26:42 140571609356032 [Note] InnoDB: Starting shutdown...

I do not understand why here with "innoDB".
(Time stamp is JA = UTC + 9h)

oh1kh
ERROR 1060 (42S21): Duplicate column name 'info'

>The column "remarks", I have not checked, sorry.

I think it works. As I said the column name "remarks" is confusing because NewQso window talks about "Comments for QSO"

>I run with "show columns from freqmem;", and no errors in the terminal,

And one of the lines shows that "info" colum is there ready:
| info | varchar(25) | YES | | NULL | |
That is OK!

>When searching with DXCC with a filter, the previous error still appears.

It needs program fix. I have done pull request but it is not accepted, yet. https://github.com/ok2cqr/cqrlog/pull/238

>And mentioned tags are not exported to adif output.

What does this mean? DXCC, or Commet to qso ?

ADIF export from CQRLOG for Linux version 2.4.0 (105)
Copyright (C) 2020 by Petr, OK7AN and Martin, OK1RR

Internet: http://www.cqrlog.com

<ADIF_VER:5>3.1.0
<CREATED_TIMESTAMP:15>20200106 093655
<PROGRAMID:6>CQRLOG
<PROGRAMVERSION:11>2.4.0 (105)
<EOH>
<CALL:5>OH1AF<FREQ:3>3.5<BAND:3>80M<APP_CQRLOG_DXCC:2>OH<DXCC:3>224<COMMENT:6>fi0017
<EOR>


Here you see two DXCC tags. Cqrlog's own that shows the prefix string and official that shows number.NewQSO/"Comment to QSO" is tag "Comment"

>One concern is the current error log:
>2020-01-02 21:45:05 7fd963957700 InnoDB: Error: Table "mysql"."innodb_table_stats" not found.

Does cqrlog still work, or not? If it works ok just use it.
If not try to find help from google:
https://www.google.fi/search?q=Table+mysql.innodb_table_stats+not+found.

>I do not understand why here with "innoDB".
>(Time stamp is JA = UTC + 9h)

Lines that you see on cqrlog debug about mysql have same date stamp as your computer uses.
For me it shows UTC+2 as PC clock shows Finnish local time.
Logging of qso is done with UTC.

--
Saku
OH1KH

JE8VZK
InnoDB: Error: Table "mysql"."innodb_table_stats" not found.

How do I create the table mysql.innodb_table_stats ?

JE8VZK
Newly today I installed

Newly today I installed Ubuntu 18.04.3 on another SSD.
And this time I installed CQRlog from ppa.
Then, the search entered in the DXCC box no longer gives a TMySQL ~ error.
I am sorry that I did not notice the error of Ubuntu itself.
The only version displayed is 2.4.0 (001), not (005).

However, State and County are not output to adif.
And the adif version is still 2.2.1.
$ mysql -S ~ / .config / cqrlog / database / sock is not running.
There is no ERROR in /database/mysql.err now, but there are some warnings and lots of notes.
I do not mind Adif version, but I want to export State and Country.
Is there a way?

ADIF export from CQRLOG for Linux version 2.4.0 (001)
Copyright (C) 2020 by Petr, OK7AN and Martin, OK1RR

Internet: http://www.cqrlog.com

<ADIF_VER:5>2.2.1
<PROGRAMID:6>CQRLOG
<PROGRAMVERSION:11>2.4.0 (001)
<EOH>
<QSO_DATE:8>20200106<TIME_ON:4>1550<CALL:6>RU20NY<MODE:3>FT8<FREQ:6>7.0751<BAND:3>40M<RST_SENT:5>-05dB<RST_RCVD:5>-06dB
<EOR>

File: 

JE8VZK
correction

>export State and Country.

export State and County.

oh1kh
adif export state, county

Hi !

It seems that you have found another bug. Thanks !

If you select all for adif export then there is County and State exported. Also if you select some other information (I tried add also power,Award,Comment to qso) then Count and State is exported.

But they are exported ONLY if they have content in al cases. Empty ones are not exported. That is not a bug.

Instead HTML export works if you just select Call, Count,State.

So now I have to find where is the difference in selection source between adif and html and fix the bug.

--
Saku
OH1KH

oh1kh
adif export state, county

HI!
I think I found the bug.

If you select DXCC to be exported as ADIF then you can select quite many others too. The key is that DXCC must be selcted.
Then there is "Notes to callsign" tag called "Note". It is always exported (if it has contents) no matter what the checkbox says.

HTML export works better.

I have made pull request to fix these.

--
Saku
OH1KH