Skip to content

country_code is defined as NOT NULL, yet INSERT lacks a value! - #15349

Merged
williamdes merged 1 commit into
phpmyadmin:QA_4_9from
johnkershaw:patch-1
Jun 24, 2019
Merged

williamdes merged 1 commit into
phpmyadmin:QA_4_9from
johnkershaw:patch-1

Conversation

@johnkershaw

Copy link
Copy Markdown
Contributor

Without a country_code for 'Marc' the second step will fail (cannot relate country_code in REL_persons to country_code in REL_countries if the REL_persons record has no value for country_code).

Since this is the whole point of this example it's going to trip people up who're trying to set up relations in phpMyAdmin (like me!)

Description

Please describe your pull request.

Fixes #

Before submitting pull request, please review the following checklist:

  • Make sure you have read our CONTRIBUTING.md document.
  • Make sure you are making a pull request against the correct branch. For example, for bug fixes in a released version use the corresponding QA branch and for new features use the master branch. If you have a doubt, you can ask as a comment in the bug report or on the mailing list.
  • Every commit has proper Signed-off-by line as described in our DCO. This ensures that the work you're submitting is your own creation.
  • Every commit has a descriptive commit message.
  • Every commit is needed on its own, if you have just minor fixes to previous commits, you can squash them.
  • Any new functionality is covered by tests.

@williamdes williamdes left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johnkershaw I will merge this immediately if you add your signoff line (you can send it as a comment here)

And BTW you can rename all TYPE= to ENGINE= :)

@williamdes williamdes self-assigned this Jun 23, 2019
@ibennetch
ibennetch changed the base branch from master to QA_4_9 June 23, 2019 19:28
@phpmyadmin-bot

Copy link
Copy Markdown
Contributor

This pull requests contains too many commits, in most cases it is caused by wrong merge target. In case you have forked master branch you should also ask merging to master branch. See GitHub documentation for more details.

@ibennetch
ibennetch changed the base branch from QA_4_9 to master June 23, 2019 19:29
@ibennetch

Copy link
Copy Markdown
Member

This change can go in to QA_4_9. William, I'd suggest merging it to your own repository, then cherry-picking that commit in to your QA_4_9 branch. You can then merge QA_4_9 into master.

Probably like this:

git checkout -b johnkershaw-patch-1 master
git pull git://github.com/johnkershaw/phpmyadmin.git patch-1
git checkout QA_4_9
git cherry-pick 1e72dd6c4c27a15d98bdc1d884f639ab5fc0772d

Note that the commit ID will change after John fixes the signoff line, so you'll need to substitute the correct ID there instead.

@johnkershaw

Copy link
Copy Markdown
Contributor Author

Signed-off-by: John Kershaw [email protected]

@johnkershaw

Copy link
Copy Markdown
Contributor Author

Ah, yes, I had to delete all the references to TYPE= to get it to work (I was testing on db4free.com as a prelude to a unit I'm teaching on databases this semester).

Without a country_code for 'Marc' the second step will fail (cannot relate country_code in REL_persons to country_code in REL_countries if the REL_persons record has no value for country_code).

Since this is the whole point of this example it's going to trip people up who're trying to set up relations in phpMyAdmin (like me!)

Co-authored-by: William Desportes <[email protected]>
Signed-off-by: John Kershaw <[email protected]>
Signed-off-by: William Desportes <[email protected]>
@williamdes
williamdes changed the base branch from master to QA_4_9 June 24, 2019 19:35
@codecov

codecov Bot commented Jun 24, 2019

Copy link
Copy Markdown

Codecov Report

Merging #15349 into master will increase coverage by 0.02%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master   #15349      +/-   ##
============================================
+ Coverage     52.89%   52.92%   +0.02%     
- Complexity    14035    14039       +4     
============================================
  Files           481      481              
  Lines         61889    61977      +88     
============================================
+ Hits          32738    32801      +63     
- Misses        29151    29176      +25

1 similar comment
@codecov

codecov Bot commented Jun 24, 2019

Copy link
Copy Markdown

Codecov Report

Merging #15349 into master will increase coverage by 0.02%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master   #15349      +/-   ##
============================================
+ Coverage     52.89%   52.92%   +0.02%     
- Complexity    14035    14039       +4     
============================================
  Files           481      481              
  Lines         61889    61977      +88     
============================================
+ Hits          32738    32801      +63     
- Misses        29151    29176      +25

@williamdes
williamdes merged commit ecad599 into phpmyadmin:QA_4_9 Jun 24, 2019
williamdes added a commit that referenced this pull request Jun 24, 2019
@williamdes williamdes added this to the 4.9.1 milestone Jun 24, 2019
@williamdes

Copy link
Copy Markdown
Member

Thanks @johnkershaw !

I'm teaching on databases this semester

Have a good semester with your students :)

Merged as 2637324
I rebased your commit and added some changed (ecad599)

williamdes added a commit that referenced this pull request Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants