New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import of table with virtual col (exported with phpMyAdmin) is impossible #13647

Closed
mtournay opened this Issue Sep 5, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@mtournay

mtournay commented Sep 5, 2017

Steps to reproduce

  1. Create a datatable with virtual column, calculated from other column (something like CONCAT(firstName, ' ', lastName))
  2. populate
  3. export table
  4. truncate table
  5. import table

Expected behaviour

import should complete

Actual behaviour

import does'nt start : import data into virtual col is forbid !

Server configuration

Operating system:
win10 x64 creator update

Web server:
apache 2.4.23

Database:
mySQL 5.7.14

PHP version:
5.6.25

phpMyAdmin version:
4.7.4

Client configuration

Browser:
FF 55.0.3 32b

Operating system:
win10 x64 creator update

@nijel

This comment has been minimized.

Show comment
Hide comment
@nijel

nijel Sep 5, 2017

Member

Well the export should not contain generated columns, for phpMyAdmin this has been fixed in #12221. What did you use to generate the export?

Member

nijel commented Sep 5, 2017

Well the export should not contain generated columns, for phpMyAdmin this has been fixed in #12221. What did you use to generate the export?

@nijel nijel self-assigned this Sep 5, 2017

@nijel nijel added the question label Sep 5, 2017

@mtournay

This comment has been minimized.

Show comment
Hide comment
@mtournay

mtournay Sep 5, 2017

Ok I use phpMyAdmin v 4.7.3 on prod (4.7.4 on my dev machine). I thought I have same version on both system.
I select a database, go to export tab, left 'quick export' checked and click on 'execute' button. (I use a french localised version of phpmyadmin, I may not use the good word) -> virtual col is in the export

here is the result :

CREATE TABLE `eleves` (
  `idEleve` int(11) NOT NULL,
  `nom` varchar(50) NOT NULL,
  `prenom` varchar(50) NOT NULL,
  `nomPrenomEleve` varchar(100) AS (concat(`nom`,' ',`prenom`)) VIRTUAL,
  `fk_genre` int(11) DEFAULT NULL,
  `dateNaissance` date DEFAULT NULL,
  `adulte` tinyint(1) NOT NULL DEFAULT '0',
  `dateCreation` date DEFAULT NULL,
  `dateInscription` date DEFAULT NULL,
  `dateAbandon` date DEFAULT NULL,
  `telephoneMobile` varchar(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Déchargement des données de la table `eleves`
--

INSERT INTO `eleves` (`idEleve`, `nom`, `prenom`, `nomPrenomEleve`, `fk_genre`, `dateNaissance`, `adulte`, `dateCreation`, `dateInscription`, `dateAbandon`, `telephoneMobile`) VALUES
(1, 'LITHARD', 'Chloé', 'LITHARD Chloé', 1, '2005-04-03', 0, '2016-06-21', '2010-06-01', NULL, ''),
(3, 'MAIGNAL', 'Salomé', 'MAIGNAL Salomé', 1, '2003-10-02', 0, '2016-06-08', '2010-06-01', NULL, ''),
(5, 'MAIGNAL', 'Eliott', 'MAIGNAL Eliott', 2, '2006-05-27', 0, '2016-06-08', '2010-06-01', NULL, ''),
(7, 'GAUTHIER', 'Antoine', 'GAUTHIER Antoine', 2, '2006-05-18', 0, '2016-06-05', '2010-06-01', NULL, ''),

mtournay commented Sep 5, 2017

Ok I use phpMyAdmin v 4.7.3 on prod (4.7.4 on my dev machine). I thought I have same version on both system.
I select a database, go to export tab, left 'quick export' checked and click on 'execute' button. (I use a french localised version of phpmyadmin, I may not use the good word) -> virtual col is in the export

here is the result :

CREATE TABLE `eleves` (
  `idEleve` int(11) NOT NULL,
  `nom` varchar(50) NOT NULL,
  `prenom` varchar(50) NOT NULL,
  `nomPrenomEleve` varchar(100) AS (concat(`nom`,' ',`prenom`)) VIRTUAL,
  `fk_genre` int(11) DEFAULT NULL,
  `dateNaissance` date DEFAULT NULL,
  `adulte` tinyint(1) NOT NULL DEFAULT '0',
  `dateCreation` date DEFAULT NULL,
  `dateInscription` date DEFAULT NULL,
  `dateAbandon` date DEFAULT NULL,
  `telephoneMobile` varchar(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Déchargement des données de la table `eleves`
--

INSERT INTO `eleves` (`idEleve`, `nom`, `prenom`, `nomPrenomEleve`, `fk_genre`, `dateNaissance`, `adulte`, `dateCreation`, `dateInscription`, `dateAbandon`, `telephoneMobile`) VALUES
(1, 'LITHARD', 'Chloé', 'LITHARD Chloé', 1, '2005-04-03', 0, '2016-06-21', '2010-06-01', NULL, ''),
(3, 'MAIGNAL', 'Salomé', 'MAIGNAL Salomé', 1, '2003-10-02', 0, '2016-06-08', '2010-06-01', NULL, ''),
(5, 'MAIGNAL', 'Eliott', 'MAIGNAL Eliott', 2, '2006-05-27', 0, '2016-06-08', '2010-06-01', NULL, ''),
(7, 'GAUTHIER', 'Antoine', 'GAUTHIER Antoine', 2, '2006-05-18', 0, '2016-06-05', '2010-06-01', NULL, ''),
@nijel

This comment has been minimized.

Show comment
Hide comment
@nijel

nijel Sep 5, 2017

Member

Thanks for the test data, apparently the export is still broken in 4.7...

Member

nijel commented Sep 5, 2017

Thanks for the test data, apparently the export is still broken in 4.7...

@nijel nijel added bug and removed question labels Sep 5, 2017

@nijel nijel added this to the 4.7.5 milestone Sep 5, 2017

@nijel nijel closed this in 75728ab Sep 5, 2017

@mtournay

This comment has been minimized.

Show comment
Hide comment
@mtournay

mtournay Sep 5, 2017

You're welcome, content to help

mtournay commented Sep 5, 2017

You're welcome, content to help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment