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

Different UNSIGNED flag of out user variable for YEAR parameter for direct vs prepared CALL

    XMLWordPrintable

    Details

      Description

      DROP PROCEDURE IF EXISTS p1;
      DROP TABLE IF EXISTS t1;
      CREATE PROCEDURE p1(OUT v YEAR) SET v = 2010;
      CALL p1(@a);
      PREPARE stmt FROM 'CALL p1(?)';
      EXECUTE stmt USING @b;
      DEALLOCATE PREPARE stmt;
      CREATE TABLE t1 AS SELECT @a AS a, @b AS b;
      SHOW CREATE TABLE t1;
      

      +-------+----------------------------------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                                                     |
      +-------+----------------------------------------------------------------------------------------------------------------------------------+
      | t1    | CREATE TABLE `t1` (
        `a` bigint(20) unsigned DEFAULT NULL,
        `b` bigint(20) DEFAULT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
      +-------+----------------------------------------------------------------------------------------------------------------------------------+
      

      Notice, the column b is missing the unsigned flag.

        Attachments

          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:
              Resolved: