Skip to content

Plugin version numbers can be unexpectedly truncated #3809

Description

@YongBoLiu

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviourresolvedA fixed issue

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions