Skip to content
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

Broken table data export #26

Open
Jancis opened this issue Oct 15, 2018 · 1 comment
Open

Broken table data export #26

Jancis opened this issue Oct 15, 2018 · 1 comment

Comments

@Jancis
Copy link
Contributor

Jancis commented Oct 15, 2018

Exporting data even without any parameters breaks sql dump. It shows the table structure, but when the data should be returned, process stops with no errors.

  KEY `user_field__created` (`created`),
  KEY `user_field__access` (`access`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='The data table for user entities.';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `users_field_data`
--

LOCK TABLES `users_field_data` WRITE;
/*!40000 ALTER TABLE `users_field_data` DISABLE KEYS */;
SET autocommit=0;
 [error]  Database dump failed 
 [error]  Unable to dump database. Rerun with --debug to see any error message. 

And adding a --debug does not reveal anything.

What I found out, it breaks here

$columnTypes = $this->tableColumnTypes()[$tableName];

And it's because ifsnop/mysqldump-php#141 was never accepted and so the new solution using hooks was not implemented. Also, I have a situation where I can't edit project's json file to add patches and just using composer require does not apply patches (137 to be specific).

My proposal is adding a check on $this->gdprExpressions[$tableName] before invoking $this->tableColumnTypes()[$tableName]. See PR here: #27

@ApeHanger
Copy link

Hello Jancis,

that doesn't fix the "null pointer". A solution could be a hack using reflection in the constructor to get access to parents private tableColumnTypes field via a getter in the subclass.

regards
ApeHanger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants