Skip to content

Designer page save fails if dB name contains period. #14945

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

Closed
cj1067b opened this issue Feb 9, 2019 · 5 comments
Closed

Designer page save fails if dB name contains period. #14945

cj1067b opened this issue Feb 9, 2019 · 5 comments
Assignees
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Milestone

Comments

@cj1067b
Copy link

cj1067b commented Feb 9, 2019

Ver 4.8.5, repeatable
Open database with a period in the name
Ex beta.testdb

When saving page from designer, an error box opens "insert into phpmyadmin.pma__table_coords..."

Viewing the pma_table_coords, phpmyadmin saved the part of the database name before the period, in the case above "beta" into the db_name column, which I believe should be the full database name, and the part after the period, "testdb" as the table name.

@marcus-hiles
Copy link

Hi @cj1067b, could you please provide some snap to aid in reproducing this, thanks?

@cj1067b
Copy link
Author

cj1067b commented Mar 1, 2019

I'm not seeing an option to attach snaps. I'm writing this with Firefox on Android.

create a database "test.db"
Create table 1, with an ID field primary.
Create table 2, with a table1_id column, indexed.

Go to the designer, show both tables and create a relationship between ID in table 1 and table1_id column in table2.
As soon as I created this, the designer blanked. If I show the 2 tables in designer again, it does not show the relationship. If you try to create the relationship again, it says "error: relationship already exists".
Try to save the designer page
Then view the pma__table__coords in the phpmyadmin database.
It will show, just 1 row,
"test" in the "db_name" column
"db" in the "table_name" column.

It should show 2 rows with "test.db" in the db_name column, and table1/table2 in the "table_name" column on separate rows.

Now if you try this again, but in a database called testdb, no period, it works as it should.

@williamdes
Copy link
Member

Reproduced some of the issue on demo server (root, no password)

@williamdes williamdes added the Bug A problem or regression with an existing feature label Mar 1, 2019
@Bournvita1998
Copy link
Contributor

@williamdes @shucon @ibennetch Can you still reproduce this?

Selection_068

Here I created a database first.second with 2 tables(table1, table2). After creating the relation as suggested above, everything is fine here. I didn't observe any of the changes as mentioned here.

@ibennetch
Copy link
Member

INSERT INTO `phpmyadmin`.`pma__table_coords` (`db_name`, `table_name`, `pdf_page_number`, `x`, `y`) VALUES ('data', 'base', '11', '384', '25')

Indeed I can reproduce this.

Once you create a database with a dot in the name (data.base in my test, but your first.second should also be fine), click the "Save page as" or "Save page" links from the expanding menu on the left, like so:

image

Does that help?

@williamdes williamdes added the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label Aug 17, 2019
@williamdes williamdes added this to the 4.9.1 milestone Aug 23, 2019
@williamdes williamdes self-assigned this Aug 23, 2019
williamdes added a commit that referenced this issue Aug 23, 2019
Reference: a23f2ba
[ci skip]

Signed-off-by: William Desportes <williamdes@wdes.fr>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants