Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-9417

"CREATE TABLE t1 SELECT int_sp_argument" produces a too large column

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.1, 10.2
    • Fix Version/s: 10.3, 10.4
    • Component/s: Data types
    • Labels:
      None

      Description

      DROP TABLE IF EXISTS t1;
      DROP PROCEDURE IF EXISTS p1;
      CREATE PROCEDURE p1(a INT) CREATE TABLE t1 SELECT a;
      CALL p1(1);
      DESC t1;

      returns

      +-------+------------+------+-----+---------+-------+
      | Field | Type       | Null | Key | Default | Extra |
      +-------+------------+------+-----+---------+-------+
      | a     | bigint(11) | YES  |     | NULL    |       |
      +-------+------------+------+-----+---------+-------+

      int(11) would be enough.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bar Alexander Barkov
                Reporter:
                bar Alexander Barkov
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: