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

Issue with table comment on TokuDB #196

Closed
sirber opened this Issue Mar 16, 2018 · 15 comments

Comments

Projects
None yet
2 participants
@sirber
Copy link

sirber commented Mar 16, 2018

Steps to reproduce this issue

  1. Add a comment on a tokudb table
  2. Save
  3. Reload table
  4. Then I get... [my comment]' compression='tokudb_zlib

Current behavior

compression= is added to the comment view in heidisql
screenshot from 2018-03-16 13-12-26

Expected behavior

only seeing my comment

Environment

  • HeidiSQL version:
    latest nightly
  • Database system and version:
    mariadb 10.1.x
  • Operating system:
    ubuntu 17.10 w/ wine
@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

ansgarbecker commented Mar 17, 2018

Weird. Please provide the result of SHOW CREATE TABLE push_sent here, so I can probably reproduce that.

@sirber

This comment has been minimized.

Copy link
Author

sirber commented Mar 17, 2018

heidi gives me:

CREATE TABLE push_sent (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'pour le datamart seulement',
push_notification_id INT(10) UNSIGNED NOT NULL,
mobile_app_token_id INT(10) UNSIGNED NOT NULL,
read_on DATETIME NULL DEFAULT NULL,
language ENUM('fr','en') NULL DEFAULT NULL,
PRIMARY KEY (id),
UNIQUE INDEX push_token_idx (mobile_app_token_id, push_notification_id),
INDEX push_sent_read_on_IDX (read_on) USING BTREE
)
COMMENT='calculated by importPush task' compression='tokudb_zlib'
COLLATE='latin1_swedish_ci'
ENGINE=TokuDB
AUTO_INCREMENT=1800253979

a create table would look like:
CREATE TABLE t_zlib (
x int(11) DEFAULT NULL,
y int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 compression=tokudb_zlib

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

ansgarbecker commented Jan 3, 2019

Sorry for the delay. I have just tested that on a MariaDB 10.0.25, while I don't have a tokudb server available. I guess the issue should be the same with an InnoDB table, but I can't reproduce that now.

Please re-check with the current Heidi build.

@sirber

This comment has been minimized.

Copy link
Author

sirber commented Jan 3, 2019

HeidiSQL: 9.5.0.5382

Percona MySLQ 5.6.x

CREATE TABLE `push_sent` (
	`push_notification_id` INT(10) UNSIGNED NOT NULL,
	`mobile_app_token_id` INT(10) UNSIGNED NOT NULL,
	`read_on` DATETIME NULL DEFAULT NULL,
	`language` ENUM('fr','en') NULL DEFAULT NULL,
	UNIQUE INDEX `push_token_idx` (`mobile_app_token_id`, `push_notification_id`),
	INDEX `push_sent_read_on_IDX` (`read_on`) USING BTREE
)
COMMENT='calculated by importPush task'
COLLATE='latin1_swedish_ci'
ENGINE=TokuDB
ROW_FORMAT=
;

MariaDB 10.0.x:

CREATE TABLE `push_sent` (
	`push_notification_id` INT(10) UNSIGNED NOT NULL,
	`mobile_app_token_id` INT(10) UNSIGNED NOT NULL,
	`read_on` DATETIME NULL DEFAULT NULL,
	`language` ENUM('fr','en') NULL DEFAULT NULL,
	UNIQUE INDEX `push_token_idx` (`mobile_app_token_id`, `push_notification_id`),
	INDEX `push_sent_read_on_IDX` (`read_on`) USING BTREE
)
COMMENT='calculated by importPush task\' `compression`=\'tokudb_zlib'
COLLATE='latin1_swedish_ci'
ENGINE=TokuDB
;
@sirber

This comment has been minimized.

Copy link
Author

sirber commented Jan 3, 2019

"compression" is not handled, while "row_format" is.

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

ansgarbecker commented Jan 3, 2019

Hm, I don't know where you got the MariaDB command from, but it has escaped quotes ' which are normally part of the string itself. So the "compression=..." is part of the comment. Maybe you already overwrote that table?

@sirber

This comment has been minimized.

Copy link
Author

sirber commented Jan 3, 2019

ALTER TABLE `push_sent`
	COMMENT='calculated by importPush task';

comment back at "calculated by importPush task' compression='tokudb_zlib" in heidisql.

@sirber

This comment has been minimized.

Copy link
Author

sirber commented Jan 3, 2019

You need a linux server to be able to use tokudb. it doesn't work on windows (nor in windows linux subsystem).

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

ansgarbecker commented Jan 3, 2019

When you fire SHOW TABLE STATUS LIKE 'push_sent', does the "Comment" contain the compression clause?

I have no TokuDB, and am not able to set up one, so I will need your exact input here.

@sirber

This comment has been minimized.

Copy link
Author

sirber commented Jan 3, 2019

"Name"	"Engine"	"Version"	"Row_format"	"Rows"	"Avg_row_length"	"Data_length"	"Max_data_length"	"Index_length"	"Data_free"	"Auto_increment"	"Create_time"	"Update_time"	"Check_time"	"Collation"	"Checksum"	"Create_options"	"Comment"
"push_sent"	"TokuDB"	"10"	"Fixed"	"274828"	"18"	"4946904"	"9223372036854775807"	"1747608"	"18446744073705728004"	NULL	"2019-01-03 13:31:31"	"2019-01-03 13:31:42"	NULL	"latin1_swedish_ci"	NULL	"`compression`='tokudb_zlib'"	"calculated by importPush task"

comment is clean

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

ansgarbecker commented Jan 3, 2019

I have the impression that SHOW CREATE TABLE includes that compression= clause in the COMMENT=... clause, while SHOW TABLE STATUS does not do that. Your above CREATE query from MariaDB says so. If you could verify that once again, I would try to fix that by auto-removing the compression clause from the comment clause.

@sirber

This comment has been minimized.

Copy link
Author

sirber commented Jan 3, 2019

if I go by commandline:

| push_sent | CREATE TABLE `push_sent` (
  `push_notification_id` int(10) unsigned NOT NULL,
  `mobile_app_token_id` int(10) unsigned NOT NULL,
  `read_on` datetime DEFAULT NULL,
  `language` enum('fr','en') DEFAULT NULL,
  UNIQUE KEY `push_token_idx` (`mobile_app_token_id`,`push_notification_id`),
  KEY `push_sent_read_on_IDX` (`read_on`) USING BTREE
) ENGINE=TokuDB DEFAULT CHARSET=latin1 COMMENT='calculated by importPush task' `compression`='tokudb_zlib' |

looks like a parse error by HeidiSQL.

in my previous post
"Create_options" = "compression='tokudb_zlib'"
"Comment" = "calculated by importPush task"

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

ansgarbecker commented Jan 3, 2019

Yes, that's quite inconsistent.

I guess I need to set up a server myself, or access that by myself, so I can analyze that.

@sirber

This comment has been minimized.

Copy link
Author

sirber commented Jan 3, 2019

I don't see the inconsistence since the SHOW CREATE TABLE and SHOW TABLE STATUS shows that the 'compression' flag is not in the comment section.

ansgarbecker added a commit that referenced this issue Mar 10, 2019

Issue #196: Prefer to take comment from SHOW TABLE STATUS result, to …
…support single quotes without including some "compression" option on TokuDB
@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

ansgarbecker commented Mar 10, 2019

This compression clause should be out of the comment in the next HeidiSQL build. Reason was a loose .* in a regular expression, going over the closing single quote of the table comment, up to the closing single quote for "compression".

I only don't have a field for editing create options like that "compression" clause. Probably because it's a rare case and noone asked for it yet. I have to create such a field, and I suppose it can contain other strings apart from "compression", so it may be a good idea to just have plain text in it. Please file another issue if you'd like to see these create options in a new field.

@ansgarbecker ansgarbecker added bug and removed needs-info labels Mar 10, 2019

@ansgarbecker ansgarbecker added this to the v10.2 milestone Mar 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.