I forgot:
MariaDB [(none)]> show create database kallithea;
+-----------+-------------------------------------------------------------------------------------+
| Database | Create Database
|
+-----------+-------------------------------------------------------------------------------------+
| kallithea | CREATE DATABASE `kallithea` /*!40100 DEFAULT CHARACTER SET utf8
COLLATE utf8_bin */ |
+-----------+-------------------------------------------------------------------------------------+
For table ’users’:
MariaDB [kallithea]> show create table users;
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table
|
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| users | CREATE TABLE `users` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
`active` tinyint(1) DEFAULT NULL,
`admin` tinyint(1) DEFAULT NULL,
`firstname` varchar(255) DEFAULT NULL,
`lastname` varchar(255) DEFAULT NULL,
`email` varchar(255) DEFAULT NULL,
`last_login` datetime DEFAULT NULL,
`extern_type` varchar(255) DEFAULT NULL,
`extern_name` varchar(255) DEFAULT NULL,
`api_key` varchar(255) DEFAULT NULL,
`inherit_default_permissions` tinyint(1) NOT NULL,
`created_on` datetime NOT NULL,
`user_data` blob,
PRIMARY KEY (`user_id`),
UNIQUE KEY `user_id` (`user_id`),
UNIQUE KEY `username` (`username`),
UNIQUE KEY `email` (`email`),
KEY `u_username_idx` (`username`),
KEY `u_email_idx` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
The rest of the tables are created likewise – with DEFAULT CHARSET=utf8.
[mail_logo]<http://www.dbc.dk/>
Med venlig hilsen
Lars Skjærlund
DevOps
Tlf.: 44 86 77 77
DBC as
www.dbc.dk<http://www.dbc.dk/>
[email protected]<mailto:[email protected]>
Fra: Mads Kiilerich [mailto:[email protected]]
Sendt: 18. november 2015 21:15
Til: Lars Skjærlund <[email protected]>; [email protected]
Emne: Re: SV: Bug in MySQL code?
On 11/18/2015 09:52 AM, Lars Skjærlund wrote:
Hi Mads,
Ø When debugging the problem, it might be simpler to let Kallithea create a
new database and focus on whether it can store and read unicode.
That’s what I did before reporting the bug: Kallithea does _not_ store data in
Unicode format – and if you add new data to the database in Unicode, Kallithea
breaks.
If I open the MySQL client and do, say, “update users set lastname =
‘Skjærlund’ where firstname = ‘Lars’”, then Kallithea breaks because the MySQL
client adds data in Unicode.
If the above command is to work, I have to type “update users set lastname =
‘Skjærlund’ where firstname = ‘Lars’”. In that case Kallithea survives – and
it displays my name correctly in the UI.
I'm just saying that I am very sure it works for other users of Kallithea on
MySQL. It must thus be something in your environment.
Especially, I know that it works perfectly for us with PostgreSQL. All
databases are handled by sqlalchemy. There might of course be bugs in the
database specific parts of sqlalchemy but it is quite unlikely they will go
unnoticed.
If you explain what OS you are using and exactly how your mysql and kallithea
and web server environment has been set up, someone might spot what is wrong.
/Mads
_______________________________________________
kallithea-general mailing list
[email protected]
http://lists.sfconservancy.org/mailman/listinfo/kallithea-general