Bug 264392 - Error while importing database with text primary key
Summary: Error while importing database with text primary key
Status: CONFIRMED
Alias: None
Product: KEXI
Classification: Applications
Component: Migration/Import/Export (show other bugs)
Version: 2.6.4
Platform: Compiled Sources Linux
: NOR minor
Target Milestone: ---
Assignee: Kexi Bugs
URL:
Keywords:
Depends on: 277435
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-27 01:05 UTC by Julien Tattevin
Modified: 2021-03-09 23:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Import debug output (6.79 KB, text/plain)
2011-01-30 03:16 UTC, Julien Tattevin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Tattevin 2011-01-27 01:05:03 UTC
Version:           2.4 alpha1 (Calligra 2.4 alpha1) (using KDE 4.6.0) 
OS:                Linux

While trying to import a databse created by this file :
http://svn.eathena.ws/svn/ea/trunk/sql-files/main.sql

I get the following message (for table global_reg_value) :
BLOB/TEXT column 'str' used in key specification without a key length

Reproducible: Always

Steps to Reproduce:
Install this script and try to import it

Actual Results:  
It stop just before global_reg_value. Even if i put a size for str in the key.


(Same situation that in https://bugs.kde.org/show_bug.cgi?id=264101)

I was doing a full migration, from mysqld  Ver 5mysqld  Ver 5.1.37-1ubuntu5.4
for debian-linux-gnu on i486 ((Ubuntu)).1.37-1ubuntu5.4 for debian-linux-gnu on
i486 ((Ubuntu))
to mysqld  Ver 5.1.49-1ubuntu8.1 for debian-linux-gnu on x86_64
((Ubuntu))mysqld  Ver 5.1.49-1ubuntu8.1 for debian-linux-gnu on x86_64
((Ubuntu))


And i'm not sure of if it is a real bug or a new feature, i put it in minor bug.
Comment 1 Adam Pigg 2011-01-28 18:28:10 UTC
Can you paste the debug output?
Comment 2 Julien Tattevin 2011-01-30 03:16:27 UTC
Created attachment 56644 [details]
Import debug output

Trying to import a table created with :

CREATE TABLE IF NOT EXISTS `global_reg_value` (
  `char_id` int(11) unsigned NOT NULL DEFAULT '0',
  `str` varchar(255) NOT NULL DEFAULT '',
  `account_id` int(11) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`char_id`,`str`,`account_id`),
  KEY `account_id` (`account_id`),
  KEY `char_id` (`char_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Comment 3 Julien Tattevin 2011-01-30 03:20:22 UTC
The problem seem to be that it convert the varchar(255) to LONGTEXT

The generated sql is :
CREATE TABLE global_reg_value (char_id INT UNSIGNED PRIMARY KEY, str LONGTEXT PRIMARY KEY, account_id INT UNSIGNED PRIMARY KEY)


(Which also bring another sql error with multiple key table)
Comment 4 Jarosław Staniek 2011-07-17 22:26:34 UTC
Depends on https://bugs.kde.org/show_bug.cgi?id=277435
Comment 5 Justin Zobel 2021-03-09 23:43:30 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.