diff options
author | unknown <igor@olga.mysql.com> | 2007-06-04 03:03:15 -0700 |
---|---|---|
committer | unknown <igor@olga.mysql.com> | 2007-06-04 03:03:15 -0700 |
commit | e65eb0e44791b9ecc6457d5bec25e148eaee48e2 (patch) | |
tree | f15e7f2b5affe19975256465cb57da5944cf332c | |
parent | f4caa3025a437ca818fdef152321c3c02b2dabd6 (diff) | |
download | mariadb-git-e65eb0e44791b9ecc6457d5bec25e148eaee48e2.tar.gz |
Post-merge fix.
-rw-r--r-- | mysql-test/r/ps_2myisam.result | 32 | ||||
-rw-r--r-- | mysql-test/r/ps_3innodb.result | 32 | ||||
-rw-r--r-- | mysql-test/r/ps_4heap.result | 32 | ||||
-rw-r--r-- | mysql-test/r/ps_5merge.result | 64 | ||||
-rw-r--r-- | mysql-test/r/ps_7ndb.result | 32 | ||||
-rw-r--r-- | sql/sql_lex.cc | 5 | ||||
-rw-r--r-- | sql/sql_lex.h | 37 | ||||
-rw-r--r-- | sql/sql_table.cc | 46 | ||||
-rw-r--r-- | sql/sql_view.cc | 2 |
9 files changed, 155 insertions, 127 deletions
diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result index facea5470e9..feb40de9a6d 100644 --- a/mysql-test/r/ps_2myisam.result +++ b/mysql-test/r/ps_2myisam.result @@ -1927,8 +1927,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -1974,8 +1974,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2024,8 +2024,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2064,8 +2064,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2112,8 +2112,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2156,8 +2156,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2202,8 +2202,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2240,8 +2240,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result index 97a78931332..9398426ec0b 100644 --- a/mysql-test/r/ps_3innodb.result +++ b/mysql-test/r/ps_3innodb.result @@ -1910,8 +1910,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -1957,8 +1957,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2007,8 +2007,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2047,8 +2047,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2095,8 +2095,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2139,8 +2139,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2185,8 +2185,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2223,8 +2223,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result index 3f0900888cc..c2de727f572 100644 --- a/mysql-test/r/ps_4heap.result +++ b/mysql-test/r/ps_4heap.result @@ -1911,8 +1911,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -1958,8 +1958,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2008,8 +2008,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2048,8 +2048,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2096,8 +2096,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2140,8 +2140,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2186,8 +2186,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2224,8 +2224,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result index f96ae5ea7cd..c1f36cc84de 100644 --- a/mysql-test/r/ps_5merge.result +++ b/mysql-test/r/ps_5merge.result @@ -1847,8 +1847,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -1894,8 +1894,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -1944,8 +1944,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -1984,8 +1984,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2032,8 +2032,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2076,8 +2076,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2122,8 +2122,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2160,8 +2160,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -4868,8 +4868,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -4915,8 +4915,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -4965,8 +4965,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -5005,8 +5005,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -5053,8 +5053,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -5097,8 +5097,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -5143,8 +5143,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -5181,8 +5181,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 diff --git a/mysql-test/r/ps_7ndb.result b/mysql-test/r/ps_7ndb.result index 52057c99120..26475f4c147 100644 --- a/mysql-test/r/ps_7ndb.result +++ b/mysql-test/r/ps_7ndb.result @@ -1910,8 +1910,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -1957,8 +1957,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2007,8 +2007,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2047,8 +2047,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2095,8 +2095,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2139,8 +2139,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2185,8 +2185,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2223,8 +2223,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index d8846d3fc9d..44768dd6d79 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -1127,7 +1127,10 @@ Alter_info::Alter_info(const Alter_info &rhs, MEM_ROOT *mem_root) keys_onoff(rhs.keys_onoff), tablespace_op(rhs.tablespace_op), partition_names(rhs.partition_names, mem_root), - no_parts(rhs.no_parts) + no_parts(rhs.no_parts), + change_level(rhs.change_level), + datetime_field(rhs.datetime_field), + error_if_not_empty(rhs.error_if_not_empty) { /* Make deep copies of used objects. diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 6d96dded088..f798fb535b3 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -830,6 +830,13 @@ inline bool st_select_lex_unit::is_union () #define ALTER_REMOVE_PARTITIONING (1L << 25) #define ALTER_FOREIGN_KEY (1L << 26) +enum enum_alter_table_change_level +{ + ALTER_TABLE_METADATA_ONLY= 0, + ALTER_TABLE_DATA_CHANGED= 1, + ALTER_TABLE_INDEX_CHANGED= 2 +}; + /** @brief Parsing data for CREATE or ALTER TABLE. @@ -840,21 +847,28 @@ inline bool st_select_lex_unit::is_union () class Alter_info { public: - List<Alter_drop> drop_list; - List<Alter_column> alter_list; - List<Key> key_list; - List<create_field> create_list; - uint flags; - enum enum_enable_or_disable keys_onoff; - enum tablespace_op_type tablespace_op; - List<char> partition_names; - uint no_parts; + List<Alter_drop> drop_list; + List<Alter_column> alter_list; + List<Key> key_list; + List<create_field> create_list; + uint flags; + enum enum_enable_or_disable keys_onoff; + enum tablespace_op_type tablespace_op; + List<char> partition_names; + uint no_parts; + enum_alter_table_change_level change_level; + create_field *datetime_field; + bool error_if_not_empty; + Alter_info() : flags(0), keys_onoff(LEAVE_AS_IS), tablespace_op(NO_TABLESPACE_OP), - no_parts(0) + no_parts(0), + change_level(ALTER_TABLE_METADATA_ONLY), + datetime_field(NULL), + error_if_not_empty(FALSE) {} void reset() @@ -868,6 +882,9 @@ public: tablespace_op= NO_TABLESPACE_OP; no_parts= 0; partition_names.empty(); + change_level= ALTER_TABLE_METADATA_ONLY; + datetime_field= 0; + error_if_not_empty= FALSE; } /** Construct a copy of this object to be used for mysql_alter_table diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 3d8c0875452..06c09cf4ebf 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -233,18 +233,6 @@ uint build_tmptable_filename(THD* thd, char *buff, size_t bufflen) } /* - Return values for compare_tables(). - If you make compare_tables() non-static, move them to a header file. -*/ - -enum enum_compare_tables_result -{ - ALTER_TABLE_METADATA_ONLY= 0, - ALTER_TABLE_DATA_CHANGED= 1, - ALTER_TABLE_INDEX_CHANGED= 2 -}; - -/* -------------------------------------------------------------------------- MODULE: DDL log @@ -4921,7 +4909,7 @@ compare_tables(TABLE *table, Alter_info *alter_info, HA_CREATE_INFO *create_info, uint order_num, - enum enum_compare_tables_result *need_copy_table, + enum_alter_table_change_level *need_copy_table, KEY **key_info_buffer, uint **index_drop_buffer, uint *index_drop_count, uint **index_add_buffer, uint *index_add_count) @@ -5414,6 +5402,23 @@ mysql_prepare_alter_table(THD *thd, TABLE *table, my_error(ER_BAD_FIELD_ERROR, MYF(0), def->change, table->s->table_name); goto err; } + /* + Check that the DATE/DATETIME not null field we are going to add is + either has a default value or the '0000-00-00' is allowed by the + set sql mode. + If the '0000-00-00' value isn't allowed then raise the error_if_not_empty + flag to allow ALTER TABLE only if the table to be altered is empty. + */ + if ((def->sql_type == MYSQL_TYPE_DATE || + def->sql_type == MYSQL_TYPE_NEWDATE || + def->sql_type == MYSQL_TYPE_DATETIME) && + !alter_info->datetime_field && + !(~def->flags & (NO_DEFAULT_VALUE_FLAG | NOT_NULL_FLAG)) && + thd->variables.sql_mode & MODE_NO_ZERO_DATE) + { + alter_info->datetime_field= def; + alter_info->error_if_not_empty= TRUE; + } if (!def->after) new_create_list.push_back(def); else if (def->after == first_keyword) @@ -5433,6 +5438,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table, goto err; } find_it.after(def); // Put element after this + alter_info->change_level= ALTER_TABLE_DATA_CHANGED; } } if (alter_info->alter_list.elements) @@ -5674,7 +5680,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name, handlerton *old_db_type, *new_db_type, *save_old_db_type; legacy_db_type table_type; frm_type_enum frm_type; - enum_compare_tables_result need_copy_table= ALTER_TABLE_METADATA_ONLY; + enum_alter_table_change_level need_copy_table= ALTER_TABLE_METADATA_ONLY; #ifdef WITH_PARTITION_STORAGE_ENGINE uint fast_alter_partition= 0; bool partition_changed= FALSE; @@ -6058,6 +6064,8 @@ view_err: if (mysql_prepare_alter_table(thd, table, create_info, alter_info)) goto err; + + need_copy_table= alter_info->change_level; set_table_default_charset(thd, create_info, db); @@ -6070,7 +6078,7 @@ view_err: need_copy_table= ALTER_TABLE_DATA_CHANGED; else { - enum_compare_tables_result need_copy_table_res; + enum_alter_table_change_level need_copy_table_res; /* Check how much the tables differ. */ if (compare_tables(table, alter_info, create_info, order_num, @@ -6317,7 +6325,7 @@ view_err: alter_info->create_list, ignore, order_num, order, &copied, &deleted, alter_info->keys_onoff, - error_if_not_empty); + alter_info->error_if_not_empty); } else { @@ -6675,11 +6683,11 @@ err: the table to be altered isn't empty. Report error here. */ - if (error_if_not_empty && thd->row_count) + if (alter_info->error_if_not_empty && thd->row_count) { const char *f_val= 0; enum enum_mysql_timestamp_type t_type= MYSQL_TIMESTAMP_DATE; - switch (new_datetime_field->sql_type) + switch (alter_info->datetime_field->sql_type) { case MYSQL_TYPE_DATE: case MYSQL_TYPE_NEWDATE: @@ -6698,7 +6706,7 @@ err: thd->abort_on_warning= TRUE; make_truncated_value_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, f_val, strlength(f_val), t_type, - new_datetime_field->field_name); + alter_info->datetime_field->field_name); thd->abort_on_warning= save_abort_on_warning; } if (name_lock) diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 8b0092feac8..d95c1ec752d 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -710,7 +710,7 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view, view->query.length= str.length(); view->source.str= thd->query + thd->lex->create_view_select_start; endp= view->source.str; - endp= skip_rear_comments(endp, thd->query + thd->query_length); + endp= skip_rear_comments(thd->charset(), endp, thd->query + thd->query_length); view->source.length= endp - view->source.str; view->file_version= 1; view->calc_md5(md5); |