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

Plugin version numbers can be unexpectedly truncated #3809

Closed
YongBoLiu opened this issue Sep 17, 2020 · 3 comments
Closed

Plugin version numbers can be unexpectedly truncated #3809

YongBoLiu opened this issue Sep 17, 2020 · 3 comments
Labels
bug Undesired behaviour resolved A fixed issue
Milestone

Comments

@YongBoLiu
Copy link
Contributor

Describe the bug

Set the version to 10.2.0.12 in the plugins/xxx/INFO, Check the Console->Plugins screen, it show as 10.2.0.1.

To Reproduce

Steps to reproduce the behavior:

  1. For a plugin xxx, set the version to 10.2.0.12 in the plugins/xxx/INFO

  2. Got to Console->Plugins.

  3. Check the version of the plugin xxx. The version number is cut to 10.2.0.1.

Expected behavior

The version number should be the same as set in the INFO file. 10.2.0.12

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information)

  • OS: [e.g. iOS]
    Linux
  • Browser [e.g. chrome, safari]
    Firefox
  • Version [e.g. 22]

Smartphone (please complete the following information)

  • Device: [e.g. iPhone6]

  • OS: [e.g. iOS8.1]

  • Browser [e.g. stock browser, safari]

  • Version [e.g. 22]

Additional context

Add any other context about the problem here.

In plugin_config schema, version varchar(8) is too small, we'd set it to varchar(16), I think.

MariaDB [cacti]> desc  plugin_config;
+-----------+-----------------------+------+-----+---------+----------------+
| Field     | Type                  | Null | Key | Default | Extra          |
+-----------+-----------------------+------+-----+---------+----------------+
| id        | mediumint(8) unsigned | NO   | PRI | NULL    | auto_increment |
| directory | varchar(32)           | NO   | MUL |         |                |
| name      | varchar(64)           | NO   |     |         |                |
| status    | tinyint(2)            | NO   | MUL | 0       |                |
| author    | varchar(64)           | NO   |     |         |                |
| webpage   | varchar(255)          | NO   |     |         |                |
| version   | varchar(8)            | NO   |     |         |                |
+-----------+-----------------------+------+-----+---------+----------------+
7 rows in set (0.00 sec)
MariaDB [cacti]> UPDATE plugin_config SET version='10.2.0.11' WHERE directory IN ('xxx');
Query OK, 0 rows affected, 1 warning (0.00 sec)
Rows matched: 1  Changed: 0  Warnings: 1

MariaDB [cacti]> show Warnings;
+---------+------+----------------------------------------------+
| Level   | Code | Message                                      |
+---------+------+----------------------------------------------+
| Warning | 1265 | Data truncated for column 'version' at row 1 |
+---------+------+----------------------------------------------+
1 row in set (0.00 sec)
@YongBoLiu YongBoLiu added bug Undesired behaviour unverified Some days we don't have a clue labels Sep 17, 2020
@TheWitness
Copy link
Member

Believe or not, this made my day and it's barely 6:00am.

TheWitness added a commit that referenced this issue Sep 17, 2020
The version number of plugin is not correct because the version length is too small in plugin_config schema
@TheWitness TheWitness added resolved A fixed issue and removed unverified Some days we don't have a clue labels Sep 17, 2020
@TheWitness
Copy link
Member

Okay YongBo. Fixed.

@TheWitness TheWitness added this to the 1.2.15 milestone Sep 17, 2020
@YongBoLiu
Copy link
Contributor Author

That's great. Thanks @TheWitness

@netniV netniV changed the title The version number of plugin is not correct because the version length is too small in plugin_config schema Plugin version numbers can be unexpectedly truncated Nov 2, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Feb 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

2 participants