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

FK validate data but in select join tables parent and child don't search data

    XMLWordPrintable

Details

    Description

      I have two tables

      CREATE TABLE parent (
        `cod_cta` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
        `des_cta` VARCHAR(100),
         PRIMARY KEY (`cod_neg`,`cod_cta`),
      ) ENGINE=INNODB;
       
      CREATE TABLE child (
        `cod_asi` INT(11) NOT NULL DEFAULT 0,
        `num_lin` INT(11) NOT NULL DEFAULT 0,
        `cod_cta` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
        PRIMARY KEY (`cod_asi`,`num_lin`),
        CONSTRAINT `fk_child_cta` FOREIGN KEY (`cod_cta`) REFERENCES parent ( `cod_cta`) ENGINE=INNODB;
      

      when I insert a new row in child table, FK OK data with trailing spaces, but when I join both tables in a select data dont retrieve any data.

      thanks!

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kmesen@hotmail.com kmesen@hotmail.com
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.