developers
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
October 2009
- 18 participants
- 235 discussions
[Maria-developers] Rev 2789: MBUG#452116: MariaDB: mysql_install_db causes server segfault in file:///home/psergey/bzr-new/maria-5.1-build1/
by Sergey Petrunya 16 Oct '09
by Sergey Petrunya 16 Oct '09
16 Oct '09
At file:///home/psergey/bzr-new/maria-5.1-build1/
------------------------------------------------------------
revno: 2789
revision-id: psergey(a)askmonty.org-20091016154458-g89p8v46silum9v7
parent: psergey(a)askmonty.org-20091015222833-wgpszwg9794t9cgc
committer: Sergey Petrunya <psergey(a)askmonty.org>
branch nick: maria-5.1-build1
timestamp: Fri 2009-10-16 19:44:58 +0400
message:
MBUG#452116: MariaDB: mysql_install_db causes server segfault
- Increase thread_stack_size on 64-bit platforms to 240K, so that
it can accomodate the HA_CHECK structure which is 130K.
=== modified file 'mysys/my_init.c'
--- a/mysys/my_init.c 2009-09-07 20:50:10 +0000
+++ b/mysys/my_init.c 2009-10-16 15:44:58 +0000
@@ -42,7 +42,8 @@
my_bool my_init_done= 0;
uint mysys_usage_id= 0; /* Incremented for each my_init() */
-ulong my_thread_stack_size= 65536;
+
+ulong my_thread_stack_size= (sizeof(void*) <= 4)? 65536: ((256-16)*1024);
static ulong atoi_octal(const char *str)
{
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc 2009-10-15 22:28:33 +0000
+++ b/sql/mysqld.cc 2009-10-16 15:44:58 +0000
@@ -7170,7 +7170,7 @@
{"thread_stack", OPT_THREAD_STACK,
"The stack size for each thread.", (uchar**) &my_thread_stack_size,
(uchar**) &my_thread_stack_size, 0, GET_ULONG, REQUIRED_ARG,DEFAULT_THREAD_STACK,
- 1024L*128L, (longlong) ULONG_MAX, 0, 1024, 0},
+ (sizeof(void*)<=4)?1024L*128L: ((256-16)*1024L), (longlong) ULONG_MAX, 0, 1024, 0},
{ "time_format", OPT_TIME_FORMAT,
"The TIME format (for future).",
(uchar**) &opt_date_time_formats[MYSQL_TIMESTAMP_TIME],
=== modified file 'support-files/my-innodb-heavy-4G.cnf.sh'
--- a/support-files/my-innodb-heavy-4G.cnf.sh 2009-03-31 14:04:01 +0000
+++ b/support-files/my-innodb-heavy-4G.cnf.sh 2009-10-16 15:44:58 +0000
@@ -174,7 +174,7 @@
# memory, while if you use your own stack hungry UDF functions or your
# OS requires more stack for some operations, you might need to set this
# to a higher value.
-thread_stack = 192K
+thread_stack = 240K
# Set the default transaction isolation level. Levels available are:
# READ-UNCOMMITTED, READ-COMMITTED, REPEATABLE-READ, SERIALIZABLE
=== modified file 'support-files/my-small.cnf.sh'
--- a/support-files/my-small.cnf.sh 2009-03-31 14:04:01 +0000
+++ b/support-files/my-small.cnf.sh 2009-10-16 15:44:58 +0000
@@ -34,7 +34,7 @@
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
-thread_stack = 128K
+thread_stack = 240K
# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
1
0
I have completed a merge of MySQL 5.1.39 into MariaDB.
The merge is pushed into lp:~maria-captains/maria/mariadb-5.1-knielsen for
testing.
Note that pushing the merge into main is currently blocked by a regression
introduced in MySQL 5.1.39 by the patch for Bug#45261. I mailed the MySQL
developers about this:
http://lists.mysql.com/internals/37377
Due to this regression, the new TIME_MS column in
INFORMATION_SCHEMA.PROCESSLIST in MariaDB is broken, as seen in test failures
like main.create.
Hopefully the MySQL developers can help on how to resolve this. The issue is a
bit complex, concerning truncation issues with DECIMAL types.
- Kristian.
1
0
[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (knielsen:2747)
by knielsen@knielsen-hq.org 16 Oct '09
by knielsen@knielsen-hq.org 16 Oct '09
16 Oct '09
#At lp:maria
2747 knielsen(a)knielsen-hq.org 2009-10-16
When running with --skip-safemalloc, still do some basic, but cheap, overrun checks.
This greatly helps with eg. slow hosts in Buildbot.
modified:
mysys/safemalloc.c
=== modified file 'mysys/safemalloc.c'
--- a/mysys/safemalloc.c 2009-09-07 20:50:10 +0000
+++ b/mysys/safemalloc.c 2009-10-16 15:01:36 +0000
@@ -272,6 +272,9 @@ void _myfree(void *ptr, const char *file
irem= (struct st_irem *) ((char*) ptr- ALIGN_SIZE(sizeof(struct st_irem))-
sf_malloc_prehunc);
+ if (sf_malloc_quick)
+ (void) _checkchunk(irem, filename, lineno);
+
/*
Check to make sure that we have a real remember structure.
Note: this test could fail for four reasons:
1
0
[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (knielsen:2746)
by knielsen@knielsen-hq.org 16 Oct '09
by knielsen@knielsen-hq.org 16 Oct '09
16 Oct '09
#At lp:maria
2746 knielsen(a)knielsen-hq.org 2009-10-16
After-merge fixes for MySQL 5.1.39 merge.
Some pbxt test suite files needed updating due to similar changes after
bugfixes in MySQL 5.1.39.
modified:
mysql-test/suite/pbxt/r/partition_range.result
mysql-test/suite/pbxt/r/subselect.result
mysql-test/suite/pbxt/t/subselect.test
=== modified file 'mysql-test/suite/pbxt/r/partition_range.result'
--- a/mysql-test/suite/pbxt/r/partition_range.result 2009-04-02 10:03:14 +0000
+++ b/mysql-test/suite/pbxt/r/partition_range.result 2009-10-16 12:45:42 +0000
@@ -710,7 +710,7 @@ a
EXPLAIN PARTITIONS SELECT * FROM t1
WHERE a >= '2004-07-01' AND a <= '2004-09-30';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p407,p408,p409 ALL NULL NULL NULL NULL 9 Using where
+1 SIMPLE t1 p3xx,p407,p408,p409 ALL NULL NULL NULL NULL 18 Using where
SELECT * from t1
WHERE (a >= '2004-07-01' AND a <= '2004-09-30') OR
(a >= '2005-07-01' AND a <= '2005-09-30');
@@ -737,5 +737,5 @@ EXPLAIN PARTITIONS SELECT * from t1
WHERE (a >= '2004-07-01' AND a <= '2004-09-30') OR
(a >= '2005-07-01' AND a <= '2005-09-30');
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p407,p408,p409,p507,p508,p509 ALL NULL NULL NULL NULL 18 Using where
+1 SIMPLE t1 p3xx,p407,p408,p409,p507,p508,p509 ALL NULL NULL NULL NULL 27 Using where
DROP TABLE t1;
=== modified file 'mysql-test/suite/pbxt/r/subselect.result'
--- a/mysql-test/suite/pbxt/r/subselect.result 2009-08-17 15:57:58 +0000
+++ b/mysql-test/suite/pbxt/r/subselect.result 2009-10-16 12:45:42 +0000
@@ -75,7 +75,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1));
ERROR HY000: Incorrect usage of PROCEDURE and subquery
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
-ERROR HY000: Incorrect parameters to procedure 'ANALYSE'
+ERROR HY000: Incorrect usage of PROCEDURE and subquery
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
ERROR 42S22: Unknown column 'a' in 'field list'
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL;
=== modified file 'mysql-test/suite/pbxt/t/subselect.test'
--- a/mysql-test/suite/pbxt/t/subselect.test 2009-04-02 10:03:14 +0000
+++ b/mysql-test/suite/pbxt/t/subselect.test 2009-10-16 12:45:42 +0000
@@ -30,7 +30,7 @@ SELECT 1 IN (SELECT 1);
SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
-- error 1221
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1));
--- error 1108
+-- error ER_WRONG_USAGE
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
-- error ER_BAD_FIELD_ERROR
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
1
0
So now would probably be a good time to blog something about our
MariaDB release. As agreed, I will blog something about how the
release came to be, Monty's will be more announcement like.
Is the below somewhat close to what really happened?
******************************************************
Producing a MariaDB release: It isn't over until the fat lady sings...
When I was younger and had lots of free time, I used to do video
editing as a hobby. At that time I developed a rule that is true for
many projects in general (it was also true for writing a book some
years later). The rule is: <em>When you think you are 90% done, you
are only 50% done.</em> With video-editing, this meant that when the
video was more or less ready, you are still 50% away from the final
goal of actually having a master copy on tape. The latter 50% would be
spent on checking ending credits, watching through the video a couple
of times, and in those time, rendering even simplest of effects. Using
a Windows PC for video editing was in those times a shaky effort in
itself, so even when mastering you had to sit there and watch through
the whole tape to make sure there were no glitches.
Producing a MariaDB release has been a similar process. In our company
meeting in August we were discussing "final steps" to produce a final
Beta, then Release Candidate, then production release. As I blogged
then, the progress has been documented on a daily basis on <a
href="http://askmonty.org/wiki/index.php/MariaDB_5.1_TODO">the
askmonty.org wiki</a>.
<h2>Prioritizing features</h2>
We thought the list of features to include into the release was short.
Even so, we eventually pushed about half of them to a future release.
For instance the <a
href="http://datacharmer.blogspot.com/2008/09/mysql-virtual-columns.html">Virtual
Columns feature was done in itself, but seemed to expose a memory
overrun in other parts of the server. Tracking this was difficult,
because it did not happen in a debug build. Similarly a customer
sponsored an optimization that <a
href="http://askmonty.org/worklog/Server-Sprint/?tid=53">avoids
unnecesary flushing of the keycache</a> and while this was done in
time, pending final review it missed the train too. Some other
features were pushed into the future just due to lack of time.
We did however get in 2 Percona patches as planned, so MariaDB does
include some great additions that have been out in the MySQL community
for some time now. Virtual Columns will go into the 5.2 branch, and in
Monty's inbox we've found some further performance improvements done
by MySQL users that we'll start looking at too.
<h2>Just one final merge...</h2>
One innocent bullet point on the todo list was to merge in the newest
MySQL version, as well as XtraDB and PBXT. This was not a one day
job...
Somehow we managed to start the merge from MySQL from a more or less
random point in the <a
href="https://launchpad.net/mysql-server/5.1">MySQL 5.1 Launchpad
tree</a>. This led to a long list of merge failures that needed to be
fixed. Quite soon we realized that we were merging something that was
between MySQL 5.1.37 and 5.1.38, and the missing changesets to 5.1.38
were then added.
I'm told the delta between MySQL and MariaDB is already 11kB, a lot of
it is in whitespace or comments. A good target for cleanup work in our
next release cycle...
The bigger problem was that XtraDB 6 was developed against MySQL
5.1.36, so merging it against a MariaDB with 5.1.38 was not easy.
All in all we spent at least 4 man weeks just fixing merge issues. But
we are learning from our mistakes, and most importantly, <a
href="http://askmonty.org/wiki/index.php/MariaDB::MergingMySQL">documented
them</a>.
<h2>PBXT</h2>
If I remember correctly, merging the PBXT was relatively painless and
the Primebase team was quick to respond to small issues that came up.
We did notice that it did not compile on PowerPC (Mac OS X), and Paul
McCullagh confirmed that this was not a supported platform for PBXT.
<h2>Testing, testing... and first it has to build.</h2>
It turns out that <a
href="http://dev.mysql.com/doc/refman/5.1/en/news-5-1-38.html">MySQL
5.1.38 happened to be a release with quite a lot of changes</a>. Most
notably Sun has suddenly included InnoDB plugin in the midst of a
stable release series. (Considering the major benefit to MySQL users,
I actually understand the decision, it just happened to create
additional surprises to us.) 5.1.38 also changed how it builds all
storage engines, so we had to apply the same fix both to XtraDB and
PBXT too.
Of course Buildbot runs did report all kinds of test-suite errors, so
another batch of man weeks was spent fixing various test failures.
Many test failures happened on Windows only. To our surprise they also
happened in the stock MySQL 5.1.38 (which is GA quality). We were
however able to find patches for most of those, until we were down to
a small number of test failures which were considered safe to ignore.
Developers told me that Windows always got less attention in MySQL, so
for instance replication on Windows may never have been that heavily
tested.
<h2>Installation packages</h2>
Personally I had completely underestimated the complexity of actually
building TAR, ZIP, RPM, DEB and Windows installer packages. After all,
developers build and do test runs every day. In any case, the Sun
MySQL team produces builds steadily on a monthly basis. It turns out
the knowledge how to do that doesn't really exist outside of Sun.
Lots of technical MySQL users know how to checkout the latest source
code from launchpad, build it and play with it. Also lots of users
know how to download the source code tar balls of MySQL releases,
build it and play with it. What turned out to be non-trivial is 1) the
step to create the source tar ball, from the repository and 2) even
more the step to create a DEB or RPM from the source tar ball. Maybe
the scripts to do this exist in the MySQL source codes, maybe they
don't, but at least we did not know how to do that.
Thankfully <a href="http://ourdelta.org/">OurDelta</a> has been doing
this task for the 5.0 series of MySQL. They had so far not produced
5.1 builds, but thanks to close co-operation with Kristian from Monty
Program and Arjen from OurDelta, we were able to remove all problems
so that we know have produced builds for MariaDB 5.1.38.
This situation reminds me of other "open in license only" discussions,
such as seems to be the case for <a
href="http://lwn.net/Articles/331908/">Google's Android</a>. The
producers of MySQL and Android didn't put lots of effort into actually
making it easy for others to excercise their GPL rights to build their
own versions of these Open Source products. This is in contrast to
such projects like Linux, where every kid knows how to compile their
own kernel, even if they wouldn't know how to actually write a single
line of C.
Anyway, thanks to the experience of OurDelta, this didn't block us for
more than a week or two. For MariaDB, we will of course make sure that
there are both scripts and instructions readily available so that
anyone can produce their own builds if they'd want to.
And we of course welcome feedback and contributions also in this area,
there are some popular Linuxes that OurDelta scripts don't yet cover.
<h2>Caring about Windows users</h2>
I personally believe that a key reason to MySQL's success (for
instance compared to PostgreSQL) was that it also supported Windows
(which PostgreSQL does as of recently). After all, many web developers
- especially in the 90's - would use Windows for their desktop, while
deploying on Linux servers. So they needed both. So even if we won't
initially support all of the MySQL supported platforms, MariaDB
certainly needs to support Windows if it wants to be a MySQL
replacement. <a
href="/blogs/2009/august/mariadb-release-plan-and-other-news-mp-company-meeting">This
topic was widely discussed in my previous MariaDB related blog
post</a>.
With this background in mind, our Windows support started from a
relatively low point: After merging XtraDB, MariaDB crashed on startup
for Windows. It seems that nodoby had ever used XtraDB on Windows
before that. Also in MariaDB, we just hadn't gotten around to run a
Buildbot slave on Windows.
While we did fix most of the Windows issues, one thing we don't have
is a Windows installer. (The one Sun has for MySQL is not Open Source,
it turns out...) So while we are still committed to supporting
Windows, we have now decided that it is not proper to delay releasing
the Linux binaries anymore and we have now decided to release the
Linux binaries as soon as possible, while still continuing to create
the Windows binaries.
Luckily there are people who care also about Windows users, and we are
thankful that <a
href="https://lists.launchpad.net/maria-developers/msg01210.html">Webyog
has offered to help</a> in creating an Open Source MariaDB installer
for Windows.
<h2>Is there a happy end...</h2>
So this was a long story. (apologies) Does it end well?
It seems so. We now have debs and rpms and they are undergoing final
smoke testing and sanity checking. If there are no surprises, you can
look for a "recommended for public testing" release on <a
href="http://monty-says.blogspot.com">Monty's blog</a> any day now.
PS: Just in case you're wondering: <a
href="http://www.theanswerbank.co.uk/Phrases-and-Sayings/article/it-isnt-over-unt…">http://www.theanswerbank.co.uk/Phrases-and-Sayings/article/it-isnt-over-unt…</a>
--
email: henrik.ingo(a)avoinelama.fi
tel: +358-40-5697354
www: www.avoinelama.fi/~hingo
book: www.openlife.cc
3
2
[Maria-developers] Rev 2788: backport the patch: Georgi Kodinov 2009-09-17: in file:///home/psergey/bzr-new/maria-5.1-build1/
by Sergey Petrunya 16 Oct '09
by Sergey Petrunya 16 Oct '09
16 Oct '09
At file:///home/psergey/bzr-new/maria-5.1-build1/
------------------------------------------------------------
revno: 2788
revision-id: psergey(a)askmonty.org-20091015222833-wgpszwg9794t9cgc
parent: psergey(a)askmonty.org-20091012165020-wy00cdvjz603quz5
committer: Sergey Petrunya <psergey(a)askmonty.org>
branch nick: maria-5.1-build1
timestamp: Fri 2009-10-16 02:28:33 +0400
message:
backport the patch: Georgi Kodinov 2009-09-17:
Bug #46917: mysqd-nt installs wrong
When parsing the service installation parameter in
default_service_handling() make sure the value of the
optional parameter doesn't overwrite it's name.
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc 2009-10-07 13:07:10 +0000
+++ b/sql/mysqld.cc 2009-10-15 22:28:33 +0000
@@ -4712,7 +4712,7 @@
if (opt_delim= strchr(extra_opt, '='))
{
size_t length= ++opt_delim - extra_opt;
- strnmov(pos, extra_opt, length);
+ pos= strnmov(pos, extra_opt, length);
}
else
opt_delim= extra_opt;
1
0
[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (knielsen:2745)
by knielsen@knielsen-hq.org 15 Oct '09
by knielsen@knielsen-hq.org 15 Oct '09
15 Oct '09
#At lp:maria
2745 knielsen(a)knielsen-hq.org 2009-10-15 [merge]
Merge with latest MariaDB 5.1 trunk.
added:
BUILD/compile-pentium-debug-max-no-qc
mysql-test/r/mysqltest_ps.result
mysql-test/suite/maria/t/maria_showlog_error-master.opt
mysql-test/t/mysqltest_ps.test
win/configure-mariadb.sh
win/make_mariadb_win_dist
modified:
BUILD/SETUP.sh
Makefile.am
client/mysqltest.cc
configure.in
mysql-test/include/maria_empty_logs.inc
mysql-test/include/read_many_rows.inc
mysql-test/include/wait_for_status_var.inc
mysql-test/lib/My/ConfigFactory.pm
mysql-test/lib/mtr_cases.pm
mysql-test/mysql-test-run.pl
mysql-test/r/read_many_rows_innodb.result
mysql-test/suite/funcs_1/datadict/processlist_priv.inc
mysql-test/suite/funcs_1/datadict/processlist_val.inc
mysql-test/suite/funcs_1/r/is_columns_is.result
mysql-test/suite/funcs_1/r/is_tables_is.result
mysql-test/suite/funcs_1/r/is_tables_myisam.result
mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result
mysql-test/suite/funcs_1/r/processlist_val_no_prot.result
mysql-test/suite/funcs_1/t/is_columns_is.test
mysql-test/suite/maria/t/maria-recover.test
mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test
mysql-test/suite/parts/t/partition_alter1_1_2_myisam.test
mysql-test/suite/parts/t/partition_alter1_1_innodb.test
mysql-test/suite/parts/t/partition_alter1_1_myisam.test
mysql-test/suite/parts/t/partition_alter1_2_innodb.test
mysql-test/suite/parts/t/partition_alter1_2_myisam.test
mysql-test/suite/parts/t/partition_alter2_1_innodb.test
mysql-test/suite/parts/t/partition_alter2_1_maria.test
mysql-test/suite/parts/t/partition_alter2_1_myisam.test
mysql-test/suite/parts/t/partition_alter2_2_innodb.test
mysql-test/suite/parts/t/partition_alter2_2_maria.test
mysql-test/suite/parts/t/partition_alter2_2_myisam.test
mysql-test/suite/parts/t/partition_alter3_innodb.test
mysql-test/suite/parts/t/partition_alter3_myisam.test
mysql-test/suite/parts/t/partition_alter4_innodb.test
mysql-test/suite/parts/t/partition_alter4_myisam.test
mysql-test/suite/parts/t/partition_basic_innodb.test
mysql-test/suite/parts/t/partition_basic_myisam.test
mysql-test/suite/parts/t/partition_basic_symlink_myisam.test
mysql-test/suite/parts/t/partition_engine_innodb.test
mysql-test/suite/parts/t/partition_engine_myisam.test
mysql-test/suite/parts/t/partition_recover_myisam.test
mysql-test/suite/parts/t/partition_special_innodb.test
mysql-test/suite/parts/t/partition_syntax_innodb.test
mysql-test/suite/parts/t/partition_syntax_myisam.test
mysql-test/suite/pbxt/r/connect.result
mysql-test/suite/pbxt/r/mysqlslap.result
mysql-test/suite/pbxt/r/ps_11bugs.result
mysql-test/suite/pbxt/r/select.result
mysql-test/suite/pbxt/r/union.result
mysql-test/suite/pbxt/t/connect.test
mysql-test/t/variables-big.test
scripts/make_win_bin_dist
sql/mysql_priv.h
sql/mysqld.cc
sql/sql_string.cc
storage/maria/ha_maria.cc
storage/maria/ma_state.c
storage/maria/maria_def.h
storage/myisam/ha_myisam.cc
storage/myisam/mi_locking.c
storage/myisam/myisamdef.h
storage/pbxt/src/Makefile.am
win/Makefile.am
win/configure.js
=== modified file 'BUILD/SETUP.sh'
--- a/BUILD/SETUP.sh 2009-09-29 19:02:48 +0000
+++ b/BUILD/SETUP.sh 2009-10-06 14:53:46 +0000
@@ -172,6 +172,7 @@ local_infile_configs="--enable-local-inf
max_no_embedded_configs="$SSL_LIBRARY --with-plugins=max"
+max_no_qc_configs="$SSL_LIBRARY --with-plugins=max --without-query-cache"
max_no_ndb_configs="$SSL_LIBRARY --with-plugins=max-no-ndb --with-embedded-server --with-libevent"
max_configs="$SSL_LIBRARY --with-plugins=max --with-embedded-server --with-libevent"
# Disable NDB in maria max builds
=== added file 'BUILD/compile-pentium-debug-max-no-qc'
--- a/BUILD/compile-pentium-debug-max-no-qc 1970-01-01 00:00:00 +0000
+++ b/BUILD/compile-pentium-debug-max-no-qc 2009-10-07 10:02:43 +0000
@@ -0,0 +1,10 @@
+#! /bin/sh
+# Builds server without query cache support
+
+path=`dirname $0`
+. "$path/SETUP.sh"
+
+extra_flags="$pentium_cflags $debug_cflags"
+extra_configs="$pentium_configs $debug_configs $max_no_qc_configs"
+
+. "$path/FINISH.sh"
=== modified file 'Makefile.am'
--- a/Makefile.am 2009-10-02 09:40:03 +0000
+++ b/Makefile.am 2009-10-11 15:38:37 +0000
@@ -156,6 +156,8 @@ test-bt:
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl $(MTR_EXTRA_OPTIONS) --comment=ps --force --timer \
--skip-ndbcluster --ps-protocol
+ -cd mysql-test ; MTR_BUILD_THREAD=auto \
+ @PERL@ ./mysql-test-run.pl $(MTR_EXTRA_OPTIONS) --force --comment=PBXT --mysqld=--default-storage-engine=pbxt --suite=pbxt
-if [ -e bin/ndbd -o -e storage/ndb/src/kernel/ndbd ] ; then \
cd mysql-test ; \
MTR_BUILD_THREAD=auto \
@@ -172,8 +174,6 @@ test-bt:
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl $(MTR_EXTRA_OPTIONS) --force --comment=funcs2 --suite=funcs_2
-cd mysql-test ; MTR_BUILD_THREAD=auto \
- @PERL@ ./mysql-test-run.pl $(MTR_EXTRA_OPTIONS) --force --comment=partitions --suite=parts
- -cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl $(MTR_EXTRA_OPTIONS) --force --comment=stress --suite=stress
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl $(MTR_EXTRA_OPTIONS) --force --comment=jp --suite=jp
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc 2009-10-15 21:38:29 +0000
+++ b/client/mysqltest.cc 2009-10-15 21:52:31 +0000
@@ -100,6 +100,7 @@ static my_bool display_result_vertically
display_metadata= FALSE, display_result_sorted= FALSE;
static my_bool disable_query_log= 0, disable_result_log= 0;
static my_bool disable_warnings= 0;
+static my_bool prepare_warnings_enabled= 0;
static my_bool disable_info= 1;
static my_bool abort_on_error= 1;
static my_bool server_initialized= 0;
@@ -289,7 +290,7 @@ enum enum_commands {
Q_SEND_QUIT, Q_CHANGE_USER, Q_MKDIR, Q_RMDIR,
Q_LIST_FILES, Q_LIST_FILES_WRITE_FILE, Q_LIST_FILES_APPEND_FILE,
Q_SEND_SHUTDOWN, Q_SHUTDOWN_SERVER,
- Q_MOVE_FILE,
+ Q_MOVE_FILE, Q_ENABLE_PREPARE_WARNINGS, Q_DISABLE_PREPARE_WARNINGS,
Q_UNKNOWN, /* Unknown command. */
Q_COMMENT, /* Comments, ignored. */
@@ -387,6 +388,8 @@ const char *command_names[]=
"send_shutdown",
"shutdown_server",
"move_file",
+ "enable_prepare_warnings",
+ "disable_prepare_warnings",
0
};
@@ -6928,8 +6931,17 @@ void run_query_stmt(MYSQL *mysql, struct
mysql_free_result(res); /* Free normal result set with meta data */
- /* Clear prepare warnings */
- dynstr_set(&ds_prepare_warnings, NULL);
+ /*
+ Normally, if there is a result set, we do not show warnings from the
+ prepare phase. This is because some warnings are generated both during
+ prepare and execute; this would generate different warning output
+ between normal and ps-protocol test runs.
+
+ The --enable_prepare_warnings command can be used to change this so
+ that warnings from both the prepare and execute phase are shown.
+ */
+ if (!disable_warnings && !prepare_warnings_enabled)
+ dynstr_set(&ds_prepare_warnings, NULL);
}
else
{
@@ -7753,6 +7765,8 @@ int main(int argc, char **argv)
case Q_DISABLE_RESULT_LOG: disable_result_log=1; break;
case Q_ENABLE_WARNINGS: disable_warnings=0; break;
case Q_DISABLE_WARNINGS: disable_warnings=1; break;
+ case Q_ENABLE_PREPARE_WARNINGS: prepare_warnings_enabled=1; break;
+ case Q_DISABLE_PREPARE_WARNINGS: prepare_warnings_enabled=0; break;
case Q_ENABLE_INFO: disable_info=0; break;
case Q_DISABLE_INFO: disable_info=1; break;
case Q_ENABLE_METADATA: display_metadata=1; break;
=== modified file 'configure.in'
--- a/configure.in 2009-10-15 21:38:29 +0000
+++ b/configure.in 2009-10-15 21:52:31 +0000
@@ -12,8 +12,10 @@ AC_CANONICAL_SYSTEM
# in mysqlbinlog.cc / check_master_version().
#
# When merging new MySQL releases, update the version number to match the
-# MySQL version number, but reset the maria subrelease (-beta1).
-AM_INIT_AUTOMAKE(mysql, 5.1.38-MariaDB-beta1)
+# MySQL version number.
+#
+# Note: the following line must be parseable by win/configure.js:GetVersion()
+AM_INIT_AUTOMAKE(mysql, 5.1.38-maria-beta)
AM_CONFIG_HEADER([include/config.h:config.h.in])
PROTOCOL_VERSION=10
=== modified file 'mysql-test/include/maria_empty_logs.inc'
--- a/mysql-test/include/maria_empty_logs.inc 2009-02-19 09:01:25 +0000
+++ b/mysql-test/include/maria_empty_logs.inc 2009-10-13 12:47:17 +0000
@@ -1,6 +1,10 @@
# Maria help script.
# Cleans up all logs to give recovery a fresh start.
-
+#
+# Note that this script relies on the number of threads connect at start of
+# this script, so one should run this script with a freshly started server
+# for it to work.
+#
# API: set mel_keep_control_file=1 if want to keep control file;
# uses vardir, port and socket.
=== modified file 'mysql-test/include/read_many_rows.inc'
--- a/mysql-test/include/read_many_rows.inc 2007-08-05 05:36:54 +0000
+++ b/mysql-test/include/read_many_rows.inc 2009-10-11 09:06:55 +0000
@@ -71,8 +71,8 @@ CREATE TRIGGER t1_bi before INSERT
BEGIN
DECLARE CONTINUE HANDLER FOR SQLSTATE '40001' SET @a:= 'deadlock';
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET @a:= 'exception';
- INSERT INTO t2 (f2) VALUES (1);
- DELETE FROM t2 WHERE f2 = 1;
+ INSERT INTO t2 (f2) VALUES (NEW.f1);
+ DELETE FROM t2 WHERE f2 = NEW.f1;
END;|
CREATE PROCEDURE proc24989()
@@ -109,7 +109,7 @@ send insert into t1 values(1);
connection con1;
--sleep 1
-insert into t1 values(1);
+insert into t1 values(123);
connection con2;
--error 1213
@@ -130,7 +130,7 @@ send call proc24989();
connection con1;
--sleep 1
-insert into t1 values(1);
+insert into t1 values(123);
connection con2;
reap;
@@ -150,7 +150,7 @@ send call proc24989_2();
connection con1;
--sleep 1
-insert into t1 values(1);
+insert into t1 values(123);
commit;
connection con2;
=== modified file 'mysql-test/include/wait_for_status_var.inc'
--- a/mysql-test/include/wait_for_status_var.inc 2009-04-03 21:33:13 +0000
+++ b/mysql-test/include/wait_for_status_var.inc 2009-10-13 12:47:17 +0000
@@ -51,11 +51,12 @@ if (`SELECT '$_status_var_comparsion' =
}
let $_show_status_value= query_get_value("SHOW $status_type STATUS LIKE '$status_var'", Value, 1);
+
while (`SELECT NOT('$_show_status_value' $_status_var_comparsion '$status_var_value')`)
{
if (!$_status_timeout_counter)
{
- --echo **** ERROR: failed while waiting for $status_type $status_var $_status_var_comparison $status_var_value ****
+ --echo **** ERROR: failed while waiting for '$status_type' '$status_var' $_status_var_comparsion '$status_var_value' ****
--echo Note: the following output may have changed since the failure was detected
--echo **** Showing STATUS, PROCESSLIST ****
eval SHOW $status_type STATUS LIKE '$status_var';
=== modified file 'mysql-test/lib/My/ConfigFactory.pm'
--- a/mysql-test/lib/My/ConfigFactory.pm 2009-04-25 09:04:38 +0000
+++ b/mysql-test/lib/My/ConfigFactory.pm 2009-10-07 22:57:43 +0000
@@ -19,7 +19,7 @@ my @pre_rules=
);
-my @share_locations= ("share/mysql", "sql/share", "share");
+my @share_locations= ("share/mariadb", "share/mysql", "sql/share", "share");
sub get_basedir {
=== modified file 'mysql-test/lib/mtr_cases.pm'
--- a/mysql-test/lib/mtr_cases.pm 2009-10-05 12:26:57 +0000
+++ b/mysql-test/lib/mtr_cases.pm 2009-10-14 08:09:56 +0000
@@ -490,6 +490,8 @@ sub collect_one_suite($)
my $lib_innodb_plugin=
mtr_file_exists(::vs_config_dirs('storage/innodb_plugin', 'ha_innodb_plugin.dll'),
"$::basedir/storage/innodb_plugin/.libs/ha_innodb_plugin.so",
+ "$::basedir/lib/mariadb/plugin/ha_innodb_plugin.so",
+ "$::basedir/lib/mariadb/plugin/ha_innodb_plugin.dll",
"$::basedir/lib/mysql/plugin/ha_innodb_plugin.so",
"$::basedir/lib/mysql/plugin/ha_innodb_plugin.dll");
if ($::mysql_version_id >= 50100 && !(IS_WINDOWS && $::opt_embedded_server) &&
@@ -1094,6 +1096,17 @@ sub collect_one_test_case {
$tinfo->{template_path}= $config;
}
+ if ( $tinfo->{'example_plugin_test'} )
+ {
+ if ( !$ENV{'EXAMPLE_PLUGIN'} )
+ {
+ $tinfo->{'skip'}= 1;
+ $tinfo->{'comment'}= "Test requires the 'example' plugin";
+ return $tinfo;
+ }
+ }
+
+
# Set extra config file to use
if (defined $defaults_extra_file) {
$tinfo->{extra_template_path}= $defaults_extra_file;
@@ -1146,6 +1159,7 @@ my @tags=
["federated.inc", "federated_test", 1],
["include/not_embedded.inc", "not_embedded", 1],
["include/not_valgrind.inc", "not_valgrind", 1],
+ ["include/have_example_plugin.inc", "example_plugin_test", 1]
);
=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl 2009-10-15 21:38:29 +0000
+++ b/mysql-test/mysql-test-run.pl 2009-10-15 21:52:31 +0000
@@ -1018,7 +1018,8 @@ sub command_line_setup {
}
# Look for language files and charsetsdir, use same share
- $path_language= mtr_path_exists("$basedir/share/mysql/english",
+ $path_language= mtr_path_exists("$basedir/share/mariadb/english",
+ "$basedir/share/mysql/english",
"$basedir/sql/share/english",
"$basedir/share/english");
@@ -1887,6 +1888,7 @@ sub environment_setup {
my $lib_udf_example=
mtr_file_exists(vs_config_dirs('sql', 'udf_example.dll'),
"$basedir/sql/.libs/udf_example.so",
+ "$basedir/lib/mariadb/plugin/udf_example.so",
"$basedir/lib/mysql/plugin/udf_example.so",);
if ( $lib_udf_example )
@@ -1915,6 +1917,7 @@ sub environment_setup {
my $lib_example_plugin=
mtr_file_exists(vs_config_dirs('storage/example',$plugin_filename),
"$basedir/storage/example/.libs/".$plugin_filename,
+ "$basedir/lib/mariadb/plugin/".$plugin_filename,
"$basedir/lib/mysql/plugin/".$plugin_filename);
$ENV{'EXAMPLE_PLUGIN'}=
($lib_example_plugin ? basename($lib_example_plugin) : "");
@@ -1931,6 +1934,7 @@ sub environment_setup {
my $lib_simple_parser=
mtr_file_exists(vs_config_dirs('plugin/fulltext', 'mypluglib.dll'),
"$basedir/plugin/fulltext/.libs/mypluglib.so",
+ "$basedir/lib/mariadb/plugin/mypluglib.so",
"$basedir/lib/mysql/plugin/mypluglib.so",);
$ENV{'SIMPLE_PARSER'}=
@@ -2074,6 +2078,7 @@ sub environment_setup {
my $file_mysql_fix_privilege_tables=
mtr_file_exists("$basedir/scripts/mysql_fix_privilege_tables.sql",
"$basedir/share/mysql_fix_privilege_tables.sql",
+ "$basedir/share/mariadb/mysql_fix_privilege_tables.sql",
"$basedir/share/mysql/mysql_fix_privilege_tables.sql");
$ENV{'MYSQL_FIX_PRIVILEGE_TABLES'}= $file_mysql_fix_privilege_tables;
@@ -2826,7 +2831,7 @@ sub mysql_install_db {
mtr_add_arg($args, "--basedir=%s", $install_basedir);
mtr_add_arg($args, "--datadir=%s", $install_datadir);
mtr_add_arg($args, "--loose-skip-innodb");
- mtr_add_arg($args, "--loose-skip-falcon");
+ mtr_add_arg($args, "--loose-skip-pbxt");
mtr_add_arg($args, "--loose-skip-ndbcluster");
mtr_add_arg($args, "--loose-skip-maria");
mtr_add_arg($args, "--disable-sync-frm");
@@ -2870,8 +2875,8 @@ sub mysql_install_db {
my $bootstrap_sql_file= "$opt_vardir/tmp/bootstrap.sql";
my $path_sql= my_find_file($install_basedir,
- ["mysql", "sql/share", "share/mysql",
- "share", "scripts"],
+ ["mysql", "sql/share", "share/mariadb",
+ "share/mysql", "share", "scripts"],
"mysql_system_tables.sql",
NOT_REQUIRED);
=== added file 'mysql-test/r/mysqltest_ps.result'
--- a/mysql-test/r/mysqltest_ps.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/mysqltest_ps.result 2009-10-09 08:09:24 +0000
@@ -0,0 +1,40 @@
+select 1 + "2 a";
+1 + "2 a"
+3
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: '2 a'
+create table t (a int primary key, b blob default '');
+Warnings:
+Warning 1101 BLOB/TEXT column 'b' can't have a default value
+select a, (2*a) AS a from t group by a;
+a a
+Warnings:
+Warning 1052 Column 'a' in group statement is ambiguous
+drop table t;
+select 1 + "2 a";
+1 + "2 a"
+3
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: '2 a'
+create table t (a int primary key, b blob default '');
+Warnings:
+Warning 1101 BLOB/TEXT column 'b' can't have a default value
+select a, (2*a) AS a from t group by a;
+a a
+Warnings:
+Warning 1052 Column 'a' in group statement is ambiguous
+Warning 1052 Column 'a' in group statement is ambiguous
+drop table t;
+select 1 + "2 a";
+1 + "2 a"
+3
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: '2 a'
+create table t (a int primary key, b blob default '');
+Warnings:
+Warning 1101 BLOB/TEXT column 'b' can't have a default value
+select a, (2*a) AS a from t group by a;
+a a
+Warnings:
+Warning 1052 Column 'a' in group statement is ambiguous
+drop table t;
=== modified file 'mysql-test/r/read_many_rows_innodb.result'
--- a/mysql-test/r/read_many_rows_innodb.result 2007-08-05 05:36:54 +0000
+++ b/mysql-test/r/read_many_rows_innodb.result 2009-10-11 09:06:55 +0000
@@ -40,8 +40,8 @@ ON t1 FOR EACH ROW
BEGIN
DECLARE CONTINUE HANDLER FOR SQLSTATE '40001' SET @a:= 'deadlock';
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET @a:= 'exception';
-INSERT INTO t2 (f2) VALUES (1);
-DELETE FROM t2 WHERE f2 = 1;
+INSERT INTO t2 (f2) VALUES (NEW.f1);
+DELETE FROM t2 WHERE f2 = NEW.f1;
END;|
CREATE PROCEDURE proc24989()
BEGIN
@@ -63,7 +63,7 @@ insert into t1 values(1);
start transaction;
insert into t2 values(123);
insert into t1 values(1);
-insert into t1 values(1);
+insert into t1 values(123);
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
select @a;
@a
@@ -76,7 +76,7 @@ insert into t1 values(1);
start transaction;
insert into t2 values(123);
call proc24989();
-insert into t1 values(1);
+insert into t1 values(123);
select @a,@b;
@a @b
exception deadlock
@@ -88,7 +88,7 @@ insert into t1 values(1);
start transaction;
insert into t2 values(123);
call proc24989_2();
-insert into t1 values(1);
+insert into t1 values(123);
commit;
exception
Outer handler
=== modified file 'mysql-test/suite/funcs_1/datadict/processlist_priv.inc'
--- a/mysql-test/suite/funcs_1/datadict/processlist_priv.inc 2009-09-07 20:50:10 +0000
+++ b/mysql-test/suite/funcs_1/datadict/processlist_priv.inc 2009-10-10 09:59:06 +0000
@@ -66,7 +66,7 @@
let $table= processlist;
#
# columns of the information_schema table e.g. to use in a select.
-let $columns= ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO;
+let $columns= ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS;
#
# Where clause for an update.
let $update_where= WHERE id=1 ;
@@ -137,11 +137,11 @@ WHERE DB = 'information_schema' AND COMM
--source include/wait_condition.inc
--replace_result ENGINE=MyISAM "" ENGINE=MARIA "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
eval SHOW CREATE TABLE $table;
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
eval SHOW $table;
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
eval SELECT * FROM $table $select_where ORDER BY id;
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
eval SELECT $columns FROM $table $select_where ORDER BY id;
--source suite/funcs_1/datadict/datadict_priv.inc
--real_sleep 0.3
@@ -157,11 +157,11 @@ connection con100;
# but "ddicttestuser1" must not see anything of the root session.
--replace_result ENGINE=MyISAM "" ENGINE=MARIA "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
eval SHOW CREATE TABLE $table;
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
eval SHOW $table;
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
eval SELECT * FROM $table $select_where ORDER BY id;
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
eval SELECT $columns FROM $table $select_where ORDER BY id;
--source suite/funcs_1/datadict/datadict_priv.inc
--real_sleep 0.3
@@ -183,9 +183,9 @@ GRANT PROCESS ON *.* TO ddicttestuser1@'
--echo ####################################################################################
connection con100;
SHOW GRANTS;
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist;
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SELECT * FROM information_schema.processlist;
--real_sleep 0.3
@@ -195,9 +195,9 @@ SELECT * FROM information_schema.process
--echo ####################################################################################
connect (con101,localhost,ddicttestuser1,ddictpass,information_schema);
SHOW GRANTS;
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist;
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SELECT * FROM information_schema.processlist;
--real_sleep 0.3
@@ -217,9 +217,9 @@ GRANT PROCESS ON *.* TO ''@'localhost';
--echo ####################################################################################
connect (anonymous1,localhost,"''",,information_schema);
SHOW GRANTS;
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist;
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SELECT * FROM information_schema.processlist;
--real_sleep 0.3
@@ -239,9 +239,9 @@ connect (con102,localhost,ddicttestuser1
--echo ddicttestuser1 are visible.
--echo ####################################################################################
SHOW GRANTS;
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist;
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SELECT * FROM information_schema.processlist;
--real_sleep 0.3
@@ -264,10 +264,10 @@ SHOW GRANTS FOR ''@'localhost';
if ($fixed_bug_30395)
{
# Bug#30395 strange results after REVOKE PROCESS ON *.* FROM ...
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist;
}
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SELECT * FROM information_schema.processlist;
--real_sleep 0.3
@@ -286,9 +286,9 @@ connect (con103,localhost,ddicttestuser1
--echo Only the processes of ddicttestuser1 user are visible.
--echo ####################################################################################
SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist;
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SELECT * FROM information_schema.processlist;
--real_sleep 0.3
@@ -308,9 +308,9 @@ connect (con104,localhost,ddicttestuser1
--echo Only the processes of ddicttestuser1 are visible.
--echo ####################################################################################
SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist;
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SELECT * FROM information_schema.processlist;
--real_sleep 0.3
@@ -355,9 +355,9 @@ connect (con200,localhost,ddicttestuser2
--echo ddicttestuser2 has now the PROCESS privilege and sees all connections
--echo ####################################################################################
SHOW GRANTS FOR 'ddicttestuser2'@'localhost';
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist;
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SELECT * FROM information_schema.processlist;
--real_sleep 0.3
@@ -376,9 +376,9 @@ connect (con201,localhost,ddicttestuser2
--echo ddicttestuser2 has no more the PROCESS privilege and can only see own connects
--echo ####################################################################################
SHOW GRANTS;
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist;
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SELECT * FROM information_schema.processlist;
--real_sleep 0.3
@@ -399,9 +399,9 @@ connect (con107,localhost,ddicttestuser1
SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
--error ER_ACCESS_DENIED_ERROR
GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost';
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist;
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SELECT * FROM information_schema.processlist;
--real_sleep 0.3
@@ -423,9 +423,9 @@ connect (con108,localhost,ddicttestuser1
--echo Therefore the missing SELECT privilege does not affect SELECTs on PROCESSLIST.
--echo ####################################################################################
SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist;
---replace_column 1 ID 3 HOST_NAME 6 TIME
+--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SELECT * FROM information_schema.processlist;
--real_sleep 0.3
=== modified file 'mysql-test/suite/funcs_1/datadict/processlist_val.inc'
--- a/mysql-test/suite/funcs_1/datadict/processlist_val.inc 2008-10-10 15:28:41 +0000
+++ b/mysql-test/suite/funcs_1/datadict/processlist_val.inc 2009-10-10 09:59:06 +0000
@@ -93,9 +93,9 @@ echo
# - INFO must contain the corresponding SHOW/SELECT PROCESSLIST
#
# 1. Just dump what we get
---replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME>
+--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS>
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
---replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME>
+--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS>
SHOW FULL PROCESSLIST;
#
# Determine the connection id of the current connection (default)
@@ -129,7 +129,7 @@ SELECT @my_info = '$my_statement'
# 6. TIME must have a reasonable value
SELECT COUNT(*) = 1 AS "Has TIME a reasonable value?"
FROM INFORMATION_SCHEMA.PROCESSLIST
-WHERE ID = @default_id AND 0 <= TIME < 10;
+WHERE ID = @default_id AND 0 <= TIME < 10 AND 0 <= TIME_MS < 10000;
echo
@@ -166,7 +166,7 @@ let $wait_condition= SELECT COUNT(*) = 1
WHERE COMMAND = 'Sleep' AND USER = 'test_user';
--source include/wait_condition.inc
# 1. Just dump what we get
---replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME>
+--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS>
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME>
SHOW FULL PROCESSLIST;
@@ -211,7 +211,7 @@ echo
# ----- switch to connection con1 (user = test_user) -----
;
connection con1;
---replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME>
+--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS>
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME>
SHOW FULL PROCESSLIST;
@@ -245,7 +245,7 @@ echo
;
connection con2;
# Just dump what we get
---replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME>
+--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS>
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME>
SHOW FULL PROCESSLIST;
@@ -305,7 +305,7 @@ WHERE ID = @test_user_con2_id AND Comman
AND State = 'User sleep' AND INFO IS NOT NULL ;
--source include/wait_condition.inc
# 1. Just dump what we get
---replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME>
+--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS>
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME>
SHOW FULL PROCESSLIST;
@@ -376,7 +376,7 @@ let $wait_condition= SELECT COUNT(*) FRO
#
# Expect to see the state 'Locked' for the third connection because the SELECT
# collides with the WRITE TABLE LOCK.
---replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME>
+--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS>
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
UNLOCK TABLES;
#
@@ -435,7 +435,7 @@ echo
# SHOW FULL PROCESSLIST Complete statement
# SHOW PROCESSLIST statement truncated after 100 char
;
---replace_column 1 <ID> 3 <HOST_NAME> 5 <COMMAND> 6 <TIME> 7 <STATE>
+--replace_column 1 <ID> 3 <HOST_NAME> 5 <COMMAND> 6 <TIME> 7 <STATE> 9 <TIME_MS>
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
--replace_column 1 <ID> 3 <HOST_NAME> 5 <COMMAND> 6 <TIME> 7 <STATE>
SHOW FULL PROCESSLIST;
=== modified file 'mysql-test/suite/funcs_1/r/is_columns_is.result'
--- a/mysql-test/suite/funcs_1/r/is_columns_is.result 2009-03-18 12:52:31 +0000
+++ b/mysql-test/suite/funcs_1/r/is_columns_is.result 2009-10-10 09:59:06 +0000
@@ -113,6 +113,96 @@ NULL information_schema GLOBAL_STATUS VA
NULL information_schema GLOBAL_STATUS VARIABLE_VALUE 2 NULL YES varchar 1024 3072 NULL NULL utf8 utf8_general_ci varchar(1024) select
NULL information_schema GLOBAL_VARIABLES VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema GLOBAL_VARIABLES VARIABLE_VALUE 2 NULL YES varchar 1024 3072 NULL NULL utf8 utf8_general_ci varchar(1024) select
+NULL information_schema INNODB_BUFFER_POOL_PAGES fix_count 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES flush_type 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES lru_position 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES page_no 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES page_type 1 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
+NULL information_schema INNODB_BUFFER_POOL_PAGES space_id 2 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB compressed 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB fix_count 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB flush_type 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB lru_position 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB next_page_no 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB page_no 2 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB part_len 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB space_id 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX accessed 9 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX data_size 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX dirty 11 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX fix_count 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX flush_type 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX hashed 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX index_name 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX lru_position 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX modified 10 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX n_recs 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX old 12 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX page_no 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX schema_name 1 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX space_id 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX table_name 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
+NULL information_schema INNODB_CMP compress_ops 2 0 NO int NULL NULL 10 0 NULL NULL int(11) select
+NULL information_schema INNODB_CMP compress_ops_ok 3 0 NO int NULL NULL 10 0 NULL NULL int(11) select
+NULL information_schema INNODB_CMP compress_time 4 0 NO int NULL NULL 10 0 NULL NULL int(11) select
+NULL information_schema INNODB_CMP page_size 1 0 NO int NULL NULL 10 0 NULL NULL int(5) select
+NULL information_schema INNODB_CMP uncompress_ops 5 0 NO int NULL NULL 10 0 NULL NULL int(11) select
+NULL information_schema INNODB_CMP uncompress_time 6 0 NO int NULL NULL 10 0 NULL NULL int(11) select
+NULL information_schema INNODB_CMPMEM pages_free 3 0 NO int NULL NULL 10 0 NULL NULL int(11) select
+NULL information_schema INNODB_CMPMEM pages_used 2 0 NO int NULL NULL 10 0 NULL NULL int(11) select
+NULL information_schema INNODB_CMPMEM page_size 1 0 NO int NULL NULL 10 0 NULL NULL int(5) select
+NULL information_schema INNODB_CMPMEM relocation_ops 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select
+NULL information_schema INNODB_CMPMEM relocation_time 5 0 NO int NULL NULL 10 0 NULL NULL int(11) select
+NULL information_schema INNODB_CMPMEM_RESET pages_free 3 0 NO int NULL NULL 10 0 NULL NULL int(11) select
+NULL information_schema INNODB_CMPMEM_RESET pages_used 2 0 NO int NULL NULL 10 0 NULL NULL int(11) select
+NULL information_schema INNODB_CMPMEM_RESET page_size 1 0 NO int NULL NULL 10 0 NULL NULL int(5) select
+NULL information_schema INNODB_CMPMEM_RESET relocation_ops 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select
+NULL information_schema INNODB_CMPMEM_RESET relocation_time 5 0 NO int NULL NULL 10 0 NULL NULL int(11) select
+NULL information_schema INNODB_CMP_RESET compress_ops 2 0 NO int NULL NULL 10 0 NULL NULL int(11) select
+NULL information_schema INNODB_CMP_RESET compress_ops_ok 3 0 NO int NULL NULL 10 0 NULL NULL int(11) select
+NULL information_schema INNODB_CMP_RESET compress_time 4 0 NO int NULL NULL 10 0 NULL NULL int(11) select
+NULL information_schema INNODB_CMP_RESET page_size 1 0 NO int NULL NULL 10 0 NULL NULL int(5) select
+NULL information_schema INNODB_CMP_RESET uncompress_ops 5 0 NO int NULL NULL 10 0 NULL NULL int(11) select
+NULL information_schema INNODB_CMP_RESET uncompress_time 6 0 NO int NULL NULL 10 0 NULL NULL int(11) select
+NULL information_schema INNODB_INDEX_STATS fields 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_INDEX_STATS index_name 2 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
+NULL information_schema INNODB_INDEX_STATS index_size 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_INDEX_STATS leaf_pages 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_INDEX_STATS row_per_keys 4 NO varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select
+NULL information_schema INNODB_INDEX_STATS table_name 1 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
+NULL information_schema INNODB_LOCKS lock_data 10 NULL YES varchar 8192 24576 NULL NULL utf8 utf8_general_ci varchar(8192) select
+NULL information_schema INNODB_LOCKS lock_id 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
+NULL information_schema INNODB_LOCKS lock_index 6 NULL YES varchar 1024 3072 NULL NULL utf8 utf8_general_ci varchar(1024) select
+NULL information_schema INNODB_LOCKS lock_mode 3 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
+NULL information_schema INNODB_LOCKS lock_page 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_LOCKS lock_rec 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_LOCKS lock_space 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_LOCKS lock_table 5 NO varchar 1024 3072 NULL NULL utf8 utf8_general_ci varchar(1024) select
+NULL information_schema INNODB_LOCKS lock_trx_id 2 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
+NULL information_schema INNODB_LOCKS lock_type 4 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
+NULL information_schema INNODB_LOCK_WAITS blocking_lock_id 4 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
+NULL information_schema INNODB_LOCK_WAITS blocking_trx_id 3 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
+NULL information_schema INNODB_LOCK_WAITS requested_lock_id 2 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
+NULL information_schema INNODB_LOCK_WAITS requesting_trx_id 1 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
+NULL information_schema INNODB_RSEG curr_size 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_RSEG max_size 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_RSEG page_no 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_RSEG rseg_id 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_RSEG space_id 2 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_RSEG zip_size 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_TABLE_STATS clust_size 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_TABLE_STATS modified 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_TABLE_STATS other_size 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_TABLE_STATS rows 2 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_TABLE_STATS table_name 1 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
+NULL information_schema INNODB_TRX trx_id 1 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
+NULL information_schema INNODB_TRX trx_mysql_thread_id 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_TRX trx_query 8 NULL YES varchar 1024 3072 NULL NULL utf8 utf8_general_ci varchar(1024) select
+NULL information_schema INNODB_TRX trx_requested_lock_id 4 NULL YES varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
+NULL information_schema INNODB_TRX trx_started 3 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
+NULL information_schema INNODB_TRX trx_state 2 NO varchar 13 39 NULL NULL utf8 utf8_general_ci varchar(13) select
+NULL information_schema INNODB_TRX trx_wait_started 5 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
+NULL information_schema INNODB_TRX trx_weight 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select
NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -150,6 +240,9 @@ NULL information_schema PARTITIONS TABLE
NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema PARTITIONS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
+NULL information_schema PBXT_STATISTICS ID 1 0 NO int NULL NULL 10 0 NULL NULL int(4) select
+NULL information_schema PBXT_STATISTICS Name 2 NO varchar 40 120 NULL NULL utf8 utf8_general_ci varchar(40) select
+NULL information_schema PBXT_STATISTICS Value 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(8) select
NULL information_schema PLUGINS PLUGIN_AUTHOR 8 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema PLUGINS PLUGIN_DESCRIPTION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema PLUGINS PLUGIN_LIBRARY 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -167,6 +260,7 @@ NULL information_schema PROCESSLIST ID 1
NULL information_schema PROCESSLIST INFO 8 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
NULL information_schema PROCESSLIST STATE 7 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema PROCESSLIST TIME 6 0 NO int NULL NULL 10 0 NULL NULL int(7) select
+NULL information_schema PROCESSLIST TIME_MS 9 0.000 NO decimal NULL NULL 22 3 NULL NULL decimal(22,3) select
NULL information_schema PROCESSLIST USER 2 NO varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select
NULL information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select
NULL information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
@@ -300,6 +394,10 @@ NULL information_schema VIEWS TABLE_CATA
NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
+NULL information_schema XTRADB_ENHANCEMENTS comment 3 NO varchar 100 300 NULL NULL utf8 utf8_general_ci varchar(100) select
+NULL information_schema XTRADB_ENHANCEMENTS description 2 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select
+NULL information_schema XTRADB_ENHANCEMENTS link 4 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select
+NULL information_schema XTRADB_ENHANCEMENTS name 1 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select
##########################################################################
# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
##########################################################################
@@ -340,6 +438,7 @@ ORDER BY CHARACTER_SET_NAME, COLLATION_N
COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
NULL bigint NULL NULL
NULL datetime NULL NULL
+NULL decimal NULL NULL
NULL int NULL NULL
--> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values
--> are 0, which is intended behavior, and the result of 0 / 0 IS NULL
@@ -468,6 +567,96 @@ NULL information_schema FILES CHECKSUM b
3.0000 information_schema GLOBAL_STATUS VARIABLE_VALUE varchar 1024 3072 utf8 utf8_general_ci varchar(1024)
3.0000 information_schema GLOBAL_VARIABLES VARIABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema GLOBAL_VARIABLES VARIABLE_VALUE varchar 1024 3072 utf8 utf8_general_ci varchar(1024)
+3.0000 information_schema INNODB_BUFFER_POOL_PAGES page_type varchar 64 192 utf8 utf8_general_ci varchar(64)
+NULL information_schema INNODB_BUFFER_POOL_PAGES space_id bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_BUFFER_POOL_PAGES page_no bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_BUFFER_POOL_PAGES lru_position bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_BUFFER_POOL_PAGES fix_count bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_BUFFER_POOL_PAGES flush_type bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB space_id bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB page_no bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB compressed bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB part_len bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB next_page_no bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB lru_position bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB fix_count bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB flush_type bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema INNODB_BUFFER_POOL_PAGES_INDEX schema_name varchar 64 192 utf8 utf8_general_ci varchar(64)
+3.0000 information_schema INNODB_BUFFER_POOL_PAGES_INDEX table_name varchar 64 192 utf8 utf8_general_ci varchar(64)
+3.0000 information_schema INNODB_BUFFER_POOL_PAGES_INDEX index_name varchar 64 192 utf8 utf8_general_ci varchar(64)
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX space_id bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX page_no bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX n_recs bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX data_size bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX hashed bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX accessed bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX modified bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX dirty bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX old bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX lru_position bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX fix_count bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX flush_type bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_CMP page_size int NULL NULL NULL NULL int(5)
+NULL information_schema INNODB_CMP compress_ops int NULL NULL NULL NULL int(11)
+NULL information_schema INNODB_CMP compress_ops_ok int NULL NULL NULL NULL int(11)
+NULL information_schema INNODB_CMP compress_time int NULL NULL NULL NULL int(11)
+NULL information_schema INNODB_CMP uncompress_ops int NULL NULL NULL NULL int(11)
+NULL information_schema INNODB_CMP uncompress_time int NULL NULL NULL NULL int(11)
+NULL information_schema INNODB_CMPMEM page_size int NULL NULL NULL NULL int(5)
+NULL information_schema INNODB_CMPMEM pages_used int NULL NULL NULL NULL int(11)
+NULL information_schema INNODB_CMPMEM pages_free int NULL NULL NULL NULL int(11)
+NULL information_schema INNODB_CMPMEM relocation_ops bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema INNODB_CMPMEM relocation_time int NULL NULL NULL NULL int(11)
+NULL information_schema INNODB_CMPMEM_RESET page_size int NULL NULL NULL NULL int(5)
+NULL information_schema INNODB_CMPMEM_RESET pages_used int NULL NULL NULL NULL int(11)
+NULL information_schema INNODB_CMPMEM_RESET pages_free int NULL NULL NULL NULL int(11)
+NULL information_schema INNODB_CMPMEM_RESET relocation_ops bigint NULL NULL NULL NULL bigint(21)
+NULL information_schema INNODB_CMPMEM_RESET relocation_time int NULL NULL NULL NULL int(11)
+NULL information_schema INNODB_CMP_RESET page_size int NULL NULL NULL NULL int(5)
+NULL information_schema INNODB_CMP_RESET compress_ops int NULL NULL NULL NULL int(11)
+NULL information_schema INNODB_CMP_RESET compress_ops_ok int NULL NULL NULL NULL int(11)
+NULL information_schema INNODB_CMP_RESET compress_time int NULL NULL NULL NULL int(11)
+NULL information_schema INNODB_CMP_RESET uncompress_ops int NULL NULL NULL NULL int(11)
+NULL information_schema INNODB_CMP_RESET uncompress_time int NULL NULL NULL NULL int(11)
+3.0000 information_schema INNODB_INDEX_STATS table_name varchar 192 576 utf8 utf8_general_ci varchar(192)
+3.0000 information_schema INNODB_INDEX_STATS index_name varchar 192 576 utf8 utf8_general_ci varchar(192)
+NULL information_schema INNODB_INDEX_STATS fields bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema INNODB_INDEX_STATS row_per_keys varchar 256 768 utf8 utf8_general_ci varchar(256)
+NULL information_schema INNODB_INDEX_STATS index_size bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_INDEX_STATS leaf_pages bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema INNODB_LOCKS lock_id varchar 81 243 utf8 utf8_general_ci varchar(81)
+3.0000 information_schema INNODB_LOCKS lock_trx_id varchar 18 54 utf8 utf8_general_ci varchar(18)
+3.0000 information_schema INNODB_LOCKS lock_mode varchar 32 96 utf8 utf8_general_ci varchar(32)
+3.0000 information_schema INNODB_LOCKS lock_type varchar 32 96 utf8 utf8_general_ci varchar(32)
+3.0000 information_schema INNODB_LOCKS lock_table varchar 1024 3072 utf8 utf8_general_ci varchar(1024)
+3.0000 information_schema INNODB_LOCKS lock_index varchar 1024 3072 utf8 utf8_general_ci varchar(1024)
+NULL information_schema INNODB_LOCKS lock_space bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_LOCKS lock_page bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_LOCKS lock_rec bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema INNODB_LOCKS lock_data varchar 8192 24576 utf8 utf8_general_ci varchar(8192)
+3.0000 information_schema INNODB_LOCK_WAITS requesting_trx_id varchar 18 54 utf8 utf8_general_ci varchar(18)
+3.0000 information_schema INNODB_LOCK_WAITS requested_lock_id varchar 81 243 utf8 utf8_general_ci varchar(81)
+3.0000 information_schema INNODB_LOCK_WAITS blocking_trx_id varchar 18 54 utf8 utf8_general_ci varchar(18)
+3.0000 information_schema INNODB_LOCK_WAITS blocking_lock_id varchar 81 243 utf8 utf8_general_ci varchar(81)
+NULL information_schema INNODB_RSEG rseg_id bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_RSEG space_id bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_RSEG zip_size bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_RSEG page_no bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_RSEG max_size bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_RSEG curr_size bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema INNODB_TABLE_STATS table_name varchar 192 576 utf8 utf8_general_ci varchar(192)
+NULL information_schema INNODB_TABLE_STATS rows bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_TABLE_STATS clust_size bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_TABLE_STATS other_size bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_TABLE_STATS modified bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema INNODB_TRX trx_id varchar 18 54 utf8 utf8_general_ci varchar(18)
+3.0000 information_schema INNODB_TRX trx_state varchar 13 39 utf8 utf8_general_ci varchar(13)
+NULL information_schema INNODB_TRX trx_started datetime NULL NULL NULL NULL datetime
+3.0000 information_schema INNODB_TRX trx_requested_lock_id varchar 81 243 utf8 utf8_general_ci varchar(81)
+NULL information_schema INNODB_TRX trx_wait_started datetime NULL NULL NULL NULL datetime
+NULL information_schema INNODB_TRX trx_weight bigint NULL NULL NULL NULL bigint(21) unsigned
+NULL information_schema INNODB_TRX trx_mysql_thread_id bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema INNODB_TRX trx_query varchar 1024 3072 utf8 utf8_general_ci varchar(1024)
3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
@@ -505,6 +694,9 @@ NULL information_schema PARTITIONS CHECK
3.0000 information_schema PARTITIONS PARTITION_COMMENT varchar 80 240 utf8 utf8_general_ci varchar(80)
3.0000 information_schema PARTITIONS NODEGROUP varchar 12 36 utf8 utf8_general_ci varchar(12)
3.0000 information_schema PARTITIONS TABLESPACE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
+NULL information_schema PBXT_STATISTICS ID int NULL NULL NULL NULL int(4)
+3.0000 information_schema PBXT_STATISTICS Name varchar 40 120 utf8 utf8_general_ci varchar(40)
+NULL information_schema PBXT_STATISTICS Value bigint NULL NULL NULL NULL bigint(8)
3.0000 information_schema PLUGINS PLUGIN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema PLUGINS PLUGIN_VERSION varchar 20 60 utf8 utf8_general_ci varchar(20)
3.0000 information_schema PLUGINS PLUGIN_STATUS varchar 10 30 utf8 utf8_general_ci varchar(10)
@@ -523,6 +715,7 @@ NULL information_schema PROCESSLIST ID b
NULL information_schema PROCESSLIST TIME int NULL NULL NULL NULL int(7)
3.0000 information_schema PROCESSLIST STATE varchar 64 192 utf8 utf8_general_ci varchar(64)
1.0000 information_schema PROCESSLIST INFO longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
+NULL information_schema PROCESSLIST TIME_MS decimal NULL NULL NULL NULL decimal(22,3)
3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
@@ -655,3 +848,7 @@ NULL information_schema TRIGGERS CREATED
3.0000 information_schema VIEWS SECURITY_TYPE varchar 7 21 utf8 utf8_general_ci varchar(7)
3.0000 information_schema VIEWS CHARACTER_SET_CLIENT varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema VIEWS COLLATION_CONNECTION varchar 32 96 utf8 utf8_general_ci varchar(32)
+3.0000 information_schema XTRADB_ENHANCEMENTS name varchar 255 765 utf8 utf8_general_ci varchar(255)
+3.0000 information_schema XTRADB_ENHANCEMENTS description varchar 255 765 utf8 utf8_general_ci varchar(255)
+3.0000 information_schema XTRADB_ENHANCEMENTS comment varchar 100 300 utf8 utf8_general_ci varchar(100)
+3.0000 information_schema XTRADB_ENHANCEMENTS link varchar 255 765 utf8 utf8_general_ci varchar(255)
=== modified file 'mysql-test/suite/funcs_1/r/is_tables_is.result'
--- a/mysql-test/suite/funcs_1/r/is_tables_is.result 2008-10-10 15:28:41 +0000
+++ b/mysql-test/suite/funcs_1/r/is_tables_is.result 2009-10-10 09:59:06 +0000
@@ -245,6 +245,305 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
+TABLE_NAME INNODB_BUFFER_POOL_PAGES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME INNODB_BUFFER_POOL_PAGES_BLOB
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME INNODB_BUFFER_POOL_PAGES_INDEX
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME INNODB_CMP
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME INNODB_CMPMEM
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME INNODB_CMPMEM_RESET
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME INNODB_CMP_RESET
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME INNODB_INDEX_STATS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME INNODB_LOCKS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME INNODB_LOCK_WAITS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME INNODB_RSEG
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME INNODB_TABLE_STATS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME INNODB_TRX
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
TABLE_NAME KEY_COLUMN_USAGE
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
@@ -268,11 +567,241 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME PARTITIONS
+TABLE_NAME PARTITIONS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME PBXT_STATISTICS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME PLUGINS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME PROCESSLIST
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME REFERENTIAL_CONSTRAINTS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME ROUTINES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME SCHEMATA
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME SCHEMA_PRIVILEGES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME SESSION_STATUS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME SESSION_VARIABLES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME STATISTICS
TABLE_TYPE SYSTEM VIEW
-ENGINE MYISAM_OR_MARIA
+ENGINE MEMORY
VERSION 10
-ROW_FORMAT DYNAMIC_OR_PAGE
+ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -291,11 +820,11 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME PLUGINS
+TABLE_NAME TABLES
TABLE_TYPE SYSTEM VIEW
-ENGINE MYISAM_OR_MARIA
+ENGINE MEMORY
VERSION 10
-ROW_FORMAT DYNAMIC_OR_PAGE
+ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -314,7 +843,53 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME PROCESSLIST
+TABLE_NAME TABLE_CONSTRAINTS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME TABLE_PRIVILEGES
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME TRIGGERS
TABLE_TYPE SYSTEM VIEW
ENGINE MYISAM_OR_MARIA
VERSION 10
@@ -337,7 +912,7 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME REFERENTIAL_CONSTRAINTS
+TABLE_NAME USER_PRIVILEGES
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
@@ -360,7 +935,7 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME ROUTINES
+TABLE_NAME VIEWS
TABLE_TYPE SYSTEM VIEW
ENGINE MYISAM_OR_MARIA
VERSION 10
@@ -383,7 +958,7 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME SCHEMATA
+TABLE_NAME XTRADB_ENHANCEMENTS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
@@ -404,9 +979,26 @@ CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
+DROP USER testuser1@localhost;
+CREATE USER testuser1@localhost;
+GRANT SELECT ON test1.* TO testuser1@localhost;
+# Establish connection testuser1 (user=testuser1)
+SELECT *,
+LEFT( table_comment,
+IF(INSTR(table_comment,'InnoDB free') = 0
+AND INSTR(table_comment,'number_of_replicas') = 0,
+LENGTH(table_comment),
+INSTR(table_comment,'InnoDB free')
++ INSTR(table_comment,'number_of_replicas') - 1))
+AS "user_comment",
+'-----------------------------------------------------' AS "Separator"
+FROM information_schema.tables
+WHERE table_schema = 'information_schema'
+AND table_name <> 'profiling'
+ORDER BY table_schema,table_name;
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME SCHEMA_PRIVILEGES
+TABLE_NAME CHARACTER_SETS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
@@ -429,7 +1021,7 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME SESSION_STATUS
+TABLE_NAME COLLATIONS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
@@ -452,7 +1044,7 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME SESSION_VARIABLES
+TABLE_NAME COLLATION_CHARACTER_SET_APPLICABILITY
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
@@ -475,7 +1067,30 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME STATISTICS
+TABLE_NAME COLUMNS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME COLUMN_PRIVILEGES
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
@@ -498,7 +1113,7 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME TABLES
+TABLE_NAME ENGINES
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
@@ -521,7 +1136,30 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME TABLE_CONSTRAINTS
+TABLE_NAME EVENTS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MYISAM_OR_MARIA
+VERSION 10
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME FILES
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
@@ -544,7 +1182,7 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME TABLE_PRIVILEGES
+TABLE_NAME GLOBAL_STATUS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
@@ -567,11 +1205,11 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME TRIGGERS
+TABLE_NAME GLOBAL_VARIABLES
TABLE_TYPE SYSTEM VIEW
-ENGINE MYISAM_OR_MARIA
+ENGINE MEMORY
VERSION 10
-ROW_FORMAT DYNAMIC_OR_PAGE
+ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -590,7 +1228,7 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME USER_PRIVILEGES
+TABLE_NAME INNODB_BUFFER_POOL_PAGES
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
@@ -613,11 +1251,11 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME VIEWS
+TABLE_NAME INNODB_BUFFER_POOL_PAGES_BLOB
TABLE_TYPE SYSTEM VIEW
-ENGINE MYISAM_OR_MARIA
+ENGINE MEMORY
VERSION 10
-ROW_FORMAT DYNAMIC_OR_PAGE
+ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -634,26 +1272,9 @@ CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
-DROP USER testuser1@localhost;
-CREATE USER testuser1@localhost;
-GRANT SELECT ON test1.* TO testuser1@localhost;
-# Establish connection testuser1 (user=testuser1)
-SELECT *,
-LEFT( table_comment,
-IF(INSTR(table_comment,'InnoDB free') = 0
-AND INSTR(table_comment,'number_of_replicas') = 0,
-LENGTH(table_comment),
-INSTR(table_comment,'InnoDB free')
-+ INSTR(table_comment,'number_of_replicas') - 1))
-AS "user_comment",
-'-----------------------------------------------------' AS "Separator"
-FROM information_schema.tables
-WHERE table_schema = 'information_schema'
-AND table_name <> 'profiling'
-ORDER BY table_schema,table_name;
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME CHARACTER_SETS
+TABLE_NAME INNODB_BUFFER_POOL_PAGES_INDEX
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
@@ -676,7 +1297,7 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME COLLATIONS
+TABLE_NAME INNODB_CMP
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
@@ -699,7 +1320,7 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME COLLATION_CHARACTER_SET_APPLICABILITY
+TABLE_NAME INNODB_CMPMEM
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
@@ -722,11 +1343,11 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME COLUMNS
+TABLE_NAME INNODB_CMPMEM_RESET
TABLE_TYPE SYSTEM VIEW
-ENGINE MYISAM_OR_MARIA
+ENGINE MEMORY
VERSION 10
-ROW_FORMAT DYNAMIC_OR_PAGE
+ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -745,7 +1366,7 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME COLUMN_PRIVILEGES
+TABLE_NAME INNODB_CMP_RESET
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
@@ -768,7 +1389,7 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME ENGINES
+TABLE_NAME INNODB_INDEX_STATS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
@@ -791,11 +1412,11 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME EVENTS
+TABLE_NAME INNODB_LOCKS
TABLE_TYPE SYSTEM VIEW
-ENGINE MYISAM_OR_MARIA
+ENGINE MEMORY
VERSION 10
-ROW_FORMAT DYNAMIC_OR_PAGE
+ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -814,7 +1435,7 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME FILES
+TABLE_NAME INNODB_LOCK_WAITS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
@@ -837,7 +1458,7 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME GLOBAL_STATUS
+TABLE_NAME INNODB_RSEG
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
@@ -860,7 +1481,30 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
-TABLE_NAME GLOBAL_VARIABLES
+TABLE_NAME INNODB_TABLE_STATS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME INNODB_TRX
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
@@ -929,6 +1573,29 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA information_schema
+TABLE_NAME PBXT_STATISTICS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
TABLE_NAME PLUGINS
TABLE_TYPE SYSTEM VIEW
ENGINE MYISAM_OR_MARIA
@@ -1272,6 +1939,29 @@ CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
+TABLE_CATALOG NULL
+TABLE_SCHEMA information_schema
+TABLE_NAME XTRADB_ENHANCEMENTS
+TABLE_TYPE SYSTEM VIEW
+ENGINE MEMORY
+VERSION 10
+ROW_FORMAT Fixed
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_general_ci
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+user_comment
+Separator -----------------------------------------------------
# Switch to connection default and close connection testuser1
DROP USER testuser1@localhost;
DROP DATABASE test1;
=== modified file 'mysql-test/suite/funcs_1/r/is_tables_myisam.result'
--- a/mysql-test/suite/funcs_1/r/is_tables_myisam.result 2008-10-10 15:28:41 +0000
+++ b/mysql-test/suite/funcs_1/r/is_tables_myisam.result 2009-10-10 09:59:06 +0000
@@ -19,287 +19,11 @@ FROM information_schema.tables
WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'
ORDER BY table_schema,table_name;
TABLE_CATALOG NULL
-TABLE_SCHEMA test
+TABLE_SCHEMA test1
TABLE_NAME t1
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment
-Separator -----------------------------------------------------
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME t10
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment
-Separator -----------------------------------------------------
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME t11
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment
-Separator -----------------------------------------------------
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME t2
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment
-Separator -----------------------------------------------------
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME t3
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment
-Separator -----------------------------------------------------
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME t4
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment
-Separator -----------------------------------------------------
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME t7
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment
-Separator -----------------------------------------------------
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME t8
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment
-Separator -----------------------------------------------------
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME t9
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment
-Separator -----------------------------------------------------
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME tb1
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT DYNAMIC_OR_PAGE
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment
-Separator -----------------------------------------------------
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME tb2
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT DYNAMIC_OR_PAGE
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment
-Separator -----------------------------------------------------
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME tb3
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT DYNAMIC_OR_PAGE
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment
-Separator -----------------------------------------------------
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME tb4
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
@@ -319,7 +43,7 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
TABLE_SCHEMA test1
-TABLE_NAME tb2
+TABLE_NAME t2
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
@@ -341,12 +65,12 @@ TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
-TABLE_SCHEMA test4
-TABLE_NAME t6
+TABLE_SCHEMA test2
+TABLE_NAME t1
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -387,218 +111,11 @@ FROM information_schema.tables
WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'
ORDER BY table_schema,table_name;
TABLE_CATALOG NULL
-TABLE_SCHEMA test
+TABLE_SCHEMA test1
TABLE_NAME t1
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment
-Separator -----------------------------------------------------
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME t10
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment
-Separator -----------------------------------------------------
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME t11
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment
-Separator -----------------------------------------------------
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME t2
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment
-Separator -----------------------------------------------------
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME t3
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment
-Separator -----------------------------------------------------
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME t4
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment
-Separator -----------------------------------------------------
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME t7
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment
-Separator -----------------------------------------------------
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME t8
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment
-Separator -----------------------------------------------------
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME t9
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT Fixed
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment
-Separator -----------------------------------------------------
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME tb1
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
@@ -617,54 +134,8 @@ TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME tb2
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT DYNAMIC_OR_PAGE
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment
-Separator -----------------------------------------------------
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME tb3
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT DYNAMIC_OR_PAGE
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment
-Separator -----------------------------------------------------
-TABLE_CATALOG NULL
-TABLE_SCHEMA test
-TABLE_NAME tb4
+TABLE_SCHEMA test1
+TABLE_NAME t2
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
=== modified file 'mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result'
--- a/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result 2009-04-25 10:05:32 +0000
+++ b/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result 2009-10-10 09:59:06 +0000
@@ -29,28 +29,29 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROC
`COMMAND` varchar(16) NOT NULL DEFAULT '',
`TIME` int(7) NOT NULL DEFAULT '0',
`STATE` varchar(64) DEFAULT NULL,
- `INFO` longtext
+ `INFO` longtext,
+ `TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000'
) DEFAULT CHARSET=utf8
SHOW processlist;
Id User Host db Command Time State Info
ID root HOST_NAME information_schema Query TIME NULL SHOW processlist
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
SELECT * FROM processlist ORDER BY id;
-ID USER HOST DB COMMAND TIME STATE INFO
-ID root HOST_NAME information_schema Query TIME executing SELECT * FROM processlist ORDER BY id
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO FROM processlist ORDER BY id;
-ID USER HOST DB COMMAND TIME STATE INFO
-ID root HOST_NAME information_schema Query TIME executing SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO FROM processlist ORDER BY id
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
+ID root HOST_NAME information_schema Query TIME executing SELECT * FROM processlist ORDER BY id TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS FROM processlist ORDER BY id;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
+ID root HOST_NAME information_schema Query TIME executing SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS FROM processlist ORDER BY id TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
CREATE TEMPORARY TABLE test.t_processlist AS SELECT * FROM processlist;
UPDATE test.t_processlist SET user='horst' WHERE id=1 ;
INSERT INTO processlist SELECT * FROM test.t_processlist;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP TABLE test.t_processlist;
-CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO) AS SELECT * FROM processlist WITH CHECK OPTION;
+CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS) AS SELECT * FROM processlist WITH CHECK OPTION;
ERROR HY000: CHECK OPTION on non-updatable view 'test.v_processlist'
-CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO) AS SELECT * FROM processlist;
+CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS) AS SELECT * FROM processlist;
UPDATE test.v_processlist SET TIME=NOW() WHERE id = 1;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
DROP VIEW test.v_processlist;
@@ -99,25 +100,26 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROC
`COMMAND` varchar(16) NOT NULL DEFAULT '',
`TIME` int(7) NOT NULL DEFAULT '0',
`STATE` varchar(64) DEFAULT NULL,
- `INFO` longtext
+ `INFO` longtext,
+ `TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000'
) DEFAULT CHARSET=utf8
SHOW processlist;
Id User Host db Command Time State Info
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist
SELECT * FROM processlist ORDER BY id;
-ID USER HOST DB COMMAND TIME STATE INFO
-ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM processlist ORDER BY id
-SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO FROM processlist ORDER BY id;
-ID USER HOST DB COMMAND TIME STATE INFO
-ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO FROM processlist ORDER BY id
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM processlist ORDER BY id TIME_MS
+SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS FROM processlist ORDER BY id;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS FROM processlist ORDER BY id TIME_MS
CREATE TEMPORARY TABLE test.t_processlist AS SELECT * FROM processlist;
UPDATE test.t_processlist SET user='horst' WHERE id=1 ;
INSERT INTO processlist SELECT * FROM test.t_processlist;
ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
DROP TABLE test.t_processlist;
-CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO) AS SELECT * FROM processlist WITH CHECK OPTION;
+CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS) AS SELECT * FROM processlist WITH CHECK OPTION;
ERROR HY000: CHECK OPTION on non-updatable view 'test.v_processlist'
-CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO) AS SELECT * FROM processlist;
+CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS) AS SELECT * FROM processlist;
UPDATE test.v_processlist SET TIME=NOW() WHERE id = 1;
ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
DROP VIEW test.v_processlist;
@@ -170,8 +172,8 @@ SHOW processlist;
Id User Host db Command Time State Info
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist
SELECT * FROM information_schema.processlist;
-ID USER HOST DB COMMAND TIME STATE INFO
-ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS
####################################################################################
4.2 New connection con101 (ddicttestuser1 with PROCESS privilege)
SHOW/SELECT shows all processes/threads.
@@ -185,10 +187,10 @@ ID root HOST_NAME information_schema Sle
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist
SELECT * FROM information_schema.processlist;
-ID USER HOST DB COMMAND TIME STATE INFO
-ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID root HOST_NAME information_schema Sleep TIME NULL
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
####################################################################################
5 Grant PROCESS privilege to anonymous user.
connection default (user=root)
@@ -209,11 +211,11 @@ ID ddicttestuser1 HOST_NAME information_
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID HOST_NAME information_schema Query TIME NULL SHOW processlist
SELECT * FROM information_schema.processlist;
-ID USER HOST DB COMMAND TIME STATE INFO
-ID HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID root HOST_NAME information_schema Sleep TIME NULL
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
+ID HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
####################################################################################
6 Revoke PROCESS privilege from ddicttestuser1
connection default (user=root)
@@ -233,10 +235,10 @@ ID ddicttestuser1 HOST_NAME information_
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist
SELECT * FROM information_schema.processlist;
-ID USER HOST DB COMMAND TIME STATE INFO
-ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
####################################################################################
7 Revoke PROCESS privilege from anonymous user
connection default (user=root)
@@ -251,9 +253,9 @@ SHOW GRANTS FOR ''@'localhost';
Grants for @localhost
GRANT USAGE ON *.* TO ''@'localhost'
SELECT * FROM information_schema.processlist;
-ID USER HOST DB COMMAND TIME STATE INFO
-ID HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist
-ID HOST_NAME information_schema Sleep TIME NULL
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
+ID HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS
+ID HOST_NAME information_schema Sleep TIME NULL TIME_MS
####################################################################################
8 Grant SUPER (does not imply PROCESS) privilege to ddicttestuser1
connection default (user=root)
@@ -273,11 +275,11 @@ ID ddicttestuser1 HOST_NAME information_
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist
SELECT * FROM information_schema.processlist;
-ID USER HOST DB COMMAND TIME STATE INFO
-ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
####################################################################################
9 Revoke SUPER privilege from user ddicttestuser1
connection default (user=root)
@@ -299,12 +301,12 @@ ID ddicttestuser1 HOST_NAME information_
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist
SELECT * FROM information_schema.processlist;
-ID USER HOST DB COMMAND TIME STATE INFO
-ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
####################################################################################
10 Grant SUPER privilege with grant option to user ddicttestuser1.
connection default (user=root)
@@ -353,18 +355,18 @@ ID ddicttestuser1 HOST_NAME information_
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser2 HOST_NAME information_schema Query TIME NULL SHOW processlist
SELECT * FROM information_schema.processlist;
-ID USER HOST DB COMMAND TIME STATE INFO
-ID ddicttestuser2 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID root HOST_NAME information_schema Sleep TIME NULL
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
+ID ddicttestuser2 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
####################################################################################
11 User ddicttestuser1 revokes PROCESS privilege from user ddicttestuser2
connection ddicttestuser1;
@@ -382,9 +384,9 @@ Id User Host db Command Time State Info
ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser2 HOST_NAME information_schema Query TIME NULL SHOW processlist
SELECT * FROM information_schema.processlist;
-ID USER HOST DB COMMAND TIME STATE INFO
-ID ddicttestuser2 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist
-ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
+ID ddicttestuser2 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS
+ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS
####################################################################################
11.2 Revoke SUPER,PROCESS,GRANT OPTION privilege from user ddicttestuser1
connection default (user=root)
@@ -411,15 +413,15 @@ ID ddicttestuser1 HOST_NAME information_
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist
SELECT * FROM information_schema.processlist;
-ID USER HOST DB COMMAND TIME STATE INFO
-ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
####################################################################################
12 Revoke the SELECT privilege from user ddicttestuser1
connection default (user=root)
@@ -447,16 +449,16 @@ ID ddicttestuser1 HOST_NAME information_
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist
SELECT * FROM information_schema.processlist;
-ID USER HOST DB COMMAND TIME STATE INFO
-ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
-ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Query TIME executing SELECT * FROM information_schema.processlist TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
+ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
####################################################################################
12.2 Revoke only the SELECT privilege on the information_schema from ddicttestuser1.
connection default (user=root)
=== modified file 'mysql-test/suite/funcs_1/r/processlist_val_no_prot.result'
--- a/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result 2009-04-25 10:05:32 +0000
+++ b/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result 2009-10-10 09:59:06 +0000
@@ -19,140 +19,242 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROC
`COMMAND` varchar(16) NOT NULL DEFAULT '',
`TIME` int(7) NOT NULL DEFAULT '0',
`STATE` varchar(64) DEFAULT NULL,
- `INFO` longtext
+ `INFO` longtext,
+ `TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000'
) DEFAULT CHARSET=utf8
-SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST;
-COUNT(*)
-1
-USE test;
+# Ensure that the information about the own connection is correct.
+#--------------------------------------------------------------------------
+
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
-ID USER HOST DB COMMAND TIME STATE INFO
-<ID> root localhost test Query 0 executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
+<ID> root <HOST_NAME> test Query <TIME> executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS>
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info
-<ID> root localhost test Query 0 NULL SHOW FULL PROCESSLIST
+<ID> root <HOST_NAME> test Query <TIME> NULL SHOW FULL PROCESSLIST
+SET @default_id = CONNECTION_ID();
+SELECT COUNT(*) = 1 AS "Expect exact one connection with this id"
+FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ID = @default_id;
+Expect exact one connection with this id
+1
+SELECT COUNT(*) = 1 AS "Expect 1"
+FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ID = @default_id
+AND USER = 'root' AND DB = 'test' AND Command IN('Query','Execute')
+AND State = 'executing';
+Expect 1
+1
USE information_schema;
+SELECT COUNT(*) = 1 AS "Is the DB correct?"
+FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID = @default_id AND DB = 'information_schema';
+Is the DB correct?
+1
+SELECT @my_info := INFO FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID = @default_id;
+@my_info := INFO
+SELECT @my_info := INFO FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID = @default_id
+SELECT @my_info = 'SELECT @my_info := INFO FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID = @default_id'
+ AS 'Is the content of PROCESSLIST.INFO correct?';
+Is the content of PROCESSLIST.INFO correct?
+1
+SELECT COUNT(*) = 1 AS "Has TIME a reasonable value?"
+FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID = @default_id AND 0 <= TIME < 10 AND 0 <= TIME_MS < 10000;
+Has TIME a reasonable value?
+1
+# Ensure that the information about an inactive connection is correct.
+#--------------------------------------------------------------------------
+
+# ----- establish connection con1 (user = test_user) -----
+
+# ----- switch to connection default (user = root) -----
+
+# Poll till the connection con1 is in state COMMAND = 'Sleep'.
+
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
-ID USER HOST DB COMMAND TIME STATE INFO
-<ID> root localhost information_schema Query <TIME> executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
+<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL <TIME_MS>
+<ID> root <HOST_NAME> information_schema Query <TIME> executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS>
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info
-<ID> root localhost information_schema Query <TIME> NULL SHOW FULL PROCESSLIST
-SELECT INFO FROM INFORMATION_SCHEMA.PROCESSLIST;
-INFO
-SELECT INFO FROM INFORMATION_SCHEMA.PROCESSLIST
-SELECT ID INTO @my_proclist_id FROM INFORMATION_SCHEMA.PROCESSLIST;
-
------ establish connection ddicttestuser1 (user = ddicttestuser1) -----
-
------ switch to connection default (user = root) -----
-SELECT @time > 0;
-@time > 0
+<ID> root <HOST_NAME> information_schema Query <TIME> NULL SHOW FULL PROCESSLIST
+<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL
+SELECT ID,TIME INTO @test_user_con1_id,@time FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE COMMAND = 'Sleep' AND USER = 'test_user';
+SELECT @test_user_con1_id = @default_id + 1
+AS "Did we got the next higher PROCESSLIST ID?";
+Did we got the next higher PROCESSLIST ID?
1
-# Sleep some time
-SELECT @time < @time2;
-@time < @time2
+SELECT 0 <= @time < 10 AS "Has TIME a reasonable value?";
+Has TIME a reasonable value?
1
-SELECT ID = @my_proclist_id + 1 FROM INFORMATION_SCHEMA.PROCESSLIST
-WHERE USER = 'ddicttestuser1';
-ID = @my_proclist_id + 1
+SELECT COUNT(*) = 2 AS "Is HOST LIKE 'localhost%'?"
+FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE HOST LIKE 'localhost%';
+Is HOST LIKE 'localhost%'?
1
+SELECT COUNT(*) = 1 AS "Expect 1"
+FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ID = @test_user_con1_id
+AND USER = 'test_user' AND DB = 'information_schema'
+ AND Command = 'Sleep' AND State = '' AND INFO IS NULL;
+Expect 1
+1
+# Ensure that the user test_user sees only connections with his username
+# because he has not the PROCESS privilege.
+#----------------------------------------------------------------------------
+
+# ----- switch to connection con1 (user = test_user) -----
------ switch to connection ddicttestuser1 (user = ddicttestuser1) -----
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
-ID USER HOST DB COMMAND TIME STATE INFO
-<ID> ddicttestuser1 localhost information_schema Query <TIME> executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
+<ID> test_user <HOST_NAME> information_schema Query <TIME> executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS>
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info
-<ID> ddicttestuser1 localhost information_schema Query <TIME> NULL SHOW FULL PROCESSLIST
+<ID> test_user <HOST_NAME> information_schema Query <TIME> NULL SHOW FULL PROCESSLIST
+# Ensure that the user test_user sees all connections with his username.
+#----------------------------------------------------------------------------
+
+----- establish connection con2 (user = test_user) ------
+
+# ----- switch to connection default (user = root) -----
+
+# Poll till all connections of 'test_user' are in a state with COMMAND = 'Sleep'
+
+# ----- switch to connection con2 (user = test_user) -----
------ establish connection con2 (user = ddicttestuser1) ------
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
-ID USER HOST DB COMMAND TIME STATE INFO
-<ID> ddicttestuser1 localhost information_schema Query <TIME> executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
-<ID> ddicttestuser1 localhost information_schema Sleep <TIME> NULL
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
+<ID> test_user <HOST_NAME> information_schema Query <TIME> executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS>
+<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL <TIME_MS>
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info
-<ID> ddicttestuser1 localhost information_schema Sleep <TIME> NULL
-<ID> ddicttestuser1 localhost information_schema Query <TIME> NULL SHOW FULL PROCESSLIST
-
------ switch to connection default (user = root) -----
------ close connection con2 -----
+<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL
+<ID> test_user <HOST_NAME> information_schema Query <TIME> NULL SHOW FULL PROCESSLIST
+# ----- switch to connection default (user = root) -----
------ switch to connection ddicttestuser1 (user = ddicttestuser1) -----
+SELECT ID INTO @test_user_con2_id FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID <> @test_user_con1_id
+AND USER = 'test_user' AND DB = 'information_schema';
+# Ensure we get correct information about a connection during work
+#----------------------------------------------------------------------------
+# ----- switch to connection con2 (user = test_user) -----
# Send a long enough running statement to the server, but do not
-# wait till the result comes back. We will pull this later.
-SELECT sleep(2.5),'Command time';
+# wait till the result comes back.
------ switch to connection default (user = root) -----
-# Sleep some time
-SELECT @time > 0;
-@time > 0
-1
-# Sleep some time
-SELECT @time < @time2;
-@time < @time2
-1
-
------ switch to connection ddicttestuser1 (user = ddicttestuser1) -----
-# Pull("reap") the result set from the statement executed with "send".
-sleep(2.5) Command time
-0 Command time
+SELECT sleep(10), 17;
+# ----- switch to connection default (user = root) -----
+# Poll till connection con2 is in state 'User sleep'.
-# Send a long (21 KB code and runtime = 2 seconds) statement to the server,
-# but do not wait till the result comes back. We will pull this later.
-SELECT sleep(2),'BEGIN this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.END' AS "my_monster_statement";
-
------ switch to connection default (user = root) -----
-# Sleep some time
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
-ID USER HOST DB COMMAND TIME STATE INFO
-<ID> ddicttestuser1 localhost information_schema <COMMAND> <TIME> <STATE> SELECT sleep(2),'BEGIN this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.END' AS "my_monster_statement"
-<ID> root localhost information_schema <COMMAND> <TIME> <STATE> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
+<ID> test_user <HOST_NAME> information_schema Query <TIME> User sleep SELECT sleep(10), 17 <TIME_MS>
+<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL <TIME_MS>
+<ID> root <HOST_NAME> information_schema Query <TIME> executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS>
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info
-<ID> root localhost information_schema <COMMAND> <TIME> <STATE> SHOW FULL PROCESSLIST
-<ID> ddicttestuser1 localhost information_schema <COMMAND> <TIME> <STATE> SELECT sleep(2),'BEGIN this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.END' AS "my_monster_statement"
-SHOW PROCESSLIST;
-Id User Host db Command Time State Info
-<ID> root localhost information_schema <COMMAND> <TIME> <STATE> SHOW PROCESSLIST
-<ID> ddicttestuser1 localhost information_schema <COMMAND> <TIME> <STATE> SELECT sleep(2),'BEGIN this is the representative of a very long statement.this is the representativ
+<ID> root <HOST_NAME> information_schema Query <TIME> NULL SHOW FULL PROCESSLIST
+<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL
+<ID> test_user <HOST_NAME> information_schema Query <TIME> User sleep SELECT sleep(10), 17
+SELECT STATE, TIME, INFO INTO @state, @time, @info
+FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE ID = @test_user_con2_id;
+SELECT 0 <= @time < 10 AS "Has TIME a reasonable value?";
+Has TIME a reasonable value?
+1
+SELECT @state = 'User sleep' AS "Has STATE the expected value?";
+Has STATE the expected value?
+1
+SELECT @info = 'SELECT sleep(10), 17' AS "Has INFO the expected value?";
+Has INFO the expected value?
+1
+# ----- switch to connection con2 (user = testuser) -----
------ switch to connection ddicttestuser1 (user = ddicttestuser1) -----
-# Pull("reap") the result set from the monster statement executed with "send".
-sleep(2) my_monster_statement
-0 BEGIN this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.this is the representative of a very long statement.END
+# Pull("reap") the result set from the statement executed with "send".
+
+sleep(10) 17
+0 17
+# ----- switch to connection default (user = root) -----
+
+# Poll till all connections of 'test_user' are in a state with COMMAND = 'Sleep'
+
+# Ensure that we see that a connection "hangs" when colliding with a
+# WRITE TABLE LOCK
+#----------------------------------------------------------------------------
------ switch to connection default (user = root) -----
LOCK TABLE test.t1 WRITE;
+# ----- switch to connection con2 (user = test_user) -----
------ switch to connection ddicttestuser1 (user = ddicttestuser1) -----
# Send a statement to the server, but do not wait till the result
# comes back. We will pull this later.
+
SELECT COUNT(*) FROM test.t1;
+# ----- switch to connection default (user = root) -----
+
+# Poll till INFO is no more NULL and State = 'Locked'.
------ switch to connection default (user = root) -----
-# Sleep some time
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
-ID USER HOST DB COMMAND TIME STATE INFO
-<ID> ddicttestuser1 localhost information_schema Query <TIME> Locked SELECT COUNT(*) FROM test.t1
-<ID> root localhost information_schema Query <TIME> executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
-SHOW FULL PROCESSLIST;
-Id User Host db Command Time State Info
-<ID> root localhost information_schema Query <TIME> NULL SHOW FULL PROCESSLIST
-<ID> ddicttestuser1 localhost information_schema Query <TIME> Locked SELECT COUNT(*) FROM test.t1
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
+<ID> test_user <HOST_NAME> information_schema Query <TIME> Locked SELECT COUNT(*) FROM test.t1 <TIME_MS>
+<ID> test_user <HOST_NAME> information_schema Sleep <TIME> NULL <TIME_MS>
+<ID> root <HOST_NAME> information_schema Query <TIME> executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS>
UNLOCK TABLES;
+# ----- switch to connection con2 (user = test_user) -----
------ switch to connection ddicttestuser1 (user = ddicttestuser1) -----
# Pull("reap") the result set from the statement executed with "send".
+
COUNT(*)
0
+# Ensure that SHOW/SELECT processlist can handle extreme long commands
+#----------------------------------------------------------------------------
+
+# ----- switch to connection default (user = root) -----
+
+LOCK TABLE test.t1 WRITE;
+# ----- switch to connection con2 (user = test_user) -----
+
+# Send a long (~20 KB code) statement to the server, but do not wait
+# till the result comes back. We will pull this later.
+
+SELECT count(*),'BEGIN-This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.-END' AS "Long string" FROM test.t1;
+# ----- switch to connection default (user = root) -----
+
+# Poll till INFO is no more NULL and State = 'Locked'.
+
+# Expect result:
+# Statement Content of INFO
+# SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST Complete statement
+# SHOW FULL PROCESSLIST Complete statement
+# SHOW PROCESSLIST statement truncated after 100 char
+
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO TIME_MS
+<ID> test_user <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> SELECT count(*),'BEGIN-This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.-END' AS "Long string" FROM test.t1 <TIME_MS>
+<ID> test_user <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> NULL <TIME_MS>
+<ID> root <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST <TIME_MS>
+SHOW FULL PROCESSLIST;
+Id User Host db Command Time State Info
+<ID> root <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> SHOW FULL PROCESSLIST
+<ID> test_user <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> NULL
+<ID> test_user <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> SELECT count(*),'BEGIN-This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.-END' AS "Long string" FROM test.t1
+SHOW PROCESSLIST;
+Id User Host db Command Time State Info
+<ID> root <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> SHOW PROCESSLIST
+<ID> test_user <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> NULL
+<ID> test_user <HOST_NAME> information_schema <COMMAND> <TIME> <STATE> SELECT count(*),'BEGIN-This is the representative of a very long statement.This is the representativ
+UNLOCK TABLES;
+# ----- switch to connection con2 (user = test_user) -----
+
+# Pull("reap") the result set from the monster statement executed with "send".
+
+count(*) Long string
+0 BEGIN-This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.This is the representative of a very long statement.-END
+# ----- switch to connection default (user = root) -----
------ switch to connection default (user = root) -----
+----- disconnect con1 and con2 -----
------ close connection ddicttestuser1 -----
-DROP USER ddicttestuser1@'localhost';
+DROP USER test_user@'localhost';
DROP TABLE test.t1;
=== modified file 'mysql-test/suite/funcs_1/t/is_columns_is.test'
--- a/mysql-test/suite/funcs_1/t/is_columns_is.test 2008-06-16 18:39:58 +0000
+++ b/mysql-test/suite/funcs_1/t/is_columns_is.test 2009-10-10 09:59:06 +0000
@@ -16,6 +16,8 @@
#
--source include/not_embedded.inc
+# This test depends on having the PBXT information_schema stuff.
+--source include/have_pbxt.inc
let $my_where = WHERE table_schema = 'information_schema'
AND table_name <> 'profiling';
=== modified file 'mysql-test/suite/maria/t/maria-recover.test'
--- a/mysql-test/suite/maria/t/maria-recover.test 2009-02-19 09:01:25 +0000
+++ b/mysql-test/suite/maria/t/maria-recover.test 2009-10-09 08:09:24 +0000
@@ -54,11 +54,10 @@ perl;
close FILE;
EOF
-# line below will be removed
-disable_ps_protocol;
replace_regex /Table.*t_corrupted2/t_corrupted2/ ;
+--enable_prepare_warnings
select * from t_corrupted2; # should show corruption and repair messages
-enable_ps_protocol;
+--disable_prepare_warnings
select * from t_corrupted2; # should show just rows
drop database mysqltest;
=== added file 'mysql-test/suite/maria/t/maria_showlog_error-master.opt'
--- a/mysql-test/suite/maria/t/maria_showlog_error-master.opt 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/maria/t/maria_showlog_error-master.opt 2009-10-13 12:47:17 +0000
@@ -0,0 +1 @@
+--force-restart
=== modified file 'mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test'
--- a/mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test 2008-05-16 16:03:50 +0000
+++ b/mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test 2009-10-09 13:08:09 +0000
@@ -43,6 +43,9 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
+# This test relies on connecting externally from mysqltest, doesn't
+# work with embedded.
+--source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
=== modified file 'mysql-test/suite/parts/t/partition_alter1_1_2_myisam.test'
--- a/mysql-test/suite/parts/t/partition_alter1_1_2_myisam.test 2008-05-16 16:03:50 +0000
+++ b/mysql-test/suite/parts/t/partition_alter1_1_2_myisam.test 2009-10-09 13:08:09 +0000
@@ -42,6 +42,9 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
+# This test relies on connecting externally from mysqltest, doesn't
+# work with embedded.
+--source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
=== modified file 'mysql-test/suite/parts/t/partition_alter1_1_innodb.test'
--- a/mysql-test/suite/parts/t/partition_alter1_1_innodb.test 2008-05-16 16:03:50 +0000
+++ b/mysql-test/suite/parts/t/partition_alter1_1_innodb.test 2009-10-09 13:08:09 +0000
@@ -42,6 +42,9 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
+# This test relies on connecting externally from mysqltest, doesn't
+# work with embedded.
+--source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
=== modified file 'mysql-test/suite/parts/t/partition_alter1_1_myisam.test'
--- a/mysql-test/suite/parts/t/partition_alter1_1_myisam.test 2008-05-16 16:03:50 +0000
+++ b/mysql-test/suite/parts/t/partition_alter1_1_myisam.test 2009-10-09 13:08:09 +0000
@@ -43,6 +43,9 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
+# This test relies on connecting externally from mysqltest, doesn't
+# work with embedded.
+--source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
=== modified file 'mysql-test/suite/parts/t/partition_alter1_2_innodb.test'
--- a/mysql-test/suite/parts/t/partition_alter1_2_innodb.test 2008-05-16 16:03:50 +0000
+++ b/mysql-test/suite/parts/t/partition_alter1_2_innodb.test 2009-10-09 13:08:09 +0000
@@ -43,6 +43,9 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
+# This test relies on connecting externally from mysqltest, doesn't
+# work with embedded.
+--source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
=== modified file 'mysql-test/suite/parts/t/partition_alter1_2_myisam.test'
--- a/mysql-test/suite/parts/t/partition_alter1_2_myisam.test 2008-05-16 16:03:50 +0000
+++ b/mysql-test/suite/parts/t/partition_alter1_2_myisam.test 2009-10-09 13:08:09 +0000
@@ -43,6 +43,9 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
+# This test relies on connecting externally from mysqltest, doesn't
+# work with embedded.
+--source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
=== modified file 'mysql-test/suite/parts/t/partition_alter2_1_innodb.test'
--- a/mysql-test/suite/parts/t/partition_alter2_1_innodb.test 2008-09-18 09:02:48 +0000
+++ b/mysql-test/suite/parts/t/partition_alter2_1_innodb.test 2009-10-09 13:08:09 +0000
@@ -40,6 +40,9 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
+# This test relies on connecting externally from mysqltest, doesn't
+# work with embedded.
+--source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
=== modified file 'mysql-test/suite/parts/t/partition_alter2_1_maria.test'
--- a/mysql-test/suite/parts/t/partition_alter2_1_maria.test 2008-11-24 14:53:10 +0000
+++ b/mysql-test/suite/parts/t/partition_alter2_1_maria.test 2009-10-09 13:08:09 +0000
@@ -40,6 +40,9 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
+# This test relies on connecting externally from mysqltest, doesn't
+# work with embedded.
+--source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
=== modified file 'mysql-test/suite/parts/t/partition_alter2_1_myisam.test'
--- a/mysql-test/suite/parts/t/partition_alter2_1_myisam.test 2008-09-18 09:02:48 +0000
+++ b/mysql-test/suite/parts/t/partition_alter2_1_myisam.test 2009-10-09 13:08:09 +0000
@@ -40,6 +40,9 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
+# This test relies on connecting externally from mysqltest, doesn't
+# work with embedded.
+--source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
=== modified file 'mysql-test/suite/parts/t/partition_alter2_2_innodb.test'
--- a/mysql-test/suite/parts/t/partition_alter2_2_innodb.test 2008-09-18 09:02:48 +0000
+++ b/mysql-test/suite/parts/t/partition_alter2_2_innodb.test 2009-10-09 13:08:09 +0000
@@ -40,6 +40,9 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
+# This test relies on connecting externally from mysqltest, doesn't
+# work with embedded.
+--source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
=== modified file 'mysql-test/suite/parts/t/partition_alter2_2_maria.test'
--- a/mysql-test/suite/parts/t/partition_alter2_2_maria.test 2008-11-24 14:53:10 +0000
+++ b/mysql-test/suite/parts/t/partition_alter2_2_maria.test 2009-10-09 13:08:09 +0000
@@ -40,6 +40,9 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
+# This test relies on connecting externally from mysqltest, doesn't
+# work with embedded.
+--source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
=== modified file 'mysql-test/suite/parts/t/partition_alter2_2_myisam.test'
--- a/mysql-test/suite/parts/t/partition_alter2_2_myisam.test 2008-09-18 09:02:48 +0000
+++ b/mysql-test/suite/parts/t/partition_alter2_2_myisam.test 2009-10-09 13:08:09 +0000
@@ -40,6 +40,9 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
+# This test relies on connecting externally from mysqltest, doesn't
+# work with embedded.
+--source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
=== modified file 'mysql-test/suite/parts/t/partition_alter3_innodb.test'
--- a/mysql-test/suite/parts/t/partition_alter3_innodb.test 2007-11-20 15:04:07 +0000
+++ b/mysql-test/suite/parts/t/partition_alter3_innodb.test 2009-10-09 13:08:09 +0000
@@ -39,6 +39,8 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
+# This test relies on --list_files, which doesn't work correctly in embedded.
+--source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
=== modified file 'mysql-test/suite/parts/t/partition_alter3_myisam.test'
--- a/mysql-test/suite/parts/t/partition_alter3_myisam.test 2007-11-20 15:04:07 +0000
+++ b/mysql-test/suite/parts/t/partition_alter3_myisam.test 2009-10-09 13:08:09 +0000
@@ -39,6 +39,8 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
+# This test relies on --list_files, which doesn't work correctly in embedded.
+--source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
=== modified file 'mysql-test/suite/parts/t/partition_alter4_innodb.test'
--- a/mysql-test/suite/parts/t/partition_alter4_innodb.test 2007-11-20 15:04:07 +0000
+++ b/mysql-test/suite/parts/t/partition_alter4_innodb.test 2009-10-09 13:08:09 +0000
@@ -40,6 +40,9 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
+# This test relies on connecting externally from mysqltest, doesn't
+# work with embedded.
+--source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
=== modified file 'mysql-test/suite/parts/t/partition_alter4_myisam.test'
--- a/mysql-test/suite/parts/t/partition_alter4_myisam.test 2007-11-20 15:04:07 +0000
+++ b/mysql-test/suite/parts/t/partition_alter4_myisam.test 2009-10-09 13:08:09 +0000
@@ -40,6 +40,9 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
+# This test relies on connecting externally from mysqltest, doesn't
+# work with embedded.
+--source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
=== modified file 'mysql-test/suite/parts/t/partition_basic_innodb.test'
--- a/mysql-test/suite/parts/t/partition_basic_innodb.test 2008-03-17 15:18:02 +0000
+++ b/mysql-test/suite/parts/t/partition_basic_innodb.test 2009-10-09 13:08:09 +0000
@@ -40,6 +40,9 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
+# This test relies on connecting externally from mysqltest, doesn't
+# work with embedded.
+--source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
=== modified file 'mysql-test/suite/parts/t/partition_basic_myisam.test'
--- a/mysql-test/suite/parts/t/partition_basic_myisam.test 2008-03-17 15:18:02 +0000
+++ b/mysql-test/suite/parts/t/partition_basic_myisam.test 2009-10-09 13:08:09 +0000
@@ -40,6 +40,9 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
+# This test relies on connecting externally from mysqltest, doesn't
+# work with embedded.
+--source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
=== modified file 'mysql-test/suite/parts/t/partition_basic_symlink_myisam.test'
--- a/mysql-test/suite/parts/t/partition_basic_symlink_myisam.test 2008-02-06 14:13:56 +0000
+++ b/mysql-test/suite/parts/t/partition_basic_symlink_myisam.test 2009-10-09 13:08:09 +0000
@@ -40,6 +40,9 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
+# This test relies on connecting externally from mysqltest, doesn't
+# work with embedded.
+--source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
# The server must support symlink for DATA/INDEX DIRECTORY.
=== modified file 'mysql-test/suite/parts/t/partition_engine_innodb.test'
--- a/mysql-test/suite/parts/t/partition_engine_innodb.test 2007-11-20 15:04:07 +0000
+++ b/mysql-test/suite/parts/t/partition_engine_innodb.test 2009-10-09 13:08:09 +0000
@@ -39,6 +39,9 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
+# This test relies on connecting externally from mysqltest, doesn't
+# work with embedded.
+--source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
=== modified file 'mysql-test/suite/parts/t/partition_engine_myisam.test'
--- a/mysql-test/suite/parts/t/partition_engine_myisam.test 2007-11-20 15:04:07 +0000
+++ b/mysql-test/suite/parts/t/partition_engine_myisam.test 2009-10-09 13:08:09 +0000
@@ -39,6 +39,9 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
+# This test relies on connecting externally from mysqltest, doesn't
+# work with embedded.
+--source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
=== modified file 'mysql-test/suite/parts/t/partition_recover_myisam.test'
--- a/mysql-test/suite/parts/t/partition_recover_myisam.test 2009-02-01 12:00:48 +0000
+++ b/mysql-test/suite/parts/t/partition_recover_myisam.test 2009-10-09 08:09:24 +0000
@@ -16,7 +16,11 @@ FLUSH TABLES;
let $MYSQLD_DATADIR= `select @@datadir`;
--remove_file $MYSQLD_DATADIR/test/t1_will_crash.MYI
--copy_file std_data/corrupt_t1.MYI $MYSQLD_DATADIR/test/t1_will_crash.MYI
+# Embedded server doesn't chdir to data directory
+--replace_regex /Table '.*\/data\/test\/t1_will_crash/Table '.\/test\/t1_will_crash/
+--enable_prepare_warnings
SELECT * FROM t1_will_crash;
+--disable_prepare_warnings
DROP TABLE t1_will_crash;
CREATE TABLE t1_will_crash (a INT, KEY (a))
ENGINE=MyISAM
@@ -29,5 +33,9 @@ FLUSH TABLES;
--echo # head -c1024 t1#P#p1.MYI > corrupt_t1#P#p1.MYI
--remove_file $MYSQLD_DATADIR/test/t1_will_crash#P#p1.MYI
--copy_file std_data/corrupt_t1#P#p1.MYI $MYSQLD_DATADIR/test/t1_will_crash#P#p1.MYI
+# Embedded server doesn't chdir to data directory
+--replace_regex /Table '.*\/data\/test\/t1_will_crash/Table '.\/test\/t1_will_crash/
+--enable_prepare_warnings
SELECT * FROM t1_will_crash;
+--disable_prepare_warnings
DROP TABLE t1_will_crash;
=== modified file 'mysql-test/suite/parts/t/partition_special_innodb.test'
--- a/mysql-test/suite/parts/t/partition_special_innodb.test 2008-12-04 09:47:25 +0000
+++ b/mysql-test/suite/parts/t/partition_special_innodb.test 2009-10-09 13:08:09 +0000
@@ -58,8 +58,8 @@ ENGINE = InnoDB
PARTITION BY HASH (a)
PARTITIONS 2;
-connect (con1,127.0.0.1,root,,test,$MASTER_MYPORT,);
-connect (con2,127.0.0.1,root,,test,$MASTER_MYPORT,);
+connect (con1,localhost,root,,test,$MASTER_MYPORT,);
+connect (con2,localhost,root,,test,$MASTER_MYPORT,);
--connection con1
SET autocommit=OFF;
=== modified file 'mysql-test/suite/parts/t/partition_syntax_innodb.test'
--- a/mysql-test/suite/parts/t/partition_syntax_innodb.test 2007-11-20 15:04:07 +0000
+++ b/mysql-test/suite/parts/t/partition_syntax_innodb.test 2009-10-09 13:08:09 +0000
@@ -39,6 +39,9 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
+# This test relies on connecting externally from mysqltest, doesn't
+# work with embedded.
+--source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
=== modified file 'mysql-test/suite/parts/t/partition_syntax_myisam.test'
--- a/mysql-test/suite/parts/t/partition_syntax_myisam.test 2007-11-20 15:04:07 +0000
+++ b/mysql-test/suite/parts/t/partition_syntax_myisam.test 2009-10-09 13:08:09 +0000
@@ -39,6 +39,9 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
+# This test relies on connecting externally from mysqltest, doesn't
+# work with embedded.
+--source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
=== modified file 'mysql-test/suite/pbxt/r/connect.result'
--- a/mysql-test/suite/pbxt/r/connect.result 2009-04-02 10:03:14 +0000
+++ b/mysql-test/suite/pbxt/r/connect.result 2009-10-07 16:56:11 +0000
@@ -61,8 +61,8 @@ show tables;
Tables_in_test
connect(localhost,test,,test2,MASTER_PORT,MASTER_SOCKET);
ERROR 28000: Access denied for user 'test'@'localhost' (using password: NO)
-connect(localhost,test,,"",MASTER_PORT,MASTER_SOCKET);
-ERROR 28000: Access denied for user 'test'@'localhost' (using password: NO)
+connect(localhost,,,,MASTER_PORT,MASTER_SOCKET);
+ERROR 28000: Access denied for user ''@'localhost' (using password: NO)
connect(localhost,test,zorro,test2,MASTER_PORT,MASTER_SOCKET);
ERROR 28000: Access denied for user 'test'@'localhost' (using password: YES)
connect(localhost,test,zorro,test,MASTER_PORT,MASTER_SOCKET);
=== modified file 'mysql-test/suite/pbxt/r/mysqlslap.result'
--- a/mysql-test/suite/pbxt/r/mysqlslap.result 2009-04-02 10:03:14 +0000
+++ b/mysql-test/suite/pbxt/r/mysqlslap.result 2009-10-07 16:56:11 +0000
@@ -122,8 +122,7 @@ DROP SCHEMA IF EXISTS `mysqlslap`;
DROP SCHEMA IF EXISTS `mysqlslap`;
CREATE SCHEMA `mysqlslap`;
use mysqlslap;
-set storage_engine=`heap`;
-CREATE TABLE t1 (id int, name varchar(64));
+CREATE TABLE t1 (id int, name varchar(64)) Engine = heap;
create table t2(foo1 varchar(32), foo2 varchar(32));
INSERT INTO t1 VALUES (1, 'This is a test');
insert into t2 values ('test', 'test2');
@@ -133,8 +132,7 @@ DROP SCHEMA IF EXISTS `mysqlslap`;
DROP SCHEMA IF EXISTS `mysqlslap`;
CREATE SCHEMA `mysqlslap`;
use mysqlslap;
-set storage_engine=`myisam`;
-CREATE TABLE t1 (id int, name varchar(64));
+CREATE TABLE t1 (id int, name varchar(64)) Engine = myisam;
create table t2(foo1 varchar(32), foo2 varchar(32));
INSERT INTO t1 VALUES (1, 'This is a test');
insert into t2 values ('test', 'test2');
@@ -144,8 +142,7 @@ DROP SCHEMA IF EXISTS `mysqlslap`;
DROP SCHEMA IF EXISTS `mysqlslap`;
CREATE SCHEMA `mysqlslap`;
use mysqlslap;
-set storage_engine=`heap`;
-CREATE TABLE t1 (id int, name varchar(64));
+CREATE TABLE t1 (id int, name varchar(64)) Engine = heap;
create table t2(foo1 varchar(32), foo2 varchar(32));
INSERT INTO t1 VALUES (1, 'This is a test');
insert into t2 values ('test', 'test2');
@@ -157,8 +154,7 @@ DROP SCHEMA IF EXISTS `mysqlslap`;
DROP SCHEMA IF EXISTS `mysqlslap`;
CREATE SCHEMA `mysqlslap`;
use mysqlslap;
-set storage_engine=`myisam`;
-CREATE TABLE t1 (id int, name varchar(64));
+CREATE TABLE t1 (id int, name varchar(64)) Engine = myisam;
create table t2(foo1 varchar(32), foo2 varchar(32));
INSERT INTO t1 VALUES (1, 'This is a test');
insert into t2 values ('test', 'test2');
@@ -170,8 +166,7 @@ DROP SCHEMA IF EXISTS `mysqlslap`;
DROP SCHEMA IF EXISTS `mysqlslap`;
CREATE SCHEMA `mysqlslap`;
use mysqlslap;
-set storage_engine=`heap`;
-CREATE TABLE t1 (id int, name varchar(64));
+CREATE TABLE t1 (id int, name varchar(64)) Engine = heap;
create table t2(foo1 varchar(32), foo2 varchar(32));
INSERT INTO t1 VALUES (1, 'This is a test');
insert into t2 values ('test', 'test2');
@@ -196,8 +191,7 @@ DROP SCHEMA IF EXISTS `mysqlslap`;
DROP SCHEMA IF EXISTS `mysqlslap`;
CREATE SCHEMA `mysqlslap`;
use mysqlslap;
-set storage_engine=`myisam`;
-CREATE TABLE t1 (id int, name varchar(64));
+CREATE TABLE t1 (id int, name varchar(64)) Engine = myisam;
create table t2(foo1 varchar(32), foo2 varchar(32));
INSERT INTO t1 VALUES (1, 'This is a test');
insert into t2 values ('test', 'test2');
=== modified file 'mysql-test/suite/pbxt/r/ps_11bugs.result'
--- a/mysql-test/suite/pbxt/r/ps_11bugs.result 2009-04-02 10:03:14 +0000
+++ b/mysql-test/suite/pbxt/r/ps_11bugs.result 2009-10-07 16:56:11 +0000
@@ -121,8 +121,8 @@ insert into t1 values (1);
explain select * from t1 where 3 in (select (1+1) union select 1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
-2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used
-3 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL No tables used
+2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible HAVING
+3 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL Impossible HAVING
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
select * from t1 where 3 in (select (1+1) union select 1);
a
=== modified file 'mysql-test/suite/pbxt/r/select.result'
--- a/mysql-test/suite/pbxt/r/select.result 2009-08-17 15:57:58 +0000
+++ b/mysql-test/suite/pbxt/r/select.result 2009-10-07 16:56:11 +0000
@@ -3585,7 +3585,6 @@ INSERT INTO t2 VALUES (1,'a'),(2,'b'),(3
EXPLAIN SELECT t1.a FROM t1 LEFT JOIN t2 ON t2.b=t1.b WHERE t1.a=3;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
-1 SIMPLE t2 const b b 22 const 1 Using index
DROP TABLE t1,t2;
CREATE TABLE t1(id int PRIMARY KEY, b int, e int);
CREATE TABLE t2(i int, a int, INDEX si(i), INDEX ai(a));
=== modified file 'mysql-test/suite/pbxt/r/union.result'
--- a/mysql-test/suite/pbxt/r/union.result 2009-08-17 15:57:58 +0000
+++ b/mysql-test/suite/pbxt/r/union.result 2009-10-07 16:56:11 +0000
@@ -480,7 +480,7 @@ id select_type table type possible_keys
2 UNION t2 const PRIMARY PRIMARY 4 const 1 100.00
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL
Warnings:
-Note 1003 (select '1' AS `a`,'1' AS `b` from `test`.`t1` where ('1' = 1)) union (select '1' AS `a`,'10' AS `b` from `test`.`t2` where ('1' = 1))
+Note 1003 (select '1' AS `a`,'1' AS `b` from `test`.`t1` where 1) union (select '1' AS `a`,'10' AS `b` from `test`.`t2` where 1)
(select * from t1 where a=5) union (select * from t2 where a=1);
a b
1 10
=== modified file 'mysql-test/suite/pbxt/t/connect.test'
--- a/mysql-test/suite/pbxt/t/connect.test 2009-04-02 10:03:14 +0000
+++ b/mysql-test/suite/pbxt/t/connect.test 2009-10-07 16:56:11 +0000
@@ -42,7 +42,7 @@ show tables;
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
--error 1045
connect (fail_con,localhost,test,,test2);
---replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT test ""
--error 1045
connect (fail_con,localhost,test,,"");
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
=== added file 'mysql-test/t/mysqltest_ps.test'
--- a/mysql-test/t/mysqltest_ps.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/mysqltest_ps.test 2009-10-09 08:09:24 +0000
@@ -0,0 +1,34 @@
+#
+# Test mysqltest in --ps-protocol mode.
+#
+
+if (`SELECT $PS_PROTOCOL = 0`)
+{
+ --skip Need prepared statement protocol
+}
+
+#
+# Test the --enable_prepare_warnings command.
+# Test default value (off), enabling, and disabling.
+#
+
+--enable_warnings
+
+select 1 + "2 a";
+create table t (a int primary key, b blob default '');
+# This statement gives warning both during prepare and execute.
+# So gives double warnings when --enable_prepare_warnings.
+select a, (2*a) AS a from t group by a;
+drop table t;
+
+--enable_prepare_warnings
+select 1 + "2 a";
+create table t (a int primary key, b blob default '');
+select a, (2*a) AS a from t group by a;
+drop table t;
+
+--disable_prepare_warnings
+select 1 + "2 a";
+create table t (a int primary key, b blob default '');
+select a, (2*a) AS a from t group by a;
+drop table t;
=== modified file 'mysql-test/t/variables-big.test'
--- a/mysql-test/t/variables-big.test 2009-10-03 23:20:51 +0000
+++ b/mysql-test/t/variables-big.test 2009-10-11 09:36:10 +0000
@@ -38,18 +38,24 @@
--disable_warnings
SET SESSION transaction_prealloc_size=1024*1024*1024*1;
--replace_column 1 <Id> 6 <Time>
+# Embedded server is hardcoded to show "Writing to net" as STATE.
+--replace_result "Writing to net" "NULL"
SHOW PROCESSLIST;
SET SESSION transaction_prealloc_size=1024*1024*1024*2;
--replace_column 1 <Id> 6 <Time>
+--replace_result "Writing to net" "NULL"
SHOW PROCESSLIST;
SET SESSION transaction_prealloc_size=1024*1024*1024*3;
--replace_column 1 <Id> 6 <Time>
+--replace_result "Writing to net" "NULL"
SHOW PROCESSLIST;
SET SESSION transaction_prealloc_size=1024*1024*1024*4;
--replace_column 1 <Id> 6 <Time>
+--replace_result "Writing to net" "NULL"
SHOW PROCESSLIST;
SET SESSION transaction_prealloc_size=1024*1024*1024*5;
--replace_column 1 <Id> 6 <Time>
+--replace_result "Writing to net" "NULL"
SHOW PROCESSLIST;
--enable_warnings
=== modified file 'scripts/make_win_bin_dist'
--- a/scripts/make_win_bin_dist 2009-09-04 15:45:07 +0000
+++ b/scripts/make_win_bin_dist 2009-10-15 21:52:31 +0000
@@ -140,12 +140,24 @@ fi
# ----------------------------------------------------------------------
# Copy executables, and client DLL
# ----------------------------------------------------------------------
-
+MYISAM_BINARIES="myisamchk myisamlog myisampack myisam_ftdump"
+MARIA_BINARIES="maria_chk maria_dump_log maria_ftdump maria_pack maria_read_log"
mkdir $DESTDIR
mkdir $DESTDIR/bin
cp client/$TARGET/*.exe $DESTDIR/bin/
cp extra/$TARGET/*.exe $DESTDIR/bin/
-cp storage/myisam/$TARGET/*.exe $DESTDIR/bin/
+
+# MyISAM
+#cp storage/myisam/$TARGET/*.exe $DESTDIR/bin/
+for eng in $MYISAM_BINARIES ; do
+ cp storage/myisam/$TARGET/$eng.{exe,pdb} $DESTDIR/bin
+done
+
+# Maria
+for eng in $MARIA_BINARIES ; do
+ cp storage/maria/$TARGET/$eng.{exe,pdb} $DESTDIR/bin
+done
+
cp server-tools/instance-manager/$TARGET/*.{exe,map} $DESTDIR/bin/
if [ x"$TARGET" != x"release" ] ; then
cp server-tools/instance-manager/$TARGET/*.pdb $DESTDIR/bin/
@@ -341,6 +353,11 @@ cp mysql-test/mysql-test-run.pl $DESTDIR
cp mysql-test/README $DESTDIR/mysql-test/
cp -R mysql-test/{t,r,include,suite,std_data,lib} $DESTDIR/mysql-test/
+rm -rf $DESTDIR/mysql-test/lib/My/SafeProcess/my_safe_kill.{dir,vcproj}
+rm -rf $DESTDIR/mysql-test/lib/My/SafeProcess/my_safe_process.{dir,vcproj}
+rm -rf $DESTDIR/mysql-test/lib/My/SafeProcess/{Debug,RelWithDebInfo}/*.{ilk,idb,map}
+
+
# Note that this will not copy "extra" if a soft link
if [ -d mysql-test/extra ] ; then
mkdir $DESTDIR/mysql-test/extra
@@ -379,7 +396,7 @@ cp scripts/*.sql $DESTDIR/share/
# Clean up from possibly copied SCCS directories
# ----------------------------------------------------------------------
-rm -rf `find $DISTDIR -type d -name SCCS -print`
+rm -rf `/bin/find $DISTDIR -type d -name SCCS -print`
# ----------------------------------------------------------------------
# Copy other files specified on command line DEST=SOURCE
=== modified file 'sql/mysql_priv.h'
--- a/sql/mysql_priv.h 2009-10-15 21:38:29 +0000
+++ b/sql/mysql_priv.h 2009-10-15 21:52:31 +0000
@@ -947,7 +947,6 @@ struct Query_cache_query_flags
#define query_cache_abort(A)
#define query_cache_end_of_result(A)
-#define query_cache_invalidate_by_MyISAM_filename_ref NULL
#define query_cache_maybe_disabled(T) 1
#define query_cache_is_cacheable_query(L) 0
#endif /*HAVE_QUERY_CACHE*/
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc 2009-10-02 11:09:01 +0000
+++ b/sql/mysqld.cc 2009-10-07 13:07:10 +0000
@@ -8429,7 +8429,7 @@ mysqld_get_one_option(int optid,
break;
case OPT_LOG_SLOW_FILTER:
global_system_variables.log_slow_filter=
- find_bit_type_or_exit(argument, &log_slow_verbosity_typelib,
+ find_bit_type_or_exit(argument, &log_slow_filter_typelib,
opt->name, &error);
/*
If we are using filters, we set opt_slow_admin_statements to be always
@@ -8441,7 +8441,7 @@ mysqld_get_one_option(int optid,
break;
case OPT_LOG_SLOW_VERBOSITY:
global_system_variables.log_slow_verbosity=
- find_bit_type_or_exit(argument, &log_slow_filter_typelib,
+ find_bit_type_or_exit(argument, &log_slow_verbosity_typelib,
opt->name, &error);
if (error)
return 1;
=== modified file 'sql/sql_string.cc'
--- a/sql/sql_string.cc 2009-09-07 20:50:10 +0000
+++ b/sql/sql_string.cc 2009-10-13 16:57:36 +0000
@@ -27,14 +27,6 @@
#include <floatingpoint.h>
#endif
-/*
- The following extern declarations are ok as these are interface functions
- required by the string function
-*/
-
-extern uchar* sql_alloc(unsigned size);
-extern void sql_element_free(void *ptr);
-
#include "sql_string.h"
/*****************************************************************************
=== modified file 'storage/maria/ha_maria.cc'
--- a/storage/maria/ha_maria.cc 2009-09-07 20:50:10 +0000
+++ b/storage/maria/ha_maria.cc 2009-10-06 14:53:46 +0000
@@ -28,6 +28,7 @@
#include <my_bit.h>
#include "ha_maria.h"
#include "trnman_public.h"
+#include "trnman.h"
C_MODE_START
#include "maria_def.h"
@@ -918,6 +919,8 @@ int ha_maria::open(const char *name, int
if (!(file= maria_open(name, mode, test_if_locked | HA_OPEN_FROM_SQL_LAYER)))
return (my_errno ? my_errno : -1);
+ file->s->chst_invalidator= query_cache_invalidate_by_MyISAM_filename_ref;
+
if (test_if_locked & (HA_OPEN_IGNORE_IF_LOCKED | HA_OPEN_TMP_TABLE))
VOID(maria_extra(file, HA_EXTRA_NO_WAIT_LOCK, 0));
@@ -3238,6 +3241,9 @@ my_bool ha_maria::register_query_cache_t
*/
*engine_data= 0;
+ if (file->s->now_transactional && file->s->have_versioning)
+ return (file->trn->trid >= file->s->state.last_change_trn);
+
/*
If a concurrent INSERT has happened just before the currently processed
SELECT statement, the total size of the table is unknown.
=== modified file 'storage/maria/ma_state.c'
--- a/storage/maria/ma_state.c 2008-12-27 02:05:16 +0000
+++ b/storage/maria/ma_state.c 2009-10-06 06:57:22 +0000
@@ -318,6 +318,13 @@ void _ma_update_status(void* param)
DBUG_ASSERT(!info->s->base.born_transactional);
share->state.state= *info->state;
info->state= &share->state.state;
+#ifdef HAVE_QUERY_CACHE
+ DBUG_PRINT("info", ("invalidator... '%s' (status update)",
+ info->s->data_file_name.str));
+ DBUG_ASSERT(info->s->chst_invalidator != NULL);
+ (*info->s->chst_invalidator)((const char *)info->s->data_file_name.str);
+#endif
+
}
info->append_insert_at_end= 0;
}
@@ -469,6 +476,8 @@ my_bool _ma_trnman_end_trans_hook(TRN *t
tables->state_start.checksum);
history->trid= trn->commit_trid;
+ share->state.last_change_trn= trn->commit_trid;
+
if (history->next)
{
/* Remove not visible states */
=== modified file 'storage/maria/maria_def.h'
--- a/storage/maria/maria_def.h 2009-02-19 09:01:25 +0000
+++ b/storage/maria/maria_def.h 2009-10-06 06:57:22 +0000
@@ -83,6 +83,7 @@ typedef struct st_maria_state_info
pgcache_page_no_t first_bitmap_with_space;
ulonglong auto_increment;
TrID create_trid; /* Minum trid for file */
+ TrID last_change_trn; /* selfdescriptive */
ulong update_count; /* Updated for each write lock */
ulong status;
double *rec_per_key_part;
@@ -337,7 +338,10 @@ typedef struct st_maria_share
/* Mapings to read/write the data file */
size_t (*file_read)(MARIA_HA *, uchar *, size_t, my_off_t, myf);
size_t (*file_write)(MARIA_HA *, const uchar *, size_t, my_off_t, myf);
- invalidator_by_filename invalidator; /* query cache invalidator */
+ /* query cache invalidator for merged tables */
+ invalidator_by_filename invalidator;
+ /* query cache invalidator for changing state */
+ invalidator_by_filename chst_invalidator;
my_off_t key_del_current; /* delete links for index pages */
ulong this_process; /* processid */
ulong last_process; /* For table-change-check */
=== modified file 'storage/myisam/ha_myisam.cc'
--- a/storage/myisam/ha_myisam.cc 2009-09-07 20:50:10 +0000
+++ b/storage/myisam/ha_myisam.cc 2009-10-06 14:53:46 +0000
@@ -690,6 +690,9 @@ int ha_myisam::open(const char *name, in
if (!(file=mi_open(name, mode, test_if_locked | HA_OPEN_FROM_SQL_LAYER)))
return (my_errno ? my_errno : -1);
+
+ file->s->chst_invalidator= query_cache_invalidate_by_MyISAM_filename_ref;
+
if (!table->s->tmp_table) /* No need to perform a check for tmp table */
{
if ((my_errno= table2myisam(table, &keyinfo, &recinfo, &recs)))
=== modified file 'storage/myisam/mi_locking.c'
--- a/storage/myisam/mi_locking.c 2009-09-03 14:05:38 +0000
+++ b/storage/myisam/mi_locking.c 2009-10-06 06:57:22 +0000
@@ -329,6 +329,12 @@ void mi_update_status(void* param)
#endif
info->s->state.state= *info->state;
info->state= &info->s->state.state;
+#ifdef HAVE_QUERY_CACHE
+ DBUG_PRINT("info", ("invalidator... '%s' (status update)",
+ info->filename));
+ DBUG_ASSERT(info->s->chst_invalidator != NULL);
+ (*info->s->chst_invalidator)((const char *)info->filename);
+#endif
}
info->append_insert_at_end= 0;
=== modified file 'storage/myisam/myisamdef.h'
--- a/storage/myisam/myisamdef.h 2009-04-25 09:04:38 +0000
+++ b/storage/myisam/myisamdef.h 2009-10-06 06:57:22 +0000
@@ -190,7 +190,10 @@ typedef struct st_mi_isam_share
const uchar *record, my_off_t pos);
size_t (*file_read) (MI_INFO *, uchar *, size_t, my_off_t, myf);
size_t (*file_write) (MI_INFO *, const uchar *, size_t, my_off_t, myf);
- invalidator_by_filename invalidator; /* query cache invalidator */
+ /* query cache invalidator for merged tables */
+ invalidator_by_filename invalidator;
+ /* query cache invalidator for changing state */
+ invalidator_by_filename chst_invalidator;
ulong this_process; /* processid */
ulong last_process; /* For table-change-check */
ulong last_version; /* Version on start */
=== modified file 'storage/pbxt/src/Makefile.am'
--- a/storage/pbxt/src/Makefile.am 2009-10-06 18:26:11 +0000
+++ b/storage/pbxt/src/Makefile.am 2009-10-07 07:40:56 +0000
@@ -49,4 +49,4 @@ libpbxt_a_SOURCES = $(libpbxt_la_SOURCE
libpbxt_a_CXXFLAGS = $(AM_CXXFLAGS)
libpbxt_a_CFLAGS = $(AM_CFLAGS) -std=c99
-EXTRA_DIST = pbms_enabled.cc
+EXTRA_DIST = pbms_enabled.cc win_inttypes.h
=== modified file 'win/Makefile.am'
--- a/win/Makefile.am 2009-10-02 12:53:05 +0000
+++ b/win/Makefile.am 2009-10-11 10:21:49 +0000
@@ -17,7 +17,7 @@
EXTRA_DIST = build-vs71.bat build-vs8.bat build-vs8_x64.bat build-vs9.bat \
build-vs9_x64.bat configure.js README mysql_manifest.cmake \
create_manifest.js create_def_file.js build-nmake.bat \
- build-nmake-x64.bat
+ build-nmake-x64.bat configure-mariadb.sh make_mariadb_win_dist
# Don't update the files from bitkeeper
%::SCCS/s.%
=== added file 'win/configure-mariadb.sh'
--- a/win/configure-mariadb.sh 1970-01-01 00:00:00 +0000
+++ b/win/configure-mariadb.sh 2009-10-08 19:04:12 +0000
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+#
+# This script is the "standard" way to configure MariaDB on Windows. To be
+# used by buildbot slaves and release build script.
+#
+
+set -e
+
+cscript win/configure.js \
+ WITH_ARCHIVE_STORAGE_ENGINE \
+ WITH_BLACKHOLE_STORAGE_ENGINE \
+ WITH_CSV_STORAGE_ENGINE \
+ WITH_EXAMPLE_STORAGE_ENGINE \
+ WITH_FEDERATED_STORAGE_ENGINE \
+ WITH_MERGE_STORAGE_ENGINE \
+ WITH_PARTITION_STORAGE_ENGINE \
+ WITH_MARIA_STORAGE_ENGINE \
+ WITH_PBXT_STORAGE_ENGINE \
+ WITH_XTRADB_STORAGE_ENGINE \
+ WITH_EMBEDDED_SERVER
+
+
=== modified file 'win/configure.js'
--- a/win/configure.js 2009-09-07 20:50:10 +0000
+++ b/win/configure.js 2009-10-07 21:00:29 +0000
@@ -156,9 +156,16 @@ function GetValue(str, key)
function GetVersion(str)
{
var key = "AM_INIT_AUTOMAKE(mysql, ";
+ var key2 = "AM_INIT_AUTOMAKE(mariadb, ";
+ var key_len = key.length;
var pos = str.indexOf(key); //5.0.6-beta)
+ if (pos == -1)
+ {
+ pos = str.indexOf(key2);
+ key_len= key2.length;
+ }
if (pos == -1) return null;
- pos += key.length;
+ pos += key_len;
var end = str.indexOf(")", pos);
if (end == -1) return null;
return str.substring(pos, end);
=== added file 'win/make_mariadb_win_dist'
--- a/win/make_mariadb_win_dist 1970-01-01 00:00:00 +0000
+++ b/win/make_mariadb_win_dist 2009-10-12 16:50:20 +0000
@@ -0,0 +1,73 @@
+#!/bin/sh
+
+#
+# This is a script that one needs to run in the source tarball to build
+# a MariaDB release for Windows
+#
+
+set -e
+
+if [ ! -d win/data ] ; then
+ echo This doesnt seem to be source tarball.
+ echo This script should be run from the top directory of the source tarball
+ echo that was produced by 'make dist'
+ exit 1;
+fi
+
+set -x
+
+win/configure-mariadb.sh
+
+cmake -G "Visual Studio 9 2008"
+
+devenv.com MySQL.sln /build RelWithDebInfo
+devenv.com MySQL.sln /build Debug
+
+# TODO extract version number
+VER=`cat configure.in |
+ perl -e 'while (<>) { if (/^AM_INIT_AUTOMAKE\([a-z ]*, *([0-9a-z\.-]+)/) { print "$1\n"; exit(0)} } ; exit 1'`
+
+echo Version string: $VER.
+
+# Remove '-maria-' from version number
+VER_NO_MARIA=${VER/maria-/}
+
+# We want the final zip to be named like this:
+# mariadb-noinstall-5.1.38-win32.zip
+ZIPNAME=mariadb-noinstall-$VER_NO_MARIA-win32
+ZIPFILE=$ZIPNAME.zip
+
+# The top directory inside the zip should be called like this:
+# mariadb-5.1-38-win32
+ZIPCONTENT=mariadb-$VER_NO_MARIA-win32
+
+# This will make $ZIPCONTENT.zip
+sh -x scripts/make_win_bin_dist $ZIPCONTENT
+
+mv $ZIPCONTENT.zip $ZIPFILE
+
+rm -rf unpack
+mkdir unpack
+
+cd unpack
+wget -O base.list.gz \
+http://askmonty.org/wiki/images/5/57/Mariadb-5.1-pre-beta-file-list-r2.txt.gz
+gunzip base.list.gz
+unzip ../$ZIPFILE
+(cd $ZIPCONTENT; /bin/find . | sort ) > new.list
+
+diff -u base.list new.list || true
+RES=$?
+
+cd ..
+
+rm -rf unpack
+ls -lah $ZIPFILE
+echo "$ZIPFILE is the Windows noinstall binary zip"
+
+if [ $RES ] ; then
+ echo "Archive contents differ from the standard file list, check the diff output above"
+else
+ echo "Archive contents match the standard list, OK"
+fi
+
1
0
[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (knielsen:2744)
by knielsen@knielsen-hq.org 15 Oct '09
by knielsen@knielsen-hq.org 15 Oct '09
15 Oct '09
#At lp:maria
2744 knielsen(a)knielsen-hq.org 2009-10-15 [merge]
Merge MySQL 5.1.39 into MariaDB 5.1.
added:
mysql-test/extra/rpl_tests/rpl_mixing_engines.test
mysql-test/include/partition_date_range.inc
mysql-test/include/rpl_loaddata_charset.inc
mysql-test/r/disabled_partition.require
mysql-test/r/partition_disabled.result
mysql-test/std_data/loaddata_utf8.dat
mysql-test/std_data/parts/t1.frm
mysql-test/suite/rpl/r/rpl_create_if_not_exists.result
mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result
mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result
mysql-test/suite/rpl/t/rpl_create_if_not_exists.test
mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test
mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test
mysql-test/t/partition_disabled-master.opt
mysql-test/t/partition_disabled.test
modified:
BUILD/check-cpu
client/mysql.cc
client/mysql_upgrade.c
client/mysqladmin.cc
client/mysqldump.c
client/mysqltest.cc
cmd-line-utils/readline/bind.c
cmd-line-utils/readline/histfile.c
cmd-line-utils/readline/undo.c
include/my_global.h
libmysql/libmysql.c
mysql-test/collections/default.experimental
mysql-test/include/commit.inc
mysql-test/r/analyse.result
mysql-test/r/auto_increment.result
mysql-test/r/commit_1innodb.result
mysql-test/r/group_min_max.result
mysql-test/r/handler_myisam.result
mysql-test/r/lock_multi_bug38499.result
mysql-test/r/lock_multi_bug38691.result
mysql-test/r/merge.result
mysql-test/r/mysqlbinlog_row_trans.result
mysql-test/r/not_partition.result
mysql-test/r/partition.result
mysql-test/r/partition_pruning.result
mysql-test/r/partition_range.result
mysql-test/r/subselect.result
mysql-test/r/type_newdecimal.result
mysql-test/r/view.result
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
mysql-test/suite/rpl/r/rpl_concurrency_error.result
mysql-test/suite/rpl/r/rpl_drop_if_exists.result
mysql-test/suite/rpl/r/rpl_drop_temp.result
mysql-test/suite/rpl/r/rpl_events.result
mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
mysql-test/suite/rpl/r/rpl_loaddata_charset.result
mysql-test/suite/rpl/r/rpl_rewrt_db.result
mysql-test/suite/rpl/t/rpl_concurrency_error.test
mysql-test/suite/rpl/t/rpl_drop_temp.test
mysql-test/suite/rpl/t/rpl_events.test
mysql-test/suite/rpl/t/rpl_loaddata_charset.test
mysql-test/suite/rpl/t/rpl_rewrt_db-slave.opt
mysql-test/suite/rpl/t/rpl_rewrt_db.test
mysql-test/t/analyse.test
mysql-test/t/auto_increment.test
mysql-test/t/group_min_max.test
mysql-test/t/handler_myisam.test
mysql-test/t/lock_multi_bug38499.test
mysql-test/t/lock_multi_bug38691.test
mysql-test/t/merge.test
mysql-test/t/not_partition.test
mysql-test/t/partition.test
mysql-test/t/partition_pruning.test
mysql-test/t/subselect.test
mysql-test/t/type_newdecimal.test
mysql-test/t/view.test
mysys/array.c
mysys/mf_iocache.c
mysys/mf_pack.c
mysys/my_copy.c
mysys/my_getopt.c
mysys/my_redel.c
mysys/typelib.c
regex/regcomp.c
scripts/make_win_bin_dist
server-tools/instance-manager/mysql_connection.cc
sql-common/client.c
sql-common/my_time.c
sql/client_settings.h
sql/events.cc
sql/field.cc
sql/field.h
sql/ha_partition.cc
sql/item.cc
sql/item.h
sql/item_cmpfunc.cc
sql/item_create.cc
sql/item_func.cc
sql/item_func.h
sql/item_sum.cc
sql/item_timefunc.cc
sql/lock.cc
sql/log.cc
sql/log_event.cc
sql/my_decimal.h
sql/mysql_priv.h
sql/opt_range.cc
sql/partition_info.h
sql/share/errmsg.txt
sql/slave.cc
sql/spatial.cc
sql/sql_base.cc
sql/sql_db.cc
sql/sql_delete.cc
sql/sql_insert.cc
sql/sql_parse.cc
sql/sql_partition.cc
sql/sql_profile.cc
sql/sql_select.cc
sql/sql_show.cc
sql/sql_table.cc
sql/sql_update.cc
sql/sql_view.cc
sql/sql_yacc.yy
sql/table.cc
storage/heap/hp_test2.c
storage/myisam/ft_boolean_search.c
storage/myisam/mi_check.c
storage/myisam/mi_create.c
storage/myisam/mi_delete.c
storage/myisam/mi_dynrec.c
storage/myisam/mi_open.c
storage/myisam/mi_packrec.c
storage/myisam/mi_search.c
storage/myisam/mi_update.c
storage/myisam/sort.c
storage/myisammrg/ha_myisammrg.cc
storage/myisammrg/myrg_open.c
storage/myisammrg/myrg_rkey.c
storage/ndb/include/mgmapi/ndb_logevent.h
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
storage/ndb/src/mgmsrv/InitConfigFileParser.cpp
strings/ctype-ucs2.c
strings/ctype-utf8.c
strings/decimal.c
support-files/mysql.spec.sh
tests/mysql_client_test.c
=== modified file 'BUILD/check-cpu'
--- a/BUILD/check-cpu 2009-07-10 13:04:40 +0000
+++ b/BUILD/check-cpu 2009-09-01 13:39:13 +0000
@@ -70,6 +70,11 @@ check_cpu () {
Alpha*EV6*)
cpu_arg="ev6";
;;
+ #Core 2 Duo
+ *Intel*Core\(TM\)2*)
+ cpu_arg="nocona"
+ core2="yes"
+ ;;
# Intel ia32
*Intel*Core*|*X[eE][oO][nN]*)
# a Xeon is just another pentium4 ...
@@ -134,10 +139,6 @@ check_cpu () {
*i386*)
cpu_arg="i386"
;;
- #Core 2 Duo
- *Intel*Core\(TM\)2*)
- cpu_arg="nocona"
- ;;
# Intel ia64
*Itanium*)
cpu_arg="itanium"
=== modified file 'client/mysql.cc'
--- a/client/mysql.cc 2009-10-02 11:56:11 +0000
+++ b/client/mysql.cc 2009-10-15 21:38:29 +0000
@@ -86,7 +86,7 @@ extern "C" {
#endif
#undef bcmp // Fix problem with new readline
-#if defined( __WIN__)
+#if defined(__WIN__)
#include <conio.h>
#elif !defined(__NETWARE__)
#include <readline/readline.h>
@@ -106,7 +106,7 @@ extern "C" {
#define cmp_database(cs,A,B) strcmp((A),(B))
#endif
-#if !defined( __WIN__) && !defined(__NETWARE__) && !defined(THREAD)
+#if !defined(__WIN__) && !defined(__NETWARE__) && !defined(THREAD)
#define USE_POPEN
#endif
@@ -1870,7 +1870,7 @@ static int read_and_execute(bool interac
if (opt_outfile && glob_buffer.is_empty())
fflush(OUTFILE);
-#if defined( __WIN__) || defined(__NETWARE__)
+#if defined(__WIN__) || defined(__NETWARE__)
tee_fputs(prompt, stdout);
#if defined(__NETWARE__)
line=fgets(linebuffer, sizeof(linebuffer)-1, stdin);
@@ -1881,7 +1881,7 @@ static int read_and_execute(bool interac
if (p != NULL)
*p = '\0';
}
-#else defined(__WIN__)
+#else
if (!tmpbuf.is_alloced())
tmpbuf.alloc(65535);
tmpbuf.length(0);
@@ -1907,7 +1907,7 @@ static int read_and_execute(bool interac
if (opt_outfile)
fputs(prompt, OUTFILE);
line= readline(prompt);
-#endif /* defined( __WIN__) || defined(__NETWARE__) */
+#endif /* defined(__WIN__) || defined(__NETWARE__) */
/*
When Ctrl+d or Ctrl+z is pressed, the line may be NULL on some OS
@@ -1955,10 +1955,10 @@ static int read_and_execute(bool interac
}
}
-#if defined( __WIN__) || defined(__NETWARE__)
+#if defined(__WIN__) || defined(__NETWARE__)
buffer.free();
#endif
-#if defined( __WIN__)
+#if defined(__WIN__)
tmpbuf.free();
#endif
@@ -3829,7 +3829,8 @@ com_edit(String *buffer,char *line __att
!(editor = (char *)getenv("VISUAL")))
editor = "vi";
strxmov(buff,editor," ",filename,NullS);
- (void) system(buff);
+ if(system(buff) == -1)
+ goto err;
MY_STAT stat_arg;
if (!my_stat(filename,&stat_arg,MYF(MY_WME)))
@@ -4630,7 +4631,7 @@ void tee_putc(int c, FILE *file)
putc(c, OUTFILE);
}
-#if defined( __WIN__) || defined(__NETWARE__)
+#if defined(__WIN__) || defined(__NETWARE__)
#include <time.h>
#else
#include <sys/times.h>
@@ -4642,7 +4643,7 @@ void tee_putc(int c, FILE *file)
static ulong start_timer(void)
{
-#if defined( __WIN__) || defined(__NETWARE__)
+#if defined(__WIN__) || defined(__NETWARE__)
return clock();
#else
struct tms tms_tmp;
=== modified file 'client/mysql_upgrade.c'
--- a/client/mysql_upgrade.c 2009-07-16 12:43:17 +0000
+++ b/client/mysql_upgrade.c 2009-08-28 16:21:54 +0000
@@ -552,6 +552,7 @@ static int upgrade_already_done(void)
FILE *in;
char upgrade_info_file[FN_REFLEN]= {0};
char buf[sizeof(MYSQL_SERVER_VERSION)+1];
+ char *res;
if (get_upgrade_info_file_name(upgrade_info_file))
return 0; /* Could not get filename => not sure */
@@ -564,7 +565,7 @@ static int upgrade_already_done(void)
will be detected by the strncmp
*/
bzero(buf, sizeof(buf));
- fgets(buf, sizeof(buf), in);
+ res= fgets(buf, sizeof(buf), in);
my_fclose(in, MYF(0));
=== modified file 'client/mysqladmin.cc'
--- a/client/mysqladmin.cc 2009-09-07 20:50:10 +0000
+++ b/client/mysqladmin.cc 2009-10-15 21:38:29 +0000
@@ -22,6 +22,7 @@
#endif
#include <sys/stat.h>
#include <mysql.h>
+#include <sql_common.h>
#define ADMIN_VERSION "8.42"
#define MAX_MYSQL_VAR 512
@@ -353,6 +354,11 @@ int main(int argc,char *argv[])
if (sql_connect(&mysql, option_wait))
{
+ /*
+ We couldn't get an initial connection and will definitely exit.
+ The following just determines the exit-code we'll give.
+ */
+
unsigned int err= mysql_errno(&mysql);
if (err >= CR_MIN_ERROR && err <= CR_MAX_ERROR)
error= 1;
@@ -371,41 +377,79 @@ int main(int argc,char *argv[])
}
else
{
- while (!interrupted)
+ /*
+ --count=0 aborts right here. Otherwise iff --sleep=t ("interval")
+ is given a t!=0, we get an endless loop, or n iterations if --count=n
+ was given an n!=0. If --sleep wasn't given, we get one iteration.
+
+ To wit, --wait loops the connection-attempts, while --sleep loops
+ the command execution (endlessly if no --count is given).
+ */
+
+ while (!interrupted && (!opt_count_iterations || nr_iterations))
{
new_line = 0;
- if ((error=execute_commands(&mysql,argc,commands)))
+
+ if ((error= execute_commands(&mysql,argc,commands)))
{
+ /*
+ Unknown/malformed command always aborts and can't be --forced.
+ If the user got confused about the syntax, proceeding would be
+ dangerous ...
+ */
if (error > 0)
- break; /* Wrong command error */
- if (!option_force)
+ break;
+
+ /*
+ Command was well-formed, but failed on the server. Might succeed
+ on retry (if conditions on server change etc.), but needs --force
+ to retry.
+ */
+ if (!option_force)
+ break;
+ } /* if((error= ... */
+
+ if (interval) /* --sleep=interval given */
+ {
+ /*
+ If connection was dropped (unintentionally, or due to SHUTDOWN),
+ re-establish it if --wait ("retry-connect") was given and user
+ didn't signal for us to die. Otherwise, signal failure.
+ */
+
+ if (mysql.net.vio == 0)
{
if (option_wait && !interrupted)
{
- mysql_close(&mysql);
- if (!sql_connect(&mysql, option_wait))
- {
- sleep(1); /* Don't retry too rapidly */
- continue; /* Retry */
- }
+ sleep(1);
+ sql_connect(&mysql, option_wait);
+ /*
+ continue normally and decrease counters so that
+ "mysqladmin --count=1 --wait=1 shutdown"
+ cannot loop endlessly.
+ */
}
- error=1;
- break;
- }
- }
- if (interval)
- {
- if (opt_count_iterations && --nr_iterations == 0)
- break;
+ else
+ {
+ /*
+ connexion broke, and we have no order to re-establish it. fail.
+ */
+ if (!option_force)
+ error= 1;
+ break;
+ }
+ } /* lost connection */
+
sleep(interval);
if (new_line)
puts("");
}
else
- break;
- }
- mysql_close(&mysql);
- }
+ break; /* no --sleep, done looping */
+ } /* command-loop */
+ } /* got connection */
+
+ mysql_close(&mysql);
my_free(opt_password,MYF(MY_ALLOW_ZERO_PTR));
my_free(user,MYF(MY_ALLOW_ZERO_PTR));
#ifdef HAVE_SMEM
@@ -423,6 +467,17 @@ sig_handler endprog(int signal_number __
interrupted=1;
}
+/**
+ @brief connect to server, optionally waiting for same to come up
+
+ @param mysql connection struct
+ @param wait wait for server to come up?
+ (0: no, ~0: forever, n: cycles)
+
+ @return Operation result
+ @retval 0 success
+ @retval 1 failure
+*/
static my_bool sql_connect(MYSQL *mysql, uint wait)
{
@@ -431,7 +486,7 @@ static my_bool sql_connect(MYSQL *mysql,
for (;;)
{
if (mysql_real_connect(mysql,host,user,opt_password,NullS,tcp_port,
- unix_port, 0))
+ unix_port, CLIENT_REMEMBER_OPTIONS))
{
mysql->reconnect= 1;
if (info)
@@ -442,9 +497,9 @@ static my_bool sql_connect(MYSQL *mysql,
return 0;
}
- if (!wait)
+ if (!wait) // was or reached 0, fail
{
- if (!option_silent)
+ if (!option_silent) // print diagnostics
{
if (!host)
host= (char*) LOCAL_HOST;
@@ -468,11 +523,18 @@ static my_bool sql_connect(MYSQL *mysql,
}
return 1;
}
+
if (wait != (uint) ~0)
- wait--; /* One less retry */
+ wait--; /* count down, one less retry */
+
if ((mysql_errno(mysql) != CR_CONN_HOST_ERROR) &&
(mysql_errno(mysql) != CR_CONNECTION_ERROR))
{
+ /*
+ Error is worse than "server doesn't answer (yet?)";
+ fail even if we still have "wait-coins" unless --force
+ was also given.
+ */
fprintf(stderr,"Got error: %s\n", mysql_error(mysql));
if (!option_force)
return 1;
@@ -496,11 +558,18 @@ static my_bool sql_connect(MYSQL *mysql,
}
-/*
- Execute a command.
- Return 0 on ok
- -1 on retryable error
- 1 on fatal error
+/**
+ @brief Execute all commands
+
+ @details We try to execute all commands we were given, in the order
+ given, but return with non-zero as soon as we encounter trouble.
+ By that token, individual commands can be considered a conjunction
+ with boolean short-cut.
+
+ @return success?
+ @retval 0 Yes! ALL commands worked!
+ @retval 1 No, one failed and will never work (malformed): fatal error!
+ @retval -1 No, one failed on the server, may work next time!
*/
static int execute_commands(MYSQL *mysql,int argc, char **argv)
@@ -570,7 +639,6 @@ static int execute_commands(MYSQL *mysql
mysql_error(mysql));
return -1;
}
- mysql_close(mysql); /* Close connection to avoid error messages */
argc=1; /* force SHUTDOWN to be the last command */
if (got_pidfile)
{
@@ -1036,14 +1104,16 @@ static void usage(void)
static int drop_db(MYSQL *mysql, const char *db)
{
char name_buff[FN_REFLEN+20], buf[10];
+ char *input;
+
if (!option_force)
{
puts("Dropping the database is potentially a very bad thing to do.");
puts("Any data stored in the database will be destroyed.\n");
printf("Do you really want to drop the '%s' database [y/N] ",db);
fflush(stdout);
- VOID(fgets(buf,sizeof(buf)-1,stdin));
- if ((*buf != 'y') && (*buf != 'Y'))
+ input= fgets(buf, sizeof(buf)-1, stdin);
+ if (!input || ((*input != 'y') && (*input != 'Y')))
{
puts("\nOK, aborting database drop!");
return -1;
=== modified file 'client/mysqldump.c'
--- a/client/mysqldump.c 2009-09-07 20:50:10 +0000
+++ b/client/mysqldump.c 2009-10-15 21:38:29 +0000
@@ -5008,7 +5008,7 @@ int main(int argc, char **argv)
exit_code= get_options(&argc, &argv);
if (exit_code)
{
- free_resources(0);
+ free_resources();
exit(exit_code);
}
@@ -5016,14 +5016,14 @@ int main(int argc, char **argv)
{
if(!(stderror_file= freopen(log_error_file, "a+", stderr)))
{
- free_resources(0);
+ free_resources();
exit(EX_MYSQLERR);
}
}
if (connect_to_db(current_host, current_user, opt_password))
{
- free_resources(0);
+ free_resources();
exit(EX_MYSQLERR);
}
if (!path)
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc 2009-09-07 20:50:10 +0000
+++ b/client/mysqltest.cc 2009-10-15 21:38:29 +0000
@@ -440,10 +440,12 @@ DYNAMIC_STRING ds_res;
char builtin_echo[FN_REFLEN];
+static void cleanup_and_exit(int exit_code) __attribute__((noreturn));
+
void die(const char *fmt, ...)
- ATTRIBUTE_FORMAT(printf, 1, 2);
+ ATTRIBUTE_FORMAT(printf, 1, 2) __attribute__((noreturn));
void abort_not_supported_test(const char *fmt, ...)
- ATTRIBUTE_FORMAT(printf, 1, 2);
+ ATTRIBUTE_FORMAT(printf, 1, 2) __attribute__((noreturn));
void verbose_msg(const char *fmt, ...)
ATTRIBUTE_FORMAT(printf, 1, 2);
void log_msg(const char *fmt, ...)
@@ -3734,10 +3736,9 @@ void do_wait_for_slave_to_stop(struct st
MYSQL* mysql = &cur_con->mysql;
for (;;)
{
- MYSQL_RES *res;
+ MYSQL_RES *UNINIT_VAR(res);
MYSQL_ROW row;
int done;
- LINT_INIT(res);
if (mysql_query(mysql,"show status like 'Slave_running'") ||
!(res=mysql_store_result(mysql)))
@@ -5272,13 +5273,12 @@ my_bool end_of_query(int c)
int read_line(char *buf, int size)
{
- char c, last_quote;
+ char c, UNINIT_VAR(last_quote);
char *p= buf, *buf_end= buf + size - 1;
int skip_char= 0;
enum {R_NORMAL, R_Q, R_SLASH_IN_Q,
R_COMMENT, R_LINE_START} state= R_LINE_START;
DBUG_ENTER("read_line");
- LINT_INIT(last_quote);
start_lineno= cur_file->lineno;
DBUG_PRINT("info", ("Starting to read at lineno: %d", start_lineno));
@@ -6527,8 +6527,7 @@ void run_query_normal(struct st_connecti
if (!disable_result_log)
{
- ulonglong affected_rows; /* Ok to be undef if 'disable_info' is set */
- LINT_INIT(affected_rows);
+ ulonglong UNINIT_VAR(affected_rows); /* Ok to be undef if 'disable_info' is set */
if (res)
{
=== modified file 'cmd-line-utils/readline/bind.c'
--- a/cmd-line-utils/readline/bind.c 2009-09-07 20:50:10 +0000
+++ b/cmd-line-utils/readline/bind.c 2009-10-15 21:38:29 +0000
@@ -339,9 +339,7 @@ rl_generic_bind (type, keyseq, data, map
char *keys;
int keys_len;
register int i;
- KEYMAP_ENTRY k;
-
- k.function = 0;
+ KEYMAP_ENTRY k= { 0, NULL };
/* If no keys to bind to, exit right away. */
if (keyseq == 0 || *keyseq == 0)
@@ -776,7 +774,7 @@ _rl_read_file (filename, sizep)
file_size = (size_t)finfo.st_size;
/* check for overflow on very large files */
-if ((sizeof(off_t) > sizeof(size_t) && finfo.st_size > (off_t)(size_t)~0) ||
+ if ((sizeof(off_t) > sizeof(size_t) && finfo.st_size > (off_t)(size_t)~0) ||
file_size + 1 < file_size)
{
if (file >= 0)
=== modified file 'cmd-line-utils/readline/histfile.c'
--- a/cmd-line-utils/readline/histfile.c 2009-06-29 14:00:47 +0000
+++ b/cmd-line-utils/readline/histfile.c 2009-08-28 16:21:54 +0000
@@ -186,7 +186,7 @@ read_history_range (filename, from, to)
file_size = (size_t)finfo.st_size;
/* check for overflow on very large files */
-if ((sizeof(off_t) > sizeof(size_t) && finfo.st_size > (off_t)(size_t)~0) ||
+ if ((sizeof(off_t) > sizeof(size_t) && finfo.st_size > (off_t)(size_t)~0) ||
file_size + 1 < file_size)
{
errno = overflow_errno;
@@ -311,6 +311,7 @@ history_truncate_file (fname, lines)
int file, chars_read, rv;
struct stat finfo;
size_t file_size;
+ size_t bytes_written;
buffer = (char *)NULL;
filename = history_filename (fname);
@@ -340,7 +341,7 @@ history_truncate_file (fname, lines)
file_size = (size_t)finfo.st_size;
/* check for overflow on very large files */
-if ((sizeof(off_t) > sizeof(size_t) && finfo.st_size > (off_t)(size_t)~0) ||
+ if ((sizeof(off_t) > sizeof(size_t) && finfo.st_size > (off_t)(size_t)~0) ||
file_size + 1 < file_size)
{
close (file);
@@ -400,7 +401,7 @@ if ((sizeof(off_t) > sizeof(size_t) && f
truncate to. */
if (bp > buffer && ((file = open (filename, O_WRONLY|O_TRUNC|O_BINARY, 0600)) != -1))
{
- write (file, bp, chars_read - (bp - buffer));
+ bytes_written= write (file, bp, chars_read - (bp - buffer));
#if defined (__BEOS__)
/* BeOS ignores O_TRUNC. */
=== modified file 'cmd-line-utils/readline/undo.c'
--- a/cmd-line-utils/readline/undo.c 2009-06-29 14:00:47 +0000
+++ b/cmd-line-utils/readline/undo.c 2009-08-28 16:21:54 +0000
@@ -137,7 +137,8 @@ UNDO_LIST *
_rl_copy_undo_list (head)
UNDO_LIST *head;
{
- UNDO_LIST *list, *new, *roving, *c;
+ UNDO_LIST *list, *new, *c;
+ UNDO_LIST *roving= NULL;
list = head;
new = 0;
=== modified file 'include/my_global.h'
--- a/include/my_global.h 2009-09-16 19:05:03 +0000
+++ b/include/my_global.h 2009-10-15 21:38:29 +0000
@@ -578,6 +578,25 @@ int __void__;
#define IF_VALGRIND(A,B) (B)
#endif
+/*
+ Suppress uninitialized variable warning without generating code.
+
+ The _cplusplus is a temporary workaround for C++ code pending a fix
+ for a g++ bug (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34772)
+*/
+#if defined(_lint) || defined(FORCE_INIT_OF_VARS) || defined(__cplusplus) || \
+ !defined(__GNUC__)
+#define UNINIT_VAR(x) x= 0
+#else
+#define UNINIT_VAR(x) x= x
+#endif
+
+/* Define some useful general macros */
+#if !defined(max)
+#define max(a, b) ((a) > (b) ? (a) : (b))
+#define min(a, b) ((a) < (b) ? (a) : (b))
+#endif
+
#if !defined(HAVE_UINT)
#undef HAVE_UINT
#define HAVE_UINT
=== modified file 'libmysql/libmysql.c'
--- a/libmysql/libmysql.c 2009-10-02 10:36:28 +0000
+++ b/libmysql/libmysql.c 2009-10-15 21:38:29 +0000
@@ -1647,8 +1647,7 @@ myodbc_remove_escape(MYSQL *mysql,char *
char *to;
#ifdef USE_MB
my_bool use_mb_flag=use_mb(mysql->charset);
- char *end;
- LINT_INIT(end);
+ char *UNINIT_VAR(end);
if (use_mb_flag)
for (end=name; *end ; end++) ;
#endif
=== modified file 'mysql-test/collections/default.experimental'
--- a/mysql-test/collections/default.experimental 2009-07-08 07:31:49 +0000
+++ b/mysql-test/collections/default.experimental 2009-08-13 20:45:01 +0000
@@ -2,12 +2,5 @@ funcs_1.charset_collation_1
binlog.binlog_tmp_table # Bug#45578: Test binlog_tmp_table fails ramdonly on PB2: Unknown table 't2'
main.ctype_gbk_binlog # Bug#46010: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists
rpl.rpl_row_create_table # Bug#45576: rpl_row_create_table fails on PB2
-rpl.rpl_extraColmaster_myisam # Bug#46013: rpl_extraColmaster_myisam fails on pb2
-rpl.rpl_stm_reset_slave # Bug#46014: rpl_stm_reset_slave crashes the server sporadically in pb2
-rpl.rpl_extraCol_myisam # Bug#40796
-rpl.rpl_extraColmaster_innodb # Bug#40796
-rpl.rpl_extraCol_innodb # Bug#40796
rpl_ndb.rpl_ndb_log # Bug#38998
rpl.rpl_innodb_bug28430 # Bug#46029
-rpl.rpl_row_basic_3innodb # Bug#45243
-rpl.rpl_truncate_3innodb # Bug#46030
=== added file 'mysql-test/extra/rpl_tests/rpl_mixing_engines.test'
--- a/mysql-test/extra/rpl_tests/rpl_mixing_engines.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_mixing_engines.test 2009-08-27 12:46:29 +0000
@@ -0,0 +1,710 @@
+###################################################################################
+# This test checks if transactions that mixes transactional and non-transactional
+# tables are correctly handled in statement mode. In an nutshell, we have what
+# follows:
+#
+# 1) "B T T C" generates in binlog the "B T T C" entries.
+#
+# 2) "B T T R" generates in binlog an "empty" entry.
+#
+# 3) "B T N C" generates in binlog the "B T N C" entries.
+#
+# 4) "B T N R" generates in binlog the "B T N R" entries.
+#
+# 5) "T" generates in binlog the "B T C" entry.
+#
+# 6) "N" generates in binlog the "N" entry.
+#
+# 7) "M" generates in binglog the "B M C" entries.
+#
+# 8) "B N N T C" generates in binglog the "N N B T C" entries.
+#
+# 9) "B N N T R" generates in binlog the "N N B T R" entries.
+#
+# 10) "B N N C" generates in binglog the "N N" entries.
+#
+# 11) "B N N R" generates in binlog the "N N" entries.
+#
+# 12) "B M T C" generates in the binlog the "B M T C" entries.
+#
+# 13) "B M T R" generates in the binlog the "B M T R" entries.
+###################################################################################
+
+--echo ###################################################################################
+--echo # CONFIGURATION
+--echo ###################################################################################
+connection master;
+
+SET SQL_LOG_BIN=0;
+CREATE TABLE nt_1 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM;
+CREATE TABLE nt_2 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM;
+CREATE TABLE nt_3 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM;
+CREATE TABLE nt_4 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM;
+CREATE TABLE tt_1 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb;
+CREATE TABLE tt_2 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb;
+CREATE TABLE tt_3 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb;
+CREATE TABLE tt_4 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb;
+SET SQL_LOG_BIN=1;
+
+connection slave;
+
+SET SQL_LOG_BIN=0;
+CREATE TABLE nt_1 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM;
+CREATE TABLE nt_2 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM;
+CREATE TABLE nt_3 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM;
+CREATE TABLE nt_4 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM;
+CREATE TABLE tt_1 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb;
+CREATE TABLE tt_2 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb;
+CREATE TABLE tt_3 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb;
+CREATE TABLE tt_4 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb;
+SET SQL_LOG_BIN=1;
+
+connection master;
+
+DELIMITER |;
+
+CREATE FUNCTION f1 () RETURNS VARCHAR(64)
+BEGIN
+ RETURN "Testing...";
+END|
+
+CREATE FUNCTION f2 () RETURNS VARCHAR(64)
+BEGIN
+ RETURN f1();
+END|
+
+CREATE PROCEDURE pc_i_tt_3 (IN x INT, IN y VARCHAR(64))
+BEGIN
+ INSERT INTO tt_3 VALUES (y,x,x);
+END|
+
+CREATE TRIGGER tr_i_tt_3_to_nt_3 BEFORE INSERT ON tt_3 FOR EACH ROW
+BEGIN
+ INSERT INTO nt_3 VALUES (NEW.a, NEW.b, NEW.c);
+END|
+
+CREATE TRIGGER tr_i_nt_4_to_tt_4 BEFORE INSERT ON nt_4 FOR EACH ROW
+BEGIN
+ INSERT INTO tt_4 VALUES (NEW.a, NEW.b, NEW.c);
+END|
+
+DELIMITER ;|
+
+--echo ###################################################################################
+--echo # MIXING TRANSACTIONAL and NON-TRANSACTIONAL TABLES
+--echo ###################################################################################
+connection master;
+
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo #
+--echo #1) "B T T C" generates in binlog the "B T T C" entries.
+--echo #
+BEGIN;
+INSERT INTO tt_1 VALUES ("new text 4", 4, "new text 4");
+INSERT INTO tt_2 VALUES ("new text 4", 4, "new text 4");
+COMMIT;
+
+--source include/show_binlog_events.inc
+
+--echo
+--echo
+--echo
+--echo
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo #
+--echo #1.e) "B T T C" with error in T generates in binlog the "B T T C" entries.
+--echo #
+INSERT INTO tt_1 VALUES ("new text -2", -2, "new text -2");
+BEGIN;
+--error ER_DUP_ENTRY
+INSERT INTO tt_1 VALUES ("new text -1", -1, "new text -1"), ("new text -2", -2, "new text -2");
+INSERT INTO tt_2 VALUES ("new text -3", -3, "new text -3");
+COMMIT;
+
+BEGIN;
+INSERT INTO tt_2 VALUES ("new text -5", -5, "new text -5");
+--error ER_DUP_ENTRY
+INSERT INTO tt_2 VALUES ("new text -4", -4, "new text -4"), ("new text -5", -5, "new text -5");
+COMMIT;
+
+--source include/show_binlog_events.inc
+
+--echo
+--echo
+--echo
+--echo
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo #
+--echo #2) "B T T R" generates in binlog an "empty" entry.
+--echo #
+BEGIN;
+INSERT INTO tt_1 VALUES ("new text 5", 5, "new text 5");
+INSERT INTO tt_2 VALUES ("new text 5", 5, "new text 5");
+ROLLBACK;
+
+--source include/show_binlog_events.inc
+
+--echo
+--echo
+--echo
+--echo
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo #
+--echo #2.e) "B T T R" with error in T generates in binlog an "empty" entry.
+--echo #
+INSERT INTO tt_1 VALUES ("new text -7", -7, "new text -7");
+BEGIN;
+--error ER_DUP_ENTRY
+INSERT INTO tt_1 VALUES ("new text -6", -6, "new text -6"), ("new text -7", -7, "new text -7");
+INSERT INTO tt_2 VALUES ("new text -8", -8, "new text -8");
+ROLLBACK;
+
+BEGIN;
+INSERT INTO tt_2 VALUES ("new text -10", -10, "new text -10");
+--error ER_DUP_ENTRY
+INSERT INTO tt_2 VALUES ("new text -9", -9, "new text -9"), ("new text -10", -10, "new text -10");
+ROLLBACK;
+
+--source include/show_binlog_events.inc
+
+--echo
+--echo
+--echo
+--echo
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo #
+--echo #3) "B T N C" generates in binlog the "B T N C" entries.
+--echo #
+BEGIN;
+INSERT INTO tt_1 VALUES ("new text 6", 6, "new text 6");
+INSERT INTO nt_1 VALUES ("new text 6", 6, "new text 6");
+COMMIT;
+
+--source include/show_binlog_events.inc
+
+--echo
+--echo
+--echo
+--echo
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo #
+--echo #3.e) "B T N C" with error in either T or N generates in binlog the "B T N C" entries.
+--echo #
+INSERT INTO tt_1 VALUES ("new text -12", -12, "new text -12");
+BEGIN;
+--error ER_DUP_ENTRY
+INSERT INTO tt_1 VALUES ("new text -11", -11, "new text -11"), ("new text -12", -12, "new text -12");
+INSERT INTO nt_1 VALUES ("new text -13", -13, "new text -13");
+COMMIT;
+
+BEGIN;
+INSERT INTO tt_1 VALUES ("new text -14", -14, "new text -14");
+INSERT INTO nt_1 VALUES ("new text -16", -16, "new text -16");
+--error ER_DUP_ENTRY
+INSERT INTO nt_1 VALUES ("new text -15", -15, "new text -15"), ("new text -16", -16, "new text -16");
+COMMIT;
+
+--source include/show_binlog_events.inc
+
+--echo
+--echo
+--echo
+--echo
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo #
+--echo #4) "B T N R" generates in binlog the "B T N R" entries.
+--echo #
+BEGIN;
+INSERT INTO tt_1 VALUES ("new text 7", 7, "new text 7");
+INSERT INTO nt_1 VALUES ("new text 7", 7, "new text 7");
+ROLLBACK;
+
+--source include/show_binlog_events.inc
+
+--echo
+--echo
+--echo
+--echo
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo #
+--echo #4.e) "B T N R" with error in either T or N generates in binlog the "B T N R" entries.
+--echo #
+INSERT INTO tt_1 VALUES ("new text -17", -17, "new text -17");
+BEGIN;
+--error ER_DUP_ENTRY
+INSERT INTO tt_1 VALUES ("new text -16", -16, "new text -16"), ("new text -17", -17, "new text -17");
+INSERT INTO nt_1 VALUES ("new text -18", -18, "new text -18");
+ROLLBACK;
+
+BEGIN;
+INSERT INTO tt_1 VALUES ("new text -19", -19, "new text -19");
+INSERT INTO nt_1 VALUES ("new text -21", -21, "new text -21");
+--error ER_DUP_ENTRY
+INSERT INTO nt_1 VALUES ("new text -20", -20, "new text -20"), ("new text -21", -21, "new text -21");
+ROLLBACK;
+
+--source include/show_binlog_events.inc
+
+--echo
+--echo
+--echo
+--echo
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo #
+--echo #5) "T" generates in binlog the "B T C" entry.
+--echo #
+INSERT INTO tt_1 VALUES ("new text 8", 8, "new text 8");
+
+--source include/show_binlog_events.inc
+
+--echo
+--echo
+--echo
+--echo
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo #
+--echo #5.e) "T" with error in T generates in binlog an "empty" entry.
+--echo #
+INSERT INTO tt_1 VALUES ("new text -1", -1, "new text -1");
+--error ER_DUP_ENTRY
+INSERT INTO tt_1 VALUES ("new text -1", -1, "new text -1"), ("new text -22", -22, "new text -22");
+--error ER_DUP_ENTRY
+INSERT INTO tt_1 VALUES ("new text -23", -23, "new text -23"), ("new text -1", -1, "new text -1");
+
+--source include/show_binlog_events.inc
+
+--echo
+--echo
+--echo
+--echo
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo #
+--echo #6) "N" generates in binlog the "N" entry.
+--echo #
+INSERT INTO nt_1 VALUES ("new text 9", 9, "new text 9");
+
+--source include/show_binlog_events.inc
+
+--echo
+--echo
+--echo
+--echo
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo #
+--echo #6.e) "N" with error in N generates in binlog an empty entry if the error
+--echo # happens in the first tuple. Otherwise, generates the "N" entry and
+--echo # the error is appended.
+--echo #
+INSERT INTO nt_1 VALUES ("new text -1", -1, "new text -1");
+--error ER_DUP_ENTRY
+INSERT INTO nt_1 VALUES ("new text -1", -1, "new text -1");
+--error ER_DUP_ENTRY
+INSERT INTO nt_1 VALUES ("new text -24", -24, "new text -24"), ("new text -1", -1, "new text -1");
+
+--source include/show_binlog_events.inc
+
+--echo
+--echo
+--echo
+--echo
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo #
+--echo #7) "M" generates in binglog the "B M C" entries.
+--echo #
+
+DELETE FROM nt_1;
+
+INSERT INTO nt_1 SELECT * FROM tt_1;
+
+DELETE FROM tt_1;
+
+INSERT INTO tt_1 SELECT * FROM nt_1;
+
+INSERT INTO tt_3 VALUES ("new text 000", 000, '');
+
+INSERT INTO tt_3 VALUES("new text 100", 100, f1());
+
+INSERT INTO nt_4 VALUES("new text 100", 100, f1());
+
+INSERT INTO tt_3 VALUES("new text 200", 200, f2());
+
+INSERT INTO nt_4 VALUES ("new text 300", 300, '');
+
+INSERT INTO nt_4 VALUES ("new text 400", 400, f1());
+
+INSERT INTO nt_4 VALUES ("new text 500", 500, f2());
+
+CALL pc_i_tt_3(600, "Testing...");
+
+UPDATE nt_3, nt_4, tt_3, tt_4 SET nt_3.a= "new text 1", nt_4.a= "new text 1", tt_3.a= "new text 1", tt_4.a= "new text 1" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100;
+
+UPDATE tt_3, tt_4, nt_3, nt_4 SET tt_3.a= "new text 2", tt_4.a= "new text 2", nt_3.a= "new text 2", nt_4.a = "new text 2" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100;
+
+UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 3", nt_3.a= "new text 3", nt_4.a= "new text 3", tt_4.a = "new text 3" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100;
+
+UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 4", nt_3.a= "new text 4", nt_4.a= "new text 4", tt_4.a = "new text 4" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100;
+
+--source include/show_binlog_events.inc
+
+--echo
+--echo
+--echo
+--echo
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo #
+--echo #7.e) "M" with error in M generates in binglog the "B M R" entries.
+--echo #
+
+INSERT INTO nt_3 VALUES ("new text -26", -26, '');
+SELECT * FROM tt_3;
+--error ER_DUP_ENTRY
+INSERT INTO tt_3 VALUES ("new text -25", -25, ''), ("new text -26", -26, '');
+SELECT * FROM tt_3;
+
+INSERT INTO tt_4 VALUES ("new text -26", -26, '');
+SELECT * FROM nt_4;
+--error ER_DUP_ENTRY
+INSERT INTO nt_4 VALUES ("new text -25", -25, ''), ("new text -26", -26, '');
+SELECT * FROM nt_4;
+
+--source include/show_binlog_events.inc
+
+--echo
+--echo
+--echo
+--echo
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo #
+--echo #8) "B N N T C" generates in binglog the "N N B T C" entries.
+--echo #
+BEGIN;
+INSERT INTO nt_1 VALUES ("new text 10", 10, "new text 10");
+INSERT INTO nt_2 VALUES ("new text 10", 10, "new text 10");
+INSERT INTO tt_1 VALUES ("new text 10", 10, "new text 10");
+COMMIT;
+
+--source include/show_binlog_events.inc
+
+--echo
+--echo
+--echo
+--echo
+--echo #
+--echo #8.e) "B N N T R" See 6.e and 9.e.
+--echo #
+
+--echo
+--echo
+--echo
+--echo
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo #
+--echo #9) "B N N T R" generates in binlog the "N N B T R" entries.
+--echo #
+BEGIN;
+INSERT INTO nt_1 VALUES ("new text 11", 11, "new text 11");
+INSERT INTO nt_2 VALUES ("new text 11", 11, "new text 11");
+INSERT INTO tt_1 VALUES ("new text 11", 11, "new text 11");
+ROLLBACK;
+
+--source include/show_binlog_events.inc
+
+--echo
+--echo
+--echo
+--echo
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo #
+--echo #9.e) "B N N T R" with error in N generates in binlog the "N N B T R" entries.
+--echo #
+BEGIN;
+INSERT INTO nt_1 VALUES ("new text -25", -25, "new text -25");
+INSERT INTO nt_2 VALUES ("new text -25", -25, "new text -25");
+--error ER_DUP_ENTRY
+INSERT INTO nt_2 VALUES ("new text -26", -26, "new text -26"), ("new text -25", -25, "new text -25");
+INSERT INTO tt_1 VALUES ("new text -27", -27, "new text -27");
+ROLLBACK;
+
+--source include/show_binlog_events.inc
+
+--echo
+--echo
+--echo
+--echo
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo #
+--echo #10) "B N N C" generates in binglog the "N N" entries.
+--echo #
+BEGIN;
+INSERT INTO nt_1 VALUES ("new text 12", 12, "new text 12");
+INSERT INTO nt_2 VALUES ("new text 12", 12, "new text 12");
+COMMIT;
+
+--source include/show_binlog_events.inc
+
+--echo
+--echo
+--echo
+--echo
+--echo #
+--echo #10.e) "B N N C" See 6.e and 9.e.
+--echo #
+
+--echo
+--echo
+--echo
+--echo
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo #
+--echo #11) "B N N R" generates in binlog the "N N" entries.
+--echo #
+BEGIN;
+INSERT INTO nt_1 VALUES ("new text 13", 13, "new text 13");
+INSERT INTO nt_2 VALUES ("new text 13", 13, "new text 13");
+ROLLBACK;
+
+--source include/show_binlog_events.inc
+
+--echo
+--echo
+--echo
+--echo
+--echo #
+--echo #11.e) "B N N R" See 6.e and 9.e.
+--echo #
+
+--echo
+--echo
+--echo
+--echo
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo #
+--echo #12) "B M T C" generates in the binlog the "B M T C" entries.
+--echo #
+DELETE FROM nt_1;
+BEGIN;
+INSERT INTO nt_1 SELECT * FROM tt_1;
+INSERT INTO tt_2 VALUES ("new text 14", 14, "new text 14");
+COMMIT;
+
+DELETE FROM tt_1;
+BEGIN;
+INSERT INTO tt_1 SELECT * FROM nt_1;
+INSERT INTO tt_2 VALUES ("new text 15", 15, "new text 15");
+COMMIT;
+
+BEGIN;
+INSERT INTO tt_3 VALUES ("new text 700", 700, '');
+INSERT INTO tt_1 VALUES ("new text 800", 800, '');
+COMMIT;
+
+BEGIN;
+INSERT INTO tt_3 VALUES("new text 900", 900, f1());
+INSERT INTO tt_1 VALUES ("new text 1000", 1000, '');
+COMMIT;
+
+BEGIN;
+INSERT INTO tt_3 VALUES(1100, 1100, f2());
+INSERT INTO tt_1 VALUES ("new text 1200", 1200, '');
+COMMIT;
+
+BEGIN;
+INSERT INTO nt_4 VALUES ("new text 1300", 1300, '');
+INSERT INTO tt_1 VALUES ("new text 1400", 1400, '');
+COMMIT;
+
+BEGIN;
+INSERT INTO nt_4 VALUES("new text 1500", 1500, f1());
+INSERT INTO tt_1 VALUES ("new text 1600", 1600, '');
+COMMIT;
+
+BEGIN;
+INSERT INTO nt_4 VALUES("new text 1700", 1700, f2());
+INSERT INTO tt_1 VALUES ("new text 1800", 1800, '');
+COMMIT;
+
+BEGIN;
+CALL pc_i_tt_3(1900, "Testing...");
+INSERT INTO tt_1 VALUES ("new text 2000", 2000, '');
+COMMIT;
+
+BEGIN;
+UPDATE nt_3, nt_4, tt_3, tt_4 SET nt_3.a= "new text 5", nt_4.a= "new text 5", tt_3.a= "new text 5", tt_4.a= "new text 5" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100;
+INSERT INTO tt_1 VALUES ("new text 2100", 2100, '');
+COMMIT;
+
+BEGIN;
+UPDATE tt_3, tt_4, nt_3, nt_4 SET tt_3.a= "new text 6", tt_4.a= "new text 6", nt_3.a= "new text 6", nt_4.a = "new text 6" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100;
+INSERT INTO tt_1 VALUES ("new text 2200", 2200, '');
+COMMIT;
+
+BEGIN;
+UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 7", nt_3.a= "new text 7", nt_4.a= "new text 7", tt_4.a = "new text 7" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100;
+INSERT INTO tt_1 VALUES ("new text 2300", 2300, '');
+COMMIT;
+
+BEGIN;
+UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 8", nt_3.a= "new text 8", nt_4.a= "new text 8", tt_4.a = "new text 8" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100;
+INSERT INTO tt_1 VALUES ("new text 2400", 2400, '');
+COMMIT;
+
+--source include/show_binlog_events.inc
+
+--echo
+--echo
+--echo
+--echo
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo #
+--echo #12.e) "B M T C" with error in M generates in the binlog the "B M T C" entries.
+--echo #
+
+--echo # There is a bug in the slave that needs to be fixed before enabling
+--echo # this part of the test. A bug report will be filed referencing this
+--echo # test case.
+
+BEGIN;
+INSERT INTO nt_3 VALUES ("new text -28", -28, '');
+--error ER_DUP_ENTRY
+INSERT INTO tt_3 VALUES ("new text -27", -27, ''), ("new text -28", -28, '');
+INSERT INTO tt_1 VALUES ("new text -27", -27, '');
+COMMIT;
+
+BEGIN;
+INSERT INTO tt_4 VALUES ("new text -28", -28, '');
+--error ER_DUP_ENTRY
+INSERT INTO nt_4 VALUES ("new text -27", -27, ''), ("new text -28", -28, '');
+INSERT INTO tt_1 VALUES ("new text -28", -28, '');
+COMMIT;
+
+--source include/show_binlog_events.inc
+
+--echo
+--echo
+--echo
+--echo
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo #
+--echo #13) "B M T R" generates in the binlog the "B M T R" entries
+--echo #
+
+DELETE FROM nt_1;
+BEGIN;
+INSERT INTO nt_1 SELECT * FROM tt_1;
+INSERT INTO tt_2 VALUES ("new text 17", 17, "new text 17");
+ROLLBACK;
+
+DELETE FROM tt_1;
+BEGIN;
+INSERT INTO tt_1 SELECT * FROM nt_1;
+INSERT INTO tt_2 VALUES ("new text 18", 18, "new text 18");
+ROLLBACK;
+INSERT INTO tt_1 SELECT * FROM nt_1;
+
+BEGIN;
+INSERT INTO tt_3 VALUES ("new text 2500", 2500, '');
+INSERT INTO tt_1 VALUES ("new text 2600", 2600, '');
+ROLLBACK;
+
+BEGIN;
+INSERT INTO tt_3 VALUES("new text 2700", 2700, f1());
+INSERT INTO tt_1 VALUES ("new text 2800", 2800, '');
+ROLLBACK;
+
+BEGIN;
+INSERT INTO tt_3 VALUES(2900, 2900, f2());
+INSERT INTO tt_1 VALUES ("new text 3000", 3000, '');
+ROLLBACK;
+
+BEGIN;
+INSERT INTO nt_4 VALUES ("new text 3100", 3100, '');
+INSERT INTO tt_1 VALUES ("new text 3200", 3200, '');
+ROLLBACK;
+
+BEGIN;
+INSERT INTO nt_4 VALUES("new text 3300", 3300, f1());
+INSERT INTO tt_1 VALUES ("new text 3400", 3400, '');
+ROLLBACK;
+
+BEGIN;
+INSERT INTO nt_4 VALUES("new text 3500", 3500, f2());
+INSERT INTO tt_1 VALUES ("new text 3600", 3600, '');
+ROLLBACK;
+
+BEGIN;
+CALL pc_i_tt_3(3700, "Testing...");
+INSERT INTO tt_1 VALUES ("new text 3700", 3700, '');
+ROLLBACK;
+
+BEGIN;
+UPDATE nt_3, nt_4, tt_3, tt_4 SET nt_3.a= "new text 9", nt_4.a= "new text 9", tt_3.a= "new text 9", tt_4.a= "new text 9" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100;
+INSERT INTO tt_1 VALUES ("new text 3800", 3800, '');
+ROLLBACK;
+
+BEGIN;
+UPDATE tt_3, tt_4, nt_3, nt_4 SET tt_3.a= "new text 10", tt_4.a= "new text 10", nt_3.a= "new text 10", nt_4.a = "new text 10" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100;
+INSERT INTO tt_1 VALUES ("new text 3900", 3900, '');
+ROLLBACK;
+
+BEGIN;
+UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 11", nt_3.a= "new text 11", nt_4.a= "new text 11", tt_4.a = "new text 11" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100;
+INSERT INTO tt_1 VALUES ("new text 4000", 4000, '');
+ROLLBACK;
+
+BEGIN;
+UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 12", nt_3.a= "new text 12", nt_4.a= "new text 12", tt_4.a = "new text 12" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100;
+INSERT INTO tt_1 VALUES ("new text 4100", 4100, '');
+ROLLBACK;
+
+--source include/show_binlog_events.inc
+
+--echo
+--echo
+--echo
+--echo
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+--echo #
+--echo #13.e) "B M T R" with error in M generates in the binlog the "B M T R" entries.
+--echo #
+
+BEGIN;
+INSERT INTO nt_3 VALUES ("new text -30", -30, '');
+--error ER_DUP_ENTRY
+INSERT INTO tt_3 VALUES ("new text -29", -29, ''), ("new text -30", -30, '');
+INSERT INTO tt_1 VALUES ("new text -30", -30, '');
+ROLLBACK;
+
+BEGIN;
+INSERT INTO tt_4 VALUES ("new text -30", -30, '');
+--error ER_DUP_ENTRY
+INSERT INTO nt_4 VALUES ("new text -29", -29, ''), ("new text -30", -30, '');
+INSERT INTO tt_1 VALUES ("new text -31", -31, '');
+ROLLBACK;
+
+--source include/show_binlog_events.inc
+
+connection master;
+sync_slave_with_master;
+
+--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/test-master.sql
+--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/test-slave.sql
+--diff_files $MYSQLTEST_VARDIR/tmp/test-master.sql $MYSQLTEST_VARDIR/tmp/test-slave.sql
+
+--echo ###################################################################################
+--echo # CLEAN
+--echo ###################################################################################
+
+connection master;
+DROP TABLE tt_1;
+DROP TABLE tt_2;
+DROP TABLE tt_3;
+DROP TABLE tt_4;
+DROP TABLE nt_1;
+DROP TABLE nt_2;
+DROP TABLE nt_3;
+DROP TABLE nt_4;
+DROP PROCEDURE pc_i_tt_3;
+DROP FUNCTION f1;
+DROP FUNCTION f2;
+
+sync_slave_with_master;
=== modified file 'mysql-test/include/commit.inc'
--- a/mysql-test/include/commit.inc 2009-06-19 11:27:24 +0000
+++ b/mysql-test/include/commit.inc 2009-08-26 23:13:03 +0000
@@ -725,9 +725,9 @@ call p_verify_status_increment(4, 4, 4,
alter table t3 add column (b int);
call p_verify_status_increment(2, 0, 2, 0);
alter table t3 rename t4;
-call p_verify_status_increment(1, 0, 1, 0);
+call p_verify_status_increment(2, 2, 2, 2);
rename table t4 to t3;
-call p_verify_status_increment(1, 0, 1, 0);
+call p_verify_status_increment(2, 2, 2, 2);
truncate table t3;
call p_verify_status_increment(4, 4, 4, 4);
create view v1 as select * from t2;
=== added file 'mysql-test/include/partition_date_range.inc'
--- a/mysql-test/include/partition_date_range.inc 1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/partition_date_range.inc 2009-09-01 12:53:27 +0000
@@ -0,0 +1,69 @@
+# Created for verifying bug#20577.
+# expects TABLE t1 (... , a DATE, ...)
+
+--sorted_result
+SELECT * FROM t1 WHERE a < '1001-01-01';
+--sorted_result
+SELECT * FROM t1 WHERE a <= '1001-01-01';
+--sorted_result
+SELECT * FROM t1 WHERE a >= '1001-01-01';
+--sorted_result
+SELECT * FROM t1 WHERE a > '1001-01-01';
+--sorted_result
+SELECT * FROM t1 WHERE a = '1001-01-01';
+--sorted_result
+SELECT * FROM t1 WHERE a < '1001-00-00';
+--sorted_result
+SELECT * FROM t1 WHERE a <= '1001-00-00';
+--sorted_result
+SELECT * FROM t1 WHERE a >= '1001-00-00';
+--sorted_result
+SELECT * FROM t1 WHERE a > '1001-00-00';
+--sorted_result
+SELECT * FROM t1 WHERE a = '1001-00-00';
+--echo # Disabling warnings for the invalid date
+--disable_warnings
+--sorted_result
+SELECT * FROM t1 WHERE a < '1999-02-31';
+--sorted_result
+SELECT * FROM t1 WHERE a <= '1999-02-31';
+--sorted_result
+SELECT * FROM t1 WHERE a >= '1999-02-31';
+--sorted_result
+SELECT * FROM t1 WHERE a > '1999-02-31';
+--sorted_result
+SELECT * FROM t1 WHERE a = '1999-02-31';
+--enable_warnings
+--sorted_result
+SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
+--sorted_result
+SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
+--sorted_result
+SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
+--sorted_result
+SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
+if ($explain_partitions)
+{
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-01-01';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-01-01';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-01-01';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-01-01';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-01-01';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-00-00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-00-00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-00-00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-00-00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00';
+--echo # Disabling warnings for the invalid date
+--disable_warnings
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1999-02-31';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1999-02-31';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1999-02-31';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1999-02-31';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1999-02-31';
+--enable_warnings
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
+}
=== added file 'mysql-test/include/rpl_loaddata_charset.inc'
--- a/mysql-test/include/rpl_loaddata_charset.inc 1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/rpl_loaddata_charset.inc 2009-08-12 05:31:56 +0000
@@ -0,0 +1,35 @@
+connection master;
+--disable_warnings
+DROP DATABASE IF EXISTS mysqltest;
+--enable_warnings
+
+CREATE DATABASE mysqltest CHARSET UTF8;
+USE mysqltest;
+CREATE TABLE t (cl varchar(100)) CHARSET UTF8;
+
+if (!$LOAD_LOCAL)
+{
+ LOAD DATA INFILE '../../std_data/loaddata_utf8.dat' INTO TABLE t
+ FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';
+}
+if ($LOAD_LOCAL)
+{
+ LOAD DATA LOCAL INFILE './std_data/loaddata_utf8.dat' INTO TABLE t
+ FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';
+}
+
+save_master_pos;
+echo ----------content on master----------;
+SELECT hex(cl) FROM t;
+
+connection slave;
+sync_with_master;
+echo ----------content on slave----------;
+USE mysqltest;
+SELECT hex(cl) FROM t;
+
+connection master;
+DROP DATABASE mysqltest;
+save_master_pos;
+connection slave;
+sync_with_master;
=== modified file 'mysql-test/r/analyse.result'
--- a/mysql-test/r/analyse.result 2007-05-30 16:25:16 +0000
+++ b/mysql-test/r/analyse.result 2009-08-27 10:59:25 +0000
@@ -28,9 +28,7 @@ test.t1.bool N Y 1 1 0 0 1.0000 NULL ENU
test.t1.d 2002-03-03 2002-03-05 10 10 0 0 10.0000 NULL ENUM('2002-03-03','2002-03-04','2002-03-05') NOT NULL
drop table t1,t2;
EXPLAIN SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE();
-id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY <derived2> system NULL NULL NULL NULL 1
-2 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used
+ERROR HY000: Incorrect usage of PROCEDURE and subquery
create table t1 (a int not null);
create table t2 select * from t1 where 0=1 procedure analyse();
show create table t2;
@@ -153,4 +151,9 @@ select f3 from t1 procedure analyse(1, 1
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
test.t1.f3 5.99999 9.55555 7 7 0 0 7.77777 1.77778 FLOAT(6,5) NOT NULL
drop table t1;
+CREATE TABLE t1(a INT,b INT,c INT,d INT,e INT,f INT,g INT,h INT,i INT,j INT,k INT);
+INSERT INTO t1 VALUES ();
+SELECT * FROM (SELECT * FROM t1) d PROCEDURE ANALYSE();
+ERROR HY000: Incorrect usage of PROCEDURE and subquery
+DROP TABLE t1;
End of 4.1 tests
=== modified file 'mysql-test/r/auto_increment.result'
--- a/mysql-test/r/auto_increment.result 2009-02-05 09:49:32 +0000
+++ b/mysql-test/r/auto_increment.result 2009-08-20 12:30:59 +0000
@@ -462,3 +462,17 @@ select last_insert_id();
last_insert_id()
3
drop table t1;
+#
+# Bug#46616: Assertion `!table->auto_increment_field_not_null' on view
+# manipulations
+#
+CREATE TABLE t1 ( a INT );
+INSERT INTO t1 VALUES (1), (1);
+CREATE TABLE t2 ( a INT AUTO_INCREMENT KEY );
+CREATE TABLE IF NOT EXISTS t2 AS SELECT a FROM t1;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+UPDATE t2 SET a = 2;
+SELECT a FROM t2;
+a
+2
+DROP TABLE t1, t2;
=== modified file 'mysql-test/r/commit_1innodb.result'
--- a/mysql-test/r/commit_1innodb.result 2009-06-19 11:27:24 +0000
+++ b/mysql-test/r/commit_1innodb.result 2009-08-26 23:13:03 +0000
@@ -841,17 +841,17 @@ call p_verify_status_increment(2, 0, 2,
SUCCESS
alter table t3 rename t4;
-call p_verify_status_increment(1, 0, 1, 0);
+call p_verify_status_increment(2, 2, 2, 2);
SUCCESS
rename table t4 to t3;
-call p_verify_status_increment(1, 0, 1, 0);
+call p_verify_status_increment(2, 2, 2, 2);
SUCCESS
truncate table t3;
call p_verify_status_increment(4, 4, 4, 4);
-ERROR
-Expected commit increment: 4 actual: 2
+SUCCESS
+
create view v1 as select * from t2;
call p_verify_status_increment(1, 0, 1, 0);
SUCCESS
=== added file 'mysql-test/r/disabled_partition.require'
--- a/mysql-test/r/disabled_partition.require 1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/disabled_partition.require 2009-01-08 14:16:44 +0000
@@ -0,0 +1,2 @@
+Variable_name Value
+have_partitioning DISABLED
=== modified file 'mysql-test/r/group_min_max.result'
--- a/mysql-test/r/group_min_max.result 2009-07-13 17:36:54 +0000
+++ b/mysql-test/r/group_min_max.result 2009-08-30 07:03:37 +0000
@@ -2502,3 +2502,15 @@ a MAX(b)
2 1
DROP TABLE t;
End of 5.0 tests
+#
+# Bug #46607: Assertion failed: (cond_type == Item::FUNC_ITEM) results in
+# server crash
+#
+CREATE TABLE t (a INT, b INT, INDEX (a,b));
+INSERT INTO t VALUES (2,0), (2,0), (2,1), (2,1);
+INSERT INTO t SELECT * FROM t;
+SELECT a, MAX(b) FROM t WHERE b GROUP BY a;
+a MAX(b)
+2 1
+DROP TABLE t;
+End of 5.1 tests
=== modified file 'mysql-test/r/handler_myisam.result'
--- a/mysql-test/r/handler_myisam.result 2009-07-10 23:12:13 +0000
+++ b/mysql-test/r/handler_myisam.result 2009-08-21 05:55:35 +0000
@@ -741,3 +741,19 @@ USE information_schema;
HANDLER COLUMNS OPEN;
ERROR HY000: Incorrect usage of HANDLER OPEN and information_schema
USE test;
+#
+# BUG #46456: HANDLER OPEN + TRUNCATE + DROP (temporary) TABLE, crash
+#
+CREATE TABLE t1 AS SELECT 1 AS f1;
+HANDLER t1 OPEN;
+TRUNCATE t1;
+HANDLER t1 READ FIRST;
+ERROR 42S02: Unknown table 't1' in HANDLER
+DROP TABLE t1;
+CREATE TEMPORARY TABLE t1 AS SELECT 1 AS f1;
+HANDLER t1 OPEN;
+TRUNCATE t1;
+HANDLER t1 READ FIRST;
+ERROR 42S02: Unknown table 't1' in HANDLER
+DROP TABLE t1;
+End of 5.1 tests
=== modified file 'mysql-test/r/lock_multi_bug38499.result'
--- a/mysql-test/r/lock_multi_bug38499.result 2009-03-23 14:22:31 +0000
+++ b/mysql-test/r/lock_multi_bug38499.result 2009-08-28 21:49:16 +0000
@@ -1,3 +1,5 @@
+SET @odl_sync_frm = @@global.sync_frm;
+SET @@global.sync_frm = OFF;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1( a INT, b INT );
INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4);
@@ -17,3 +19,4 @@ ALTER TABLE t1 ADD COLUMN a INT;
# 2.2.1. normal mode
# 2.2.2. PS mode
DROP TABLE t1;
+SET @@global.sync_frm = @odl_sync_frm;
=== modified file 'mysql-test/r/lock_multi_bug38691.result'
--- a/mysql-test/r/lock_multi_bug38691.result 2009-03-23 14:22:31 +0000
+++ b/mysql-test/r/lock_multi_bug38691.result 2009-08-28 21:49:16 +0000
@@ -1,3 +1,5 @@
+SET @odl_sync_frm = @@global.sync_frm;
+SET @@global.sync_frm = OFF;
DROP TABLE IF EXISTS t1,t2,t3;
CREATE TABLE t1 (
a int(11) unsigned default NULL,
@@ -15,3 +17,4 @@ CREATE TABLE t3 SELECT * FROM t1;
# normal mode
# PS mode
DROP TABLE t1, t2, t3;
+SET @@global.sync_frm = @odl_sync_frm;
=== modified file 'mysql-test/r/merge.result'
--- a/mysql-test/r/merge.result 2009-09-07 20:50:10 +0000
+++ b/mysql-test/r/merge.result 2009-10-15 21:38:29 +0000
@@ -2209,4 +2209,16 @@ ERROR HY000: Table storage engine for 'm
DROP TABLE m1,t1,t2,t3,t4,t5,t6,t7;
SELECT 1 FROM m1;
ERROR 42S02: Table 'test.m1' doesn't exist
+#
+# Bug #46614: Assertion in show_create_trigger()
+#
+CREATE TABLE t1(a int);
+CREATE TABLE t2(a int);
+CREATE TABLE t3(a int) ENGINE = MERGE UNION(t1, t2);
+CREATE TRIGGER tr1 AFTER INSERT ON t3 FOR EACH ROW CALL foo();
+SHOW CREATE TRIGGER tr1;
+Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation
+tr1 CREATE DEFINER=`root`@`localhost` TRIGGER tr1 AFTER INSERT ON t3 FOR EACH ROW CALL foo() latin1 latin1_swedish_ci latin1_swedish_ci
+DROP TRIGGER tr1;
+DROP TABLE t1, t2, t3;
End of 5.1 tests
=== modified file 'mysql-test/r/mysqlbinlog_row_trans.result'
--- a/mysql-test/r/mysqlbinlog_row_trans.result 2009-02-10 21:26:37 +0000
+++ b/mysql-test/r/mysqlbinlog_row_trans.result 2009-08-27 09:32:27 +0000
@@ -215,14 +215,30 @@ COMMIT/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
+BEGIN
+/*!*/;
+# at #
+#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
+SET TIMESTAMP=1000000000/*!*/;
TRUNCATE TABLE t1
/*!*/;
# at #
+#010909 4:46:40 server id 1 end_log_pos # Xid = #
+COMMIT/*!*/;
+# at #
+#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
+SET TIMESTAMP=1000000000/*!*/;
+BEGIN
+/*!*/;
+# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
TRUNCATE TABLE t1
/*!*/;
# at #
+#010909 4:46:40 server id 1 end_log_pos # Xid = #
+COMMIT/*!*/;
+# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
BEGIN
@@ -331,9 +347,17 @@ COMMIT/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
+BEGIN
+/*!*/;
+# at #
+#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
+SET TIMESTAMP=1000000000/*!*/;
TRUNCATE TABLE t1
/*!*/;
# at #
+#010909 4:46:40 server id 1 end_log_pos # Xid = #
+COMMIT/*!*/;
+# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
TRUNCATE TABLE t2
@@ -449,9 +473,17 @@ ROLLBACK
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
+BEGIN
+/*!*/;
+# at #
+#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
+SET TIMESTAMP=1000000000/*!*/;
TRUNCATE TABLE t1
/*!*/;
# at #
+#010909 4:46:40 server id 1 end_log_pos # Xid = #
+COMMIT/*!*/;
+# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
TRUNCATE TABLE t2
=== modified file 'mysql-test/r/not_partition.result'
--- a/mysql-test/r/not_partition.result 2006-10-26 17:11:09 +0000
+++ b/mysql-test/r/not_partition.result 2009-01-08 14:16:44 +0000
@@ -1,3 +1,48 @@
+DROP TABLE IF EXISTS t1;
+FLUSH TABLES;
+SELECT * FROM t1;
+ERROR 42000: Unknown table engine 'partition'
+TRUNCATE TABLE t1;
+ERROR 42000: Unknown table engine 'partition'
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze Error Unknown table engine 'partition'
+test.t1 analyze error Corrupt
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check Error Unknown table engine 'partition'
+test.t1 check error Corrupt
+OPTIMIZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 optimize Error Unknown table engine 'partition'
+test.t1 optimize error Corrupt
+REPAIR TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 repair Error Unknown table engine 'partition'
+test.t1 repair error Corrupt
+ALTER TABLE t1 REPAIR PARTITION ALL;
+Table Op Msg_type Msg_text
+test.t1 repair Error Unknown table engine 'partition'
+test.t1 repair error Corrupt
+ALTER TABLE t1 CHECK PARTITION ALL;
+Table Op Msg_type Msg_text
+test.t1 check Error Unknown table engine 'partition'
+test.t1 check error Corrupt
+ALTER TABLE t1 OPTIMIZE PARTITION ALL;
+Table Op Msg_type Msg_text
+test.t1 optimize Error Unknown table engine 'partition'
+test.t1 optimize error Corrupt
+ALTER TABLE t1 ANALYZE PARTITION ALL;
+Table Op Msg_type Msg_text
+test.t1 analyze Error Unknown table engine 'partition'
+test.t1 analyze error Corrupt
+ALTER TABLE t1 REBUILD PARTITION ALL;
+ERROR 42000: Unknown table engine 'partition'
+ALTER TABLE t1 ENGINE Memory;
+ERROR 42000: Unknown table engine 'partition'
+ALTER TABLE t1 ADD (new INT);
+ERROR 42000: Unknown table engine 'partition'
+DROP TABLE t1;
CREATE TABLE t1 (
firstname VARCHAR(25) NOT NULL,
lastname VARCHAR(25) NOT NULL,
=== modified file 'mysql-test/r/partition.result'
--- a/mysql-test/r/partition.result 2009-09-07 20:50:10 +0000
+++ b/mysql-test/r/partition.result 2009-10-15 21:38:29 +0000
@@ -1,4 +1,55 @@
drop table if exists t1, t2;
+CREATE TABLE t1 (
+a int NOT NULL,
+b int NOT NULL);
+CREATE TABLE t2 (
+a int NOT NULL,
+b int NOT NULL,
+INDEX(b)
+)
+PARTITION BY HASH(a) PARTITIONS 2;
+INSERT INTO t1 VALUES (399, 22);
+INSERT INTO t2 VALUES (1, 22), (1, 42);
+INSERT INTO t2 SELECT 1, 399 FROM t2, t1
+WHERE t1.b = t2.b;
+DROP TABLE t1, t2;
+CREATE TABLE t1 (
+a timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+b varchar(10),
+PRIMARY KEY (a)
+)
+PARTITION BY RANGE (to_days(a)) (
+PARTITION p1 VALUES LESS THAN (733407),
+PARTITION pmax VALUES LESS THAN MAXVALUE
+);
+INSERT INTO t1 VALUES ('2007-07-30 17:35:48', 'p1');
+INSERT INTO t1 VALUES ('2009-07-14 17:35:55', 'pmax');
+INSERT INTO t1 VALUES ('2009-09-21 17:31:42', 'pmax');
+SELECT * FROM t1;
+a b
+2007-07-30 17:35:48 p1
+2009-07-14 17:35:55 pmax
+2009-09-21 17:31:42 pmax
+ALTER TABLE t1 REORGANIZE PARTITION pmax INTO (
+PARTITION p3 VALUES LESS THAN (733969),
+PARTITION pmax VALUES LESS THAN MAXVALUE);
+SELECT * FROM t1;
+a b
+2007-07-30 17:35:48 p1
+2009-07-14 17:35:55 pmax
+2009-09-21 17:31:42 pmax
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `b` varchar(10) DEFAULT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (to_days(a))
+(PARTITION p1 VALUES LESS THAN (733407) ENGINE = MyISAM,
+ PARTITION p3 VALUES LESS THAN (733969) ENGINE = MyISAM,
+ PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
+DROP TABLE t1;
CREATE TABLE t1 (a INT, FOREIGN KEY (a) REFERENCES t0 (a))
ENGINE=MyISAM
PARTITION BY HASH (a);
=== added file 'mysql-test/r/partition_disabled.result'
--- a/mysql-test/r/partition_disabled.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/partition_disabled.result 2009-01-08 14:16:44 +0000
@@ -0,0 +1,93 @@
+DROP TABLE IF EXISTS t1;
+FLUSH TABLES;
+SELECT * FROM t1;
+ERROR HY000: The MySQL server is running with the --skip-partition option so it cannot execute this statement
+TRUNCATE TABLE t1;
+ERROR HY000: The MySQL server is running with the --skip-partition option so it cannot execute this statement
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze Error The MySQL server is running with the --skip-partition option so it cannot execute this statement
+test.t1 analyze error Corrupt
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check Error The MySQL server is running with the --skip-partition option so it cannot execute this statement
+test.t1 check error Corrupt
+OPTIMIZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 optimize Error The MySQL server is running with the --skip-partition option so it cannot execute this statement
+test.t1 optimize error Corrupt
+REPAIR TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 repair Error The MySQL server is running with the --skip-partition option so it cannot execute this statement
+test.t1 repair error Corrupt
+ALTER TABLE t1 REPAIR PARTITION ALL;
+Table Op Msg_type Msg_text
+test.t1 repair Error The MySQL server is running with the --skip-partition option so it cannot execute this statement
+test.t1 repair error Corrupt
+ALTER TABLE t1 CHECK PARTITION ALL;
+Table Op Msg_type Msg_text
+test.t1 check Error The MySQL server is running with the --skip-partition option so it cannot execute this statement
+test.t1 check error Corrupt
+ALTER TABLE t1 OPTIMIZE PARTITION ALL;
+Table Op Msg_type Msg_text
+test.t1 optimize Error The MySQL server is running with the --skip-partition option so it cannot execute this statement
+test.t1 optimize error Corrupt
+ALTER TABLE t1 ANALYZE PARTITION ALL;
+Table Op Msg_type Msg_text
+test.t1 analyze Error The MySQL server is running with the --skip-partition option so it cannot execute this statement
+test.t1 analyze error Corrupt
+ALTER TABLE t1 REBUILD PARTITION ALL;
+ERROR HY000: The MySQL server is running with the --skip-partition option so it cannot execute this statement
+ALTER TABLE t1 ENGINE Memory;
+ERROR HY000: The MySQL server is running with the --skip-partition option so it cannot execute this statement
+ALTER TABLE t1 ADD (new INT);
+ERROR HY000: The MySQL server is running with the --skip-partition option so it cannot execute this statement
+DROP TABLE t1;
+CREATE TABLE t1 (
+firstname VARCHAR(25) NOT NULL,
+lastname VARCHAR(25) NOT NULL,
+username VARCHAR(16) NOT NULL,
+email VARCHAR(35),
+joined DATE NOT NULL
+)
+PARTITION BY KEY(joined)
+PARTITIONS 6;
+ERROR HY000: The MySQL server is running with the --skip-partition option so it cannot execute this statement
+ALTER TABLE t1 PARTITION BY KEY(joined) PARTITIONS 2;
+ERROR HY000: The MySQL server is running with the --skip-partition option so it cannot execute this statement
+drop table t1;
+ERROR 42S02: Unknown table 't1'
+CREATE TABLE t1 (
+firstname VARCHAR(25) NOT NULL,
+lastname VARCHAR(25) NOT NULL,
+username VARCHAR(16) NOT NULL,
+email VARCHAR(35),
+joined DATE NOT NULL
+)
+PARTITION BY RANGE( YEAR(joined) ) (
+PARTITION p0 VALUES LESS THAN (1960),
+PARTITION p1 VALUES LESS THAN (1970),
+PARTITION p2 VALUES LESS THAN (1980),
+PARTITION p3 VALUES LESS THAN (1990),
+PARTITION p4 VALUES LESS THAN MAXVALUE
+);
+ERROR HY000: The MySQL server is running with the --skip-partition option so it cannot execute this statement
+drop table t1;
+ERROR 42S02: Unknown table 't1'
+CREATE TABLE t1 (id INT, purchased DATE)
+PARTITION BY RANGE( YEAR(purchased) )
+SUBPARTITION BY HASH( TO_DAYS(purchased) )
+SUBPARTITIONS 2 (
+PARTITION p0 VALUES LESS THAN (1990),
+PARTITION p1 VALUES LESS THAN (2000),
+PARTITION p2 VALUES LESS THAN MAXVALUE
+);
+ERROR HY000: The MySQL server is running with the --skip-partition option so it cannot execute this statement
+drop table t1;
+ERROR 42S02: Unknown table 't1'
+create table t1 (a varchar(10) charset latin1 collate latin1_bin);
+insert into t1 values (''),(' '),('a'),('a '),('a ');
+explain partitions select * from t1 where a='a ' OR a='a';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using where
+drop table t1;
=== modified file 'mysql-test/r/partition_pruning.result'
--- a/mysql-test/r/partition_pruning.result 2008-12-28 11:33:49 +0000
+++ b/mysql-test/r/partition_pruning.result 2009-09-01 12:53:27 +0000
@@ -1,4 +1,1282 @@
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+# test of RANGE and index
+CREATE TABLE t1 (a DATE, KEY(a))
+PARTITION BY RANGE (TO_DAYS(a))
+(PARTITION `pNULL` VALUES LESS THAN (0),
+PARTITION `p0001-01-01` VALUES LESS THAN (366 + 1),
+PARTITION `p1001-01-01` VALUES LESS THAN (TO_DAYS('1001-01-01') + 1),
+PARTITION `p2001-01-01` VALUES LESS THAN (TO_DAYS('2001-01-01') + 1));
+INSERT INTO t1 VALUES ('0000-00-00'), ('0000-01-02'), ('0001-01-01'),
+('1001-00-00'), ('1001-01-01'), ('1002-00-00'), ('2001-01-01');
+SELECT * FROM t1 WHERE a < '1001-01-01';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+SELECT * FROM t1 WHERE a <= '1001-01-01';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+SELECT * FROM t1 WHERE a >= '1001-01-01';
+a
+1001-01-01
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a > '1001-01-01';
+a
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a = '1001-01-01';
+a
+1001-01-01
+SELECT * FROM t1 WHERE a < '1001-00-00';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+SELECT * FROM t1 WHERE a <= '1001-00-00';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+SELECT * FROM t1 WHERE a >= '1001-00-00';
+a
+1001-00-00
+1001-01-01
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a > '1001-00-00';
+a
+1001-01-01
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a = '1001-00-00';
+a
+1001-00-00
+# Disabling warnings for the invalid date
+SELECT * FROM t1 WHERE a < '1999-02-31';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a <= '1999-02-31';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a >= '1999-02-31';
+a
+2001-01-01
+SELECT * FROM t1 WHERE a > '1999-02-31';
+a
+2001-01-01
+SELECT * FROM t1 WHERE a = '1999-02-31';
+a
+SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
+a
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
+a
+0001-01-01
+1001-00-00
+1001-01-01
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 range a a 4 NULL 3 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 range a a 4 NULL 3 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 range a a 4 NULL 4 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p2001-01-01 range a a 4 NULL 3 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p1001-01-01 system a NULL NULL NULL 1
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 range a a 4 NULL 3 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 range a a 4 NULL 3 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 range a a 4 NULL 4 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 range a a 4 NULL 4 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL ref a a 4 const 1 Using where; Using index
+# Disabling warnings for the invalid date
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1999-02-31';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01,p2001-01-01 range a a 4 NULL 5 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1999-02-31';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01,p2001-01-01 range a a 4 NULL 5 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1999-02-31';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p2001-01-01 range a a 4 NULL 2 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1999-02-31';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p2001-01-01 range a a 4 NULL 2 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1999-02-31';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL ref a a 4 const 1 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01,p2001-01-01 range a a 4 NULL 5 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 range a a 4 NULL 3 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 range a a 4 NULL 3 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 range a a 4 NULL 3 Using where; Using index
+# test without index
+ALTER TABLE t1 DROP KEY a;
+SELECT * FROM t1 WHERE a < '1001-01-01';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+SELECT * FROM t1 WHERE a <= '1001-01-01';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+SELECT * FROM t1 WHERE a >= '1001-01-01';
+a
+1001-01-01
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a > '1001-01-01';
+a
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a = '1001-01-01';
+a
+1001-01-01
+SELECT * FROM t1 WHERE a < '1001-00-00';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+SELECT * FROM t1 WHERE a <= '1001-00-00';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+SELECT * FROM t1 WHERE a >= '1001-00-00';
+a
+1001-00-00
+1001-01-01
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a > '1001-00-00';
+a
+1001-01-01
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a = '1001-00-00';
+a
+1001-00-00
+# Disabling warnings for the invalid date
+SELECT * FROM t1 WHERE a < '1999-02-31';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a <= '1999-02-31';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a >= '1999-02-31';
+a
+2001-01-01
+SELECT * FROM t1 WHERE a > '1999-02-31';
+a
+2001-01-01
+SELECT * FROM t1 WHERE a = '1999-02-31';
+a
+SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
+a
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
+a
+0001-01-01
+1001-00-00
+1001-01-01
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p2001-01-01 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p1001-01-01 system NULL NULL NULL NULL 1
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL ALL NULL NULL NULL NULL 7 Using where
+# Disabling warnings for the invalid date
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1999-02-31';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01,p2001-01-01 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1999-02-31';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01,p2001-01-01 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1999-02-31';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p2001-01-01 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1999-02-31';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p2001-01-01 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1999-02-31';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01,p2001-01-01 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 ALL NULL NULL NULL NULL 7 Using where
+DROP TABLE t1;
+# test of LIST and index
+CREATE TABLE t1 (a DATE, KEY(a))
+PARTITION BY LIST (TO_DAYS(a))
+(PARTITION `p0001-01-01` VALUES IN (TO_DAYS('0001-01-01')),
+PARTITION `p2001-01-01` VALUES IN (TO_DAYS('2001-01-01')),
+PARTITION `pNULL` VALUES IN (NULL),
+PARTITION `p0000-01-02` VALUES IN (TO_DAYS('0000-01-02')),
+PARTITION `p1001-01-01` VALUES IN (TO_DAYS('1001-01-01')));
+INSERT INTO t1 VALUES ('0000-00-00'), ('0000-01-02'), ('0001-01-01'),
+('1001-00-00'), ('1001-01-01'), ('1002-00-00'), ('2001-01-01');
+SELECT * FROM t1 WHERE a < '1001-01-01';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+SELECT * FROM t1 WHERE a <= '1001-01-01';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+SELECT * FROM t1 WHERE a >= '1001-01-01';
+a
+1001-01-01
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a > '1001-01-01';
+a
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a = '1001-01-01';
+a
+1001-01-01
+SELECT * FROM t1 WHERE a < '1001-00-00';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+SELECT * FROM t1 WHERE a <= '1001-00-00';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+SELECT * FROM t1 WHERE a >= '1001-00-00';
+a
+1001-00-00
+1001-01-01
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a > '1001-00-00';
+a
+1001-01-01
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a = '1001-00-00';
+a
+1001-00-00
+# Disabling warnings for the invalid date
+SELECT * FROM t1 WHERE a < '1999-02-31';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a <= '1999-02-31';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a >= '1999-02-31';
+a
+2001-01-01
+SELECT * FROM t1 WHERE a > '1999-02-31';
+a
+2001-01-01
+SELECT * FROM t1 WHERE a = '1999-02-31';
+a
+SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
+a
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
+a
+0001-01-01
+1001-00-00
+1001-01-01
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 3 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 4 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 4 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2001-01-01,pNULL range a a 4 NULL 3 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p1001-01-01 system a NULL NULL NULL 1
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 3 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 3 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 4 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 4 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL ref a a 4 const 1 Using where; Using index
+# Disabling warnings for the invalid date
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1999-02-31';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 5 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1999-02-31';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 5 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1999-02-31';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2001-01-01,pNULL range a a 4 NULL 2 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1999-02-31';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2001-01-01,pNULL range a a 4 NULL 2 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1999-02-31';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL ref a a 4 const 1 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 5 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 4 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p1001-01-01 range a a 4 NULL 2 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0001-01-01,pNULL,p1001-01-01 range a a 4 NULL 3 Using where; Using index
+# test without index
+ALTER TABLE t1 DROP KEY a;
+SELECT * FROM t1 WHERE a < '1001-01-01';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+SELECT * FROM t1 WHERE a <= '1001-01-01';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+SELECT * FROM t1 WHERE a >= '1001-01-01';
+a
+1001-01-01
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a > '1001-01-01';
+a
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a = '1001-01-01';
+a
+1001-01-01
+SELECT * FROM t1 WHERE a < '1001-00-00';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+SELECT * FROM t1 WHERE a <= '1001-00-00';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+SELECT * FROM t1 WHERE a >= '1001-00-00';
+a
+1001-00-00
+1001-01-01
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a > '1001-00-00';
+a
+1001-01-01
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a = '1001-00-00';
+a
+1001-00-00
+# Disabling warnings for the invalid date
+SELECT * FROM t1 WHERE a < '1999-02-31';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a <= '1999-02-31';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a >= '1999-02-31';
+a
+2001-01-01
+SELECT * FROM t1 WHERE a > '1999-02-31';
+a
+2001-01-01
+SELECT * FROM t1 WHERE a = '1999-02-31';
+a
+SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
+a
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
+a
+0001-01-01
+1001-00-00
+1001-01-01
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2001-01-01,pNULL ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p1001-01-01 system NULL NULL NULL NULL 1
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL ALL NULL NULL NULL NULL 7 Using where
+# Disabling warnings for the invalid date
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1999-02-31';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1999-02-31';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1999-02-31';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2001-01-01,pNULL ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1999-02-31';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2001-01-01,pNULL ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1999-02-31';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 pNULL,p1001-01-01 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0001-01-01,pNULL,p1001-01-01 ALL NULL NULL NULL NULL 7 Using where
+DROP TABLE t1;
+# Test with DATETIME column NOT NULL
+CREATE TABLE t1 (
+a int(10) unsigned NOT NULL,
+b DATETIME NOT NULL,
+PRIMARY KEY (a, b)
+) PARTITION BY RANGE (TO_DAYS(b))
+(PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')),
+PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')),
+PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')),
+PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')),
+PARTITION p20090405 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, '2009-01-01'), (1, '2009-04-01'), (2, '2009-04-01'),
+(1, '2009-04-02'), (2, '2009-04-02'), (1, '2009-04-02 23:59:59'),
+(1, '2009-04-03'), (2, '2009-04-03'), (1, '2009-04-04'), (2, '2009-04-04'),
+(1, '2009-04-05'), (1, '2009-04-06'), (1, '2009-04-07');
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 12 NULL 6 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403 index NULL PRIMARY 12 NULL 8 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090403 index NULL PRIMARY 12 NULL 8 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090402 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b > CAST('2009-04-02 23:59:59' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090403 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090403 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090402 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090403 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090403 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090402 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b > CAST('2009-04-02 23:59:58' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index
+DROP TABLE t1;
+# Test with DATE column NOT NULL
+CREATE TABLE t1 (
+a int(10) unsigned NOT NULL,
+b DATE NOT NULL,
+PRIMARY KEY (a, b)
+) PARTITION BY RANGE (TO_DAYS(b))
+(PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')),
+PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')),
+PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')),
+PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')),
+PARTITION p20090405 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, '2009-01-01'), (1, '2009-04-01'), (2, '2009-04-01'),
+(1, '2009-04-02'), (2, '2009-04-02'), (1, '2009-04-03'), (2, '2009-04-03'),
+(1, '2009-04-04'), (2, '2009-04-04'), (1, '2009-04-05'), (1, '2009-04-06'),
+(1, '2009-04-07');
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 7 NULL 5 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403 index NULL PRIMARY 7 NULL 7 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090403 index NULL PRIMARY 7 NULL 7 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b > CAST('2009-04-02 23:59:59' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090403 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090403 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090403 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b > CAST('2009-04-02 23:59:58' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index
+DROP TABLE t1;
+# Test with DATETIME column NULL
+CREATE TABLE t1 (
+a int(10) unsigned NOT NULL,
+b DATETIME NULL
+) PARTITION BY RANGE (TO_DAYS(b))
+(PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')),
+PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')),
+PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')),
+PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')),
+PARTITION p20090405 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, '2009-01-01'), (1, '2009-04-01'), (2, '2009-04-01'),
+(1, '2009-04-02'), (2, '2009-04-02'), (1, '2009-04-02 23:59:59'),
+(1, '2009-04-03'), (2, '2009-04-03'), (1, '2009-04-04'), (2, '2009-04-04'),
+(1, '2009-04-05'), (1, '2009-04-06'), (1, '2009-04-07');
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 6 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403 ALL NULL NULL NULL NULL 8 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090403 ALL NULL NULL NULL NULL 8 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090402 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b > CAST('2009-04-02 23:59:59' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090403 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090403 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090402 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090403 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090403 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090402 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b > CAST('2009-04-02 23:59:58' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where
+DROP TABLE t1;
+# Test with DATE column NULL
+CREATE TABLE t1 (
+a int(10) unsigned NOT NULL,
+b DATE NULL
+) PARTITION BY RANGE (TO_DAYS(b))
+(PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')),
+PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')),
+PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')),
+PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')),
+PARTITION p20090405 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, '2009-01-01'), (1, '2009-04-01'), (2, '2009-04-01'),
+(1, '2009-04-02'), (2, '2009-04-02'), (1, '2009-04-03'), (2, '2009-04-03'),
+(1, '2009-04-04'), (2, '2009-04-04'), (1, '2009-04-05'), (1, '2009-04-06'),
+(1, '2009-04-07');
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 5 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090403 ALL NULL NULL NULL NULL 7 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b > CAST('2009-04-02 23:59:59' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090403 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090403 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090403 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03';
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402,p20090403 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where
+EXPLAIN PARTITIONS SELECT * FROM t1
+WHERE b > CAST('2009-04-02 23:59:58' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where
+DROP TABLE t1;
+# For better code coverage of the patch
+CREATE TABLE t1 (
+a int(10) unsigned NOT NULL,
+b DATE
+) PARTITION BY RANGE ( TO_DAYS(b) )
+(PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')),
+PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')),
+PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')),
+PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')),
+PARTITION p20090405 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, '2009-01-01'), (2, NULL);
+# test with an invalid date, which lead to item->null_value is set.
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-99' AS DATETIME);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p20090401 ALL NULL NULL NULL NULL 2 Using where
+Warnings:
+Warning 1292 Incorrect datetime value: '2009-04-99'
+Warning 1292 Incorrect datetime value: '2009-04-99'
+DROP TABLE t1;
CREATE TABLE t1
(a INT NOT NULL AUTO_INCREMENT,
b DATETIME,
=== modified file 'mysql-test/r/partition_range.result'
--- a/mysql-test/r/partition_range.result 2008-11-04 07:43:21 +0000
+++ b/mysql-test/r/partition_range.result 2009-08-26 10:59:49 +0000
@@ -745,7 +745,7 @@ a
EXPLAIN PARTITIONS SELECT * FROM t1
WHERE a >= '2004-07-01' AND a <= '2004-09-30';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p407,p408,p409 ALL NULL NULL NULL NULL 9 Using where
+1 SIMPLE t1 p3xx,p407,p408,p409 ALL NULL NULL NULL NULL 18 Using where
SELECT * from t1
WHERE (a >= '2004-07-01' AND a <= '2004-09-30') OR
(a >= '2005-07-01' AND a <= '2005-09-30');
@@ -772,7 +772,7 @@ EXPLAIN PARTITIONS SELECT * from t1
WHERE (a >= '2004-07-01' AND a <= '2004-09-30') OR
(a >= '2005-07-01' AND a <= '2005-09-30');
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p407,p408,p409,p507,p508,p509 ALL NULL NULL NULL NULL 18 Using where
+1 SIMPLE t1 p3xx,p407,p408,p409,p507,p508,p509 ALL NULL NULL NULL NULL 27 Using where
DROP TABLE t1;
create table t1 (a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
=== modified file 'mysql-test/r/subselect.result'
--- a/mysql-test/r/subselect.result 2009-09-15 10:46:35 +0000
+++ b/mysql-test/r/subselect.result 2009-10-15 21:38:29 +0000
@@ -75,7 +75,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1));
ERROR HY000: Incorrect usage of PROCEDURE and subquery
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
-ERROR HY000: Incorrect parameters to procedure 'ANALYSE'
+ERROR HY000: Incorrect usage of PROCEDURE and subquery
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
ERROR 42S22: Unknown column 'a' in 'field list'
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL;
@@ -4383,6 +4383,34 @@ id select_type table type possible_keys
1 PRIMARY C ALL NULL NULL NULL NULL 20 100.00 Using where
DROP TABLE C;
# End of test for bug#45061.
+#
+# Bug #46749: Segfault in add_key_fields() with outer subquery level
+# field references
+#
+CREATE TABLE t1 (
+a int,
+b int,
+UNIQUE (a), KEY (b)
+);
+INSERT INTO t1 VALUES (1,1), (2,1);
+CREATE TABLE st1 like t1;
+INSERT INTO st1 VALUES (1,1), (2,1);
+CREATE TABLE st2 like t1;
+INSERT INTO st2 VALUES (1,1), (2,1);
+EXPLAIN
+SELECT MAX(b), (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b)
+FROM t1
+WHERE a = 230;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 DEPENDENT SUBQUERY st1 index NULL a 5 NULL 2 Using index
+2 DEPENDENT SUBQUERY st2 index b b 5 NULL 2 Using where; Using index; Using join buffer
+SELECT MAX(b), (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b)
+FROM t1
+WHERE a = 230;
+MAX(b) (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b)
+NULL 0
+DROP TABLE t1, st1, st2;
End of 5.0 tests.
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (2,22),(1,11),(2,22);
=== modified file 'mysql-test/r/type_newdecimal.result'
--- a/mysql-test/r/type_newdecimal.result 2009-07-03 10:36:04 +0000
+++ b/mysql-test/r/type_newdecimal.result 2009-08-24 19:47:08 +0000
@@ -1495,9 +1495,9 @@ CREATE TABLE t1 (a int DEFAULT NULL, b i
INSERT INTO t1 VALUES (3,30), (1,10), (2,10);
SELECT a+CAST(1 AS decimal(65,30)) AS aa, SUM(b) FROM t1 GROUP BY aa;
aa SUM(b)
-2.000000000000000000000000000000 10
-3.000000000000000000000000000000 10
-4.000000000000000000000000000000 30
+2.00000000000000000000000000000 10
+3.00000000000000000000000000000 10
+4.00000000000000000000000000000 30
SELECT a+CAST(1 AS decimal(65,31)) AS aa, SUM(b) FROM t1 GROUP BY aa;
ERROR 42000: Too big scale 31 specified for column '1'. Maximum is 30.
DROP TABLE t1;
@@ -1521,13 +1521,13 @@ f1
DROP TABLE t1;
CREATE TABLE t1 SELECT 123451234512345123451234512345123451234512345.678906789067890678906789067890678906789067890 AS f1;
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Note 1265 Data truncated for column 'f1' at row 1
DESC t1;
Field Type Null Key Default Extra
-f1 decimal(65,30) NO 0.000000000000000000000000000000
+f1 decimal(65,20) NO 0.00000000000000000000
SELECT f1 FROM t1;
f1
-99999999999999999999999999999999999.999999999999999999999999999999
+123451234512345123451234512345123451234512345.67890678906789067891
DROP TABLE t1;
select (1.20396873 * 0.89550000 * 0.68000000 * 1.08721696 * 0.99500000 *
1.01500000 * 1.01500000 * 0.99500000);
@@ -1595,7 +1595,7 @@ Warnings:
Note 1265 Data truncated for column 'my_col' at row 1
DESCRIBE t1;
Field Type Null Key Default Extra
-my_col decimal(65,30) NO 0.000000000000000000000000000000
+my_col decimal(32,30) NO 0.000000000000000000000000000000
SELECT my_col FROM t1;
my_col
1.123456789123456789123456789123
@@ -1625,8 +1625,212 @@ Warnings:
Note 1265 Data truncated for column 'my_col' at row 1
DESCRIBE t1;
Field Type Null Key Default Extra
-my_col decimal(65,30) YES NULL
+my_col decimal(30,30) YES NULL
SELECT my_col FROM t1;
my_col
0.012345687012345687012345687012
DROP TABLE t1;
+#
+# Bug#45261: Crash, stored procedure + decimal
+#
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 SELECT
+/* 81 */ 100000000000000000000000000000000000000000000000000000000000000000000000000000001
+AS c1;
+Warnings:
+Warning 1264 Out of range value for column 'c1' at row 1
+DESC t1;
+Field Type Null Key Default Extra
+c1 decimal(65,0) NO 0
+SELECT * FROM t1;
+c1
+99999999999999999999999999999999999999999999999999999999999999999
+DROP TABLE t1;
+CREATE TABLE t1 SELECT
+/* 81 */ 100000000000000000000000000000000000000000000000000000000000000000000000000000001.
+AS c1;
+Warnings:
+Warning 1264 Out of range value for column 'c1' at row 1
+DESC t1;
+Field Type Null Key Default Extra
+c1 decimal(65,0) NO 0
+SELECT * FROM t1;
+c1
+99999999999999999999999999999999999999999999999999999999999999999
+DROP TABLE t1;
+CREATE TABLE t1 SELECT
+/* 81 */ 100000000000000000000000000000000000000000000000000000000000000000000000000000001.1 /* 1 */
+AS c1;
+Warnings:
+Warning 1264 Out of range value for column 'c1' at row 1
+DESC t1;
+Field Type Null Key Default Extra
+c1 decimal(65,0) NO 0
+SELECT * FROM t1;
+c1
+99999999999999999999999999999999999999999999999999999999999999999
+DROP TABLE t1;
+CREATE TABLE t1 SELECT
+/* 82 */ 1000000000000000000000000000000000000000000000000000000000000000000000000000000001
+AS c1;
+Warnings:
+Error 1292 Truncated incorrect DECIMAL value: ''
+DESC t1;
+Field Type Null Key Default Extra
+c1 decimal(65,0) NO 0
+SELECT * FROM t1;
+c1
+99999999999999999999999999999999999999999999999999999999999999999
+DROP TABLE t1;
+CREATE TABLE t1 SELECT
+/* 40 */ 1000000000000000000000000000000000000001.1000000000000000000000000000000000000001 /* 40 */
+AS c1;
+DESC t1;
+Field Type Null Key Default Extra
+c1 decimal(65,25) NO 0.0000000000000000000000000
+SELECT * FROM t1;
+c1
+1000000000000000000000000000000000000001.1000000000000000000000000
+DROP TABLE t1;
+CREATE TABLE t1 SELECT
+/* 1 */ 1.10000000000000000000000000000000000000000000000000000000000000000000000000000001 /* 80 */
+AS c1;
+DESC t1;
+Field Type Null Key Default Extra
+c1 decimal(31,30) NO 0.000000000000000000000000000000
+SELECT * FROM t1;
+c1
+1.100000000000000000000000000000
+DROP TABLE t1;
+CREATE TABLE t1 SELECT
+/* 1 */ 1.100000000000000000000000000000000000000000000000000000000000000000000000000000001 /* 81 */
+AS c1;
+DESC t1;
+Field Type Null Key Default Extra
+c1 decimal(31,30) NO 0.000000000000000000000000000000
+SELECT * FROM t1;
+c1
+1.100000000000000000000000000000
+DROP TABLE t1;
+CREATE TABLE t1 SELECT
+.100000000000000000000000000000000000000000000000000000000000000000000000000000001 /* 81 */
+AS c1;
+Warnings:
+Note 1265 Data truncated for column 'c1' at row 1
+DESC t1;
+Field Type Null Key Default Extra
+c1 decimal(30,30) NO 0.000000000000000000000000000000
+SELECT * FROM t1;
+c1
+0.100000000000000000000000000000
+DROP TABLE t1;
+CREATE TABLE t1 SELECT
+/* 45 */ 123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345 /* 45 */
+AS c1;
+Warnings:
+Note 1265 Data truncated for column 'c1' at row 1
+DESC t1;
+Field Type Null Key Default Extra
+c1 decimal(65,20) NO 0.00000000000000000000
+SELECT * FROM t1;
+c1
+123456789012345678901234567890123456789012345.12345678901234567890
+DROP TABLE t1;
+CREATE TABLE t1 SELECT
+/* 65 */ 12345678901234567890123456789012345678901234567890123456789012345.1 /* 1 */
+AS c1;
+Warnings:
+Note 1265 Data truncated for column 'c1' at row 1
+DESC t1;
+Field Type Null Key Default Extra
+c1 decimal(65,0) NO 0
+SELECT * FROM t1;
+c1
+12345678901234567890123456789012345678901234567890123456789012345
+DROP TABLE t1;
+CREATE TABLE t1 SELECT
+/* 66 */ 123456789012345678901234567890123456789012345678901234567890123456.1 /* 1 */
+AS c1;
+Warnings:
+Warning 1264 Out of range value for column 'c1' at row 1
+DESC t1;
+Field Type Null Key Default Extra
+c1 decimal(65,0) NO 0
+SELECT * FROM t1;
+c1
+99999999999999999999999999999999999999999999999999999999999999999
+DROP TABLE t1;
+CREATE TABLE t1 SELECT
+.123456789012345678901234567890123456789012345678901234567890123456 /* 66 */
+AS c1;
+Warnings:
+Note 1265 Data truncated for column 'c1' at row 1
+DESC t1;
+Field Type Null Key Default Extra
+c1 decimal(30,30) NO 0.000000000000000000000000000000
+SELECT * FROM t1;
+c1
+0.123456789012345678901234567890
+DROP TABLE t1;
+CREATE TABLE t1 AS SELECT 123.1234567890123456789012345678901 /* 31 */ AS c1;
+Warnings:
+Note 1265 Data truncated for column 'c1' at row 1
+DESC t1;
+Field Type Null Key Default Extra
+c1 decimal(33,30) NO 0.000000000000000000000000000000
+SELECT * FROM t1;
+c1
+123.123456789012345678901234567890
+DROP TABLE t1;
+CREATE TABLE t1 SELECT 1.1 + CAST(1 AS DECIMAL(65,30)) AS c1;
+DESC t1;
+Field Type Null Key Default Extra
+c1 decimal(65,29) NO 0.00000000000000000000000000000
+SELECT * FROM t1;
+c1
+2.10000000000000000000000000000
+DROP TABLE t1;
+#
+# Test that the integer and decimal parts are properly calculated.
+#
+CREATE TABLE t1 (a DECIMAL(30,30));
+INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
+CREATE TABLE t2 SELECT MIN(a + 0.0000000000000000000000000000001) AS c1 FROM t1;
+Warnings:
+Note 1265 Data truncated for column 'c1' at row 3
+DESC t2;
+Field Type Null Key Default Extra
+c1 decimal(32,30) YES NULL
+DROP TABLE t1,t2;
+CREATE TABLE t1 (a DECIMAL(30,30));
+INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
+CREATE TABLE t2 SELECT IFNULL(a + 0.0000000000000000000000000000001, NULL) AS c1 FROM t1;
+Warnings:
+Note 1265 Data truncated for column 'c1' at row 1
+Note 1265 Data truncated for column 'c1' at row 2
+Note 1265 Data truncated for column 'c1' at row 3
+DESC t2;
+Field Type Null Key Default Extra
+c1 decimal(32,30) YES NULL
+DROP TABLE t1,t2;
+CREATE TABLE t1 (a DECIMAL(30,30));
+INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
+CREATE TABLE t2 SELECT CASE a WHEN 0.1 THEN 0.0000000000000000000000000000000000000000000000000000000000000000001 END AS c1 FROM t1;
+Warnings:
+Note 1265 Data truncated for column 'c1' at row 1
+DESC t2;
+Field Type Null Key Default Extra
+c1 decimal(31,30) YES NULL
+DROP TABLE t1,t2;
+#
+# Test that variables get maximum precision.
+#
+SET @decimal= 1.1;
+CREATE TABLE t1 SELECT @decimal AS c1;
+DESC t1;
+Field Type Null Key Default Extra
+c1 decimal(65,30) YES NULL
+SELECT * FROM t1;
+c1
+1.100000000000000000000000000000
+DROP TABLE t1;
=== modified file 'mysql-test/r/view.result'
--- a/mysql-test/r/view.result 2009-09-07 20:50:10 +0000
+++ b/mysql-test/r/view.result 2009-10-15 21:38:29 +0000
@@ -3718,117 +3718,6 @@ DROP TABLE t1;
# -- End of test case for Bug#40825
-#
-# Bug #45806 crash when replacing into a view with a join!
-#
-CREATE TABLE t1(a INT UNIQUE);
-CREATE VIEW v1 AS SELECT t1.a FROM t1, t1 AS a;
-INSERT INTO t1 VALUES (1), (2);
-REPLACE INTO v1(a) SELECT 1 FROM t1,t1 AS c;
-SELECT * FROM v1;
-a
-1
-2
-1
-2
-REPLACE INTO v1(a) SELECT 3 FROM t1,t1 AS c;
-SELECT * FROM v1;
-a
-1
-2
-3
-1
-2
-3
-1
-2
-3
-DELETE FROM t1 WHERE a=3;
-INSERT INTO v1(a) SELECT 1 FROM t1,t1 AS c
-ON DUPLICATE KEY UPDATE `v1`.`a`= 1;
-SELECT * FROM v1;
-a
-1
-2
-1
-2
-CREATE VIEW v2 AS SELECT t1.a FROM t1, v1 AS a;
-REPLACE INTO v2(a) SELECT 1 FROM t1,t1 AS c;
-SELECT * FROM v2;
-a
-1
-2
-1
-2
-1
-2
-1
-2
-REPLACE INTO v2(a) SELECT 3 FROM t1,t1 AS c;
-SELECT * FROM v2;
-a
-1
-2
-3
-1
-2
-3
-1
-2
-3
-1
-2
-3
-1
-2
-3
-1
-2
-3
-1
-2
-3
-1
-2
-3
-1
-2
-3
-INSERT INTO v2(a) SELECT 1 FROM t1,t1 AS c
-ON DUPLICATE KEY UPDATE `v2`.`a`= 1;
-SELECT * FROM v2;
-a
-1
-2
-3
-1
-2
-3
-1
-2
-3
-1
-2
-3
-1
-2
-3
-1
-2
-3
-1
-2
-3
-1
-2
-3
-1
-2
-3
-DROP VIEW v1;
-DROP VIEW v2;
-DROP TABLE t1;
-# -- End of test case for Bug#45806
# -----------------------------------------------------------------
# -- End of 5.0 tests.
# -----------------------------------------------------------------
=== added file 'mysql-test/std_data/loaddata_utf8.dat'
--- a/mysql-test/std_data/loaddata_utf8.dat 1970-01-01 00:00:00 +0000
+++ b/mysql-test/std_data/loaddata_utf8.dat 2009-08-12 03:54:05 +0000
@@ -0,0 +1,3 @@
+一二三
+四五六
+七八九
=== added file 'mysql-test/std_data/parts/t1.frm'
Binary files a/mysql-test/std_data/parts/t1.frm 1970-01-01 00:00:00 +0000 and b/mysql-test/std_data/parts/t1.frm 2009-01-08 14:16:44 +0000 differ
=== modified file 'mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result'
--- a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result 2009-05-31 05:44:41 +0000
+++ b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result 2009-08-26 23:13:03 +0000
@@ -379,7 +379,9 @@ master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; TRUNCATE table t2
+master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
@@ -838,8 +840,10 @@ UPDATE t4,t3 SET t4.a=t3.a + bug27417(1)
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
master-bin.000001 # Intvar # # INSERT_ID=6
master-bin.000001 # Query # # use `test`; UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */
+master-bin.000001 # Query # # ROLLBACK
select count(*) from t1 /* must be 4 */;
count(*)
4
=== modified file 'mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result'
--- a/mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result 2007-06-27 12:28:02 +0000
+++ b/mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result 2009-08-28 09:45:57 +0000
@@ -17,5 +17,5 @@ master-bin.000001 # Query # # create dat
master-bin.000001 # Query # # use `drop-temp+table-test`; create temporary table shortn1 (a int)
master-bin.000001 # Query # # use `drop-temp+table-test`; create temporary table `table:name` (a int)
master-bin.000001 # Query # # use `drop-temp+table-test`; create temporary table shortn2 (a int)
-master-bin.000001 # Query # # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`shortn2`,`drop-temp+table-test`.`table:name`,`drop-temp+table-test`.`shortn1`
+master-bin.000001 # Query # # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `shortn2`,`table:name`,`shortn1`
drop database `drop-temp+table-test`;
=== modified file 'mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result'
--- a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result 2009-05-31 05:44:41 +0000
+++ b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result 2009-08-28 09:45:57 +0000
@@ -258,7 +258,7 @@ master-bin.000001 # Query # # use `test`
master-bin.000001 # Query # # use `test`; insert t0 select * from t1
master-bin.000001 # Query # # use `test`; insert into t0 select GET_LOCK("lock1",null)
master-bin.000001 # Query # # use `test`; create table t2 (n int) engine=innodb
-master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `test`.`t1`,`test`.`ti`
+master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `t1`,`ti`
do release_lock("lock1");
drop table t0,t2;
set autocommit=0;
@@ -346,7 +346,9 @@ master-bin.000001 # Query # # use `test`
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t2
master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4,4)
+master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; TRUNCATE table t2
+master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (5,5)
master-bin.000001 # Query # # use `test`; DROP TABLE t2
master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (6,6)
@@ -545,8 +547,10 @@ UPDATE t4,t3 SET t4.a=t3.a + bug27417(1)
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
master-bin.000001 # Intvar # # INSERT_ID=6
master-bin.000001 # Query # # use `test`; UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */
+master-bin.000001 # Query # # ROLLBACK
/* the output must denote there is the query */;
select count(*) from t1 /* must be 4 */;
count(*)
@@ -782,8 +786,10 @@ UPDATE t4,t3 SET t4.a=t3.a + bug27417(1)
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
master-bin.000001 # Intvar # # INSERT_ID=6
master-bin.000001 # Query # # use `test`; UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */
+master-bin.000001 # Query # # ROLLBACK
select count(*) from t1 /* must be 4 */;
count(*)
4
=== modified file 'mysql-test/suite/rpl/r/rpl_concurrency_error.result'
--- a/mysql-test/suite/rpl/r/rpl_concurrency_error.result 2009-07-18 20:07:56 +0000
+++ b/mysql-test/suite/rpl/r/rpl_concurrency_error.result 2009-08-13 16:21:01 +0000
@@ -101,6 +101,8 @@ master-bin.000001 # Query # # use `test`
master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (6 + (1 * 10),"brown")
master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown")
master-bin.000001 # Xid # # COMMIT /* XID */
+source include/diff_master_slave.inc;
+source include/diff_master_slave.inc;
########################################################################
# Cleanup
########################################################################
=== added file 'mysql-test/suite/rpl/r/rpl_create_if_not_exists.result'
--- a/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result 2009-08-29 08:52:22 +0000
@@ -0,0 +1,33 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+DROP DATABASE IF EXISTS mysqltest;
+CREATE DATABASE IF NOT EXISTS mysqltest;
+USE mysqltest;
+CREATE TABLE IF NOT EXISTS t(c1 int);
+CREATE TABLE IF NOT EXISTS t1 LIKE t;
+CREATE TABLE IF NOT EXISTS t2 SELECT * FROM t;
+CREATE EVENT IF NOT EXISTS e
+ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR
+DO SELECT now();
+DROP DATABASE mysqltest;
+CREATE DATABASE IF NOT EXISTS mysqltest;
+USE mysqltest;
+CREATE TABLE IF NOT EXISTS t(c1 int);
+CREATE TABLE IF NOT EXISTS t1 LIKE t;
+CREATE TABLE IF NOT EXISTS t2 SELECT * FROM t;
+CREATE EVENT IF NOT EXISTS e
+ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR
+DO SELECT now();
+SHOW TABLES in mysqltest;
+Tables_in_mysqltest
+t
+t1
+t2
+SHOW EVENTS in mysqltest;
+Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
+mysqltest e root@localhost SYSTEM ONE TIME # NULL NULL NULL NULL SLAVESIDE_DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
+DROP DATABASE IF EXISTS mysqltest;
=== added file 'mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result'
--- a/mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_create_tmp_table_if_not_exists.result 2009-08-13 02:48:57 +0000
@@ -0,0 +1,22 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+DROP DATABASE IF EXISTS mysqltest;
+CREATE TEMPORARY TABLE IF NOT EXISTS tmp(c1 int);
+CREATE TEMPORARY TABLE IF NOT EXISTS tmp(c1 int);
+CREATE TEMPORARY TABLE IF NOT EXISTS tmp1 LIKE tmp;
+CREATE TEMPORARY TABLE IF NOT EXISTS tmp1 LIKE tmp;
+CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp;
+CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # DROP DATABASE IF EXISTS mysqltest
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp(c1 int)
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp(c1 int)
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp1 LIKE tmp
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp1 LIKE tmp
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp
=== modified file 'mysql-test/suite/rpl/r/rpl_drop_if_exists.result'
--- a/mysql-test/suite/rpl/r/rpl_drop_if_exists.result 2009-02-11 17:46:43 +0000
+++ b/mysql-test/suite/rpl/r/rpl_drop_if_exists.result 2009-08-29 08:52:22 +0000
@@ -43,7 +43,7 @@ master-bin.000001 # Query # # use `test`
master-bin.000001 # Query # # DROP DATABASE IF EXISTS db_bug_13684
master-bin.000001 # Query # # CREATE DATABASE db_bug_13684
master-bin.000001 # Query # # use `test`; CREATE TABLE db_bug_13684.t (a int)
-master-bin.000001 # Query # # use `test`; CREATE EVENT db_bug_13684.e
+master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` EVENT db_bug_13684.e
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR
DO
UPDATE db_bug_13684.t SET a = a + 1
@@ -75,7 +75,7 @@ master-bin.000001 # Query # # use `test`
master-bin.000001 # Query # # DROP DATABASE IF EXISTS db_bug_13684
master-bin.000001 # Query # # CREATE DATABASE db_bug_13684
master-bin.000001 # Query # # use `test`; CREATE TABLE db_bug_13684.t (a int)
-master-bin.000001 # Query # # use `test`; CREATE EVENT db_bug_13684.e
+master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` EVENT db_bug_13684.e
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR
DO
UPDATE db_bug_13684.t SET a = a + 1
=== modified file 'mysql-test/suite/rpl/r/rpl_drop_temp.result'
--- a/mysql-test/suite/rpl/r/rpl_drop_temp.result 2007-06-27 12:28:02 +0000
+++ b/mysql-test/suite/rpl/r/rpl_drop_temp.result 2009-08-28 09:45:57 +0000
@@ -5,6 +5,7 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
create database if not exists mysqltest;
+use mysqltest;
create temporary table mysqltest.t1 (n int)ENGINE=MyISAM;
create temporary table mysqltest.t2 (n int)ENGINE=MyISAM;
show status like 'Slave_open_temp_tables';
=== modified file 'mysql-test/suite/rpl/r/rpl_events.result'
--- a/mysql-test/suite/rpl/r/rpl_events.result 2009-02-19 09:01:25 +0000
+++ b/mysql-test/suite/rpl/r/rpl_events.result 2009-10-15 21:38:29 +0000
@@ -191,5 +191,63 @@ select * from t28953;
END;|
ALTER EVENT event1 RENAME TO event2;
DROP EVENT event2;
+CREATE TABLE test.t1(details CHAR(30));
+CREATE EVENT /*!50000 event44331_1 */
+ON SCHEDULE AT CURRENT_TIMESTAMP
+ON COMPLETION PRESERVE DISABLE
+DO INSERT INTO test.t1 VALUES('event event44331_1 fired - no definer');
+CREATE DEFINER=CURRENT_USER /*!50000 EVENT event44331_2 */
+ON SCHEDULE AT CURRENT_TIMESTAMP
+ON COMPLETION PRESERVE DISABLE
+DO INSERT INTO test.t1 VALUES('event event44331_2 fired - DEFINER=CURRENT_USER');
+CREATE DEFINER=CURRENT_USER() EVENT event44331_3
+ON SCHEDULE AT CURRENT_TIMESTAMP
+ON COMPLETION PRESERVE DISABLE
+DO INSERT INTO test.t1 VALUES('event event44331_3 fired - DEFINER=CURRENT_USER() function');
+CREATE /*!50000 DEFINER='user44331' */ EVENT event44331_4
+ON SCHEDULE AT CURRENT_TIMESTAMP
+ON COMPLETION PRESERVE DISABLE
+DO INSERT INTO test.t1 VALUES('event event44331_4 fired - DEFINER=user1');
+Warnings:
+Note 1449 The user specified as a definer ('user44331'@'%') does not exist
+#on master
+select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events
+where EVENT_NAME='event44331_1';
+EVENT_SCHEMA EVENT_NAME DEFINER
+test event44331_1 root@localhost
+select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events
+where EVENT_NAME='event44331_2';
+EVENT_SCHEMA EVENT_NAME DEFINER
+test event44331_2 root@localhost
+select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events
+where EVENT_NAME='event44331_3';
+EVENT_SCHEMA EVENT_NAME DEFINER
+test event44331_3 root@localhost
+select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events
+where EVENT_NAME='event44331_4';
+EVENT_SCHEMA EVENT_NAME DEFINER
+test event44331_4 user44331@%
+#on slave
+select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events
+where EVENT_NAME='event44331_1';
+EVENT_SCHEMA EVENT_NAME DEFINER
+test event44331_1 root@localhost
+select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events
+where EVENT_NAME='event44331_2';
+EVENT_SCHEMA EVENT_NAME DEFINER
+test event44331_2 root@localhost
+select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events
+where EVENT_NAME='event44331_3';
+EVENT_SCHEMA EVENT_NAME DEFINER
+test event44331_3 root@localhost
+select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events
+where EVENT_NAME='event44331_4';
+EVENT_SCHEMA EVENT_NAME DEFINER
+test event44331_4 user44331@%
SET @@global.event_scheduler= @old_event_scheduler;
DROP TABLE t28953;
+DROP TABLE t1;
+DROP EVENT event44331_1;
+DROP EVENT event44331_2;
+DROP EVENT event44331_3;
+DROP EVENT event44331_4;
=== modified file 'mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result'
--- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result 2009-05-31 05:44:41 +0000
+++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result 2009-08-29 08:52:22 +0000
@@ -690,7 +690,7 @@ test_rpl e1 root@localhost SYSTEM RECURR
USE test_rpl;
SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
-test_rpl e1 @ SYSTEM RECURRING NULL 1 # # NULL SLAVESIDE_DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
+test_rpl e1 root@localhost SYSTEM RECURRING NULL 1 # # NULL SLAVESIDE_DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
==========MASTER==========
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -963,7 +963,9 @@ master-bin.000001 # Xid 1 # #
master-bin.000001 # Query 1 # BEGIN
master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
master-bin.000001 # Xid 1 # #
+master-bin.000001 # Query 1 # BEGIN
master-bin.000001 # Query 1 # use `test_rpl`; TRUNCATE t1
+master-bin.000001 # Xid 1 # #
master-bin.000001 # Query 1 # BEGIN
master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
master-bin.000001 # Xid 1 # #
@@ -1076,7 +1078,7 @@ master-bin.000001 # Query 1 # use `test_
master-bin.000001 # Query 1 # BEGIN
master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 'test1')
master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # use `test_rpl`; CREATE EVENT e1 ON SCHEDULE EVERY '1' SECOND COMMENT 'e_second_comment' DO DELETE FROM t1
+master-bin.000001 # Query 1 # use `test_rpl`; CREATE DEFINER=`root`@`localhost` EVENT e1 ON SCHEDULE EVERY '1' SECOND COMMENT 'e_second_comment' DO DELETE FROM t1
master-bin.000001 # Query 1 # use `test_rpl`; ALTER EVENT e1 RENAME TO e2
master-bin.000001 # Query 1 # use `test_rpl`; DROP EVENT e2
master-bin.000001 # Query 1 # BEGIN
=== modified file 'mysql-test/suite/rpl/r/rpl_loaddata_charset.result'
--- a/mysql-test/suite/rpl/r/rpl_loaddata_charset.result 2007-12-12 17:19:24 +0000
+++ b/mysql-test/suite/rpl/r/rpl_loaddata_charset.result 2009-08-12 05:31:56 +0000
@@ -35,3 +35,44 @@ C3BF
D0AA
D0AA
drop table t1;
+-------------test bug#45516------------------
+DROP DATABASE IF EXISTS mysqltest;
+CREATE DATABASE mysqltest CHARSET UTF8;
+USE mysqltest;
+CREATE TABLE t (cl varchar(100)) CHARSET UTF8;
+LOAD DATA LOCAL INFILE './std_data/loaddata_utf8.dat' INTO TABLE t
+FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';
+----------content on master----------
+SELECT hex(cl) FROM t;
+hex(cl)
+E4B880E4BA8CE4B889
+E59B9BE4BA94E585AD
+E4B883E585ABE4B99D
+----------content on slave----------
+USE mysqltest;
+SELECT hex(cl) FROM t;
+hex(cl)
+E4B880E4BA8CE4B889
+E59B9BE4BA94E585AD
+E4B883E585ABE4B99D
+DROP DATABASE mysqltest;
+DROP DATABASE IF EXISTS mysqltest;
+CREATE DATABASE mysqltest CHARSET UTF8;
+USE mysqltest;
+CREATE TABLE t (cl varchar(100)) CHARSET UTF8;
+LOAD DATA INFILE '../../std_data/loaddata_utf8.dat' INTO TABLE t
+FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';
+----------content on master----------
+SELECT hex(cl) FROM t;
+hex(cl)
+E4B880E4BA8CE4B889
+E59B9BE4BA94E585AD
+E4B883E585ABE4B99D
+----------content on slave----------
+USE mysqltest;
+SELECT hex(cl) FROM t;
+hex(cl)
+E4B880E4BA8CE4B889
+E59B9BE4BA94E585AD
+E4B883E585ABE4B99D
+DROP DATABASE mysqltest;
=== modified file 'mysql-test/suite/rpl/r/rpl_rewrt_db.result'
--- a/mysql-test/suite/rpl/r/rpl_rewrt_db.result 2007-12-12 17:19:24 +0000
+++ b/mysql-test/suite/rpl/r/rpl_rewrt_db.result 2009-08-28 09:45:57 +0000
@@ -90,5 +90,132 @@ a b
2 row 2
3 row 3
0
+set sql_log_bin= 0;
drop database rewrite;
+set sql_log_bin= 1;
+set sql_log_bin= 0;
drop table t1;
+set sql_log_bin= 1;
+
+****
+**** Bug #46861 Auto-closing of temporary tables broken by replicate-rewrite-db
+****
+
+****
+**** Preparing the environment
+****
+SET sql_log_bin= 0;
+CREATE DATABASE database_master_temp_01;
+CREATE DATABASE database_master_temp_02;
+CREATE DATABASE database_master_temp_03;
+SET sql_log_bin= 1;
+SET sql_log_bin= 0;
+CREATE DATABASE database_slave_temp_01;
+CREATE DATABASE database_slave_temp_02;
+CREATE DATABASE database_slave_temp_03;
+SET sql_log_bin= 1;
+
+****
+**** Creating temporary tables on different databases with different connections
+****
+**** con_temp_01 --> creates
+**** t_01_01_temp on database_master_temp_01
+****
+**** con_temp_02 --> creates
+**** t_01_01_temp on database_master_temp_01
+**** t_02_01_temp, t_02_02_temp on database_master_temp_02
+****
+**** con_temp_02 --> creates
+**** t_01_01_temp on database_master_temp_01
+**** t_02_01_temp, t_02_02_temp on database_master_temp_02
+**** t_03_01_temp, t_03_02_temp, t_03_03_temp on database_master_temp_03
+****
+
+con_temp_01
+
+USE database_master_temp_01;
+CREATE TEMPORARY TABLE t_01_01_temp(a int);
+INSERT INTO t_01_01_temp VALUES(1);
+
+con_temp_02
+
+USE database_master_temp_01;
+CREATE TEMPORARY TABLE t_01_01_temp(a int);
+INSERT INTO t_01_01_temp VALUES(1);
+USE database_master_temp_02;
+CREATE TEMPORARY TABLE t_02_01_temp(a int);
+INSERT INTO t_02_01_temp VALUES(1);
+CREATE TEMPORARY TABLE t_02_02_temp(a int);
+INSERT INTO t_02_02_temp VALUES(1);
+
+con_temp_03
+
+USE database_master_temp_01;
+CREATE TEMPORARY TABLE t_01_01_temp(a int);
+INSERT INTO t_01_01_temp VALUES(1);
+USE database_master_temp_02;
+CREATE TEMPORARY TABLE t_02_01_temp(a int);
+INSERT INTO t_02_01_temp VALUES(1);
+CREATE TEMPORARY TABLE t_02_02_temp(a int);
+INSERT INTO t_02_02_temp VALUES(1);
+USE database_master_temp_03;
+CREATE TEMPORARY TABLE t_03_01_temp(a int);
+INSERT INTO t_03_01_temp VALUES(1);
+CREATE TEMPORARY TABLE t_03_02_temp(a int);
+INSERT INTO t_03_02_temp VALUES(1);
+CREATE TEMPORARY TABLE t_03_03_temp(a int);
+INSERT INTO t_03_03_temp VALUES(1);
+
+**** Dropping the connections
+**** We want to SHOW BINLOG EVENTS, to know what was logged. But there is no
+**** guarantee that logging of the terminated con1 has been done yet.a To be
+**** sure that logging has been done, we use a user lock.
+
+show status like 'Slave_open_temp_tables';
+Variable_name Value
+Slave_open_temp_tables 10
+select get_lock("con_01",10);
+get_lock("con_01",10)
+1
+select get_lock("con_01",10);
+get_lock("con_01",10)
+1
+select get_lock("con_02",10);
+get_lock("con_02",10)
+1
+select get_lock("con_02",10);
+get_lock("con_02",10)
+1
+select get_lock("con_03",10);
+get_lock("con_03",10)
+1
+select get_lock("con_03",10);
+get_lock("con_03",10)
+1
+
+**** Checking the binary log and temporary tables
+
+show status like 'Slave_open_temp_tables';
+Variable_name Value
+Slave_open_temp_tables 0
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `database_master_temp_01`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `t_01_01_temp`
+master-bin.000001 # Query # # use `database_master_temp_02`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `t_02_02_temp`,`t_02_01_temp`
+master-bin.000001 # Query # # use `database_master_temp_01`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `t_01_01_temp`
+master-bin.000001 # Query # # use `database_master_temp_03`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `t_03_03_temp`,`t_03_02_temp`,`t_03_01_temp`
+master-bin.000001 # Query # # use `database_master_temp_02`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `t_02_02_temp`,`t_02_01_temp`
+master-bin.000001 # Query # # use `database_master_temp_01`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `t_01_01_temp`
+****
+**** Cleaning up the test case
+****
+SET sql_log_bin= 0;
+DROP DATABASE database_master_temp_01;
+DROP DATABASE database_master_temp_02;
+DROP DATABASE database_master_temp_03;
+SET sql_log_bin= 1;
+SET sql_log_bin= 0;
+DROP DATABASE database_slave_temp_01;
+DROP DATABASE database_slave_temp_02;
+DROP DATABASE database_slave_temp_03;
+SET sql_log_bin= 1;
=== added file 'mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result 2009-08-27 12:46:29 +0000
@@ -0,0 +1,870 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+###################################################################################
+# CONFIGURATION
+###################################################################################
+SET SQL_LOG_BIN=0;
+CREATE TABLE nt_1 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM;
+CREATE TABLE nt_2 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM;
+CREATE TABLE nt_3 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM;
+CREATE TABLE nt_4 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM;
+CREATE TABLE tt_1 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb;
+CREATE TABLE tt_2 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb;
+CREATE TABLE tt_3 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb;
+CREATE TABLE tt_4 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb;
+SET SQL_LOG_BIN=1;
+SET SQL_LOG_BIN=0;
+CREATE TABLE nt_1 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM;
+CREATE TABLE nt_2 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM;
+CREATE TABLE nt_3 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM;
+CREATE TABLE nt_4 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM;
+CREATE TABLE tt_1 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb;
+CREATE TABLE tt_2 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb;
+CREATE TABLE tt_3 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb;
+CREATE TABLE tt_4 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb;
+SET SQL_LOG_BIN=1;
+CREATE FUNCTION f1 () RETURNS VARCHAR(64)
+BEGIN
+RETURN "Testing...";
+END|
+CREATE FUNCTION f2 () RETURNS VARCHAR(64)
+BEGIN
+RETURN f1();
+END|
+CREATE PROCEDURE pc_i_tt_3 (IN x INT, IN y VARCHAR(64))
+BEGIN
+INSERT INTO tt_3 VALUES (y,x,x);
+END|
+CREATE TRIGGER tr_i_tt_3_to_nt_3 BEFORE INSERT ON tt_3 FOR EACH ROW
+BEGIN
+INSERT INTO nt_3 VALUES (NEW.a, NEW.b, NEW.c);
+END|
+CREATE TRIGGER tr_i_nt_4_to_tt_4 BEFORE INSERT ON nt_4 FOR EACH ROW
+BEGIN
+INSERT INTO tt_4 VALUES (NEW.a, NEW.b, NEW.c);
+END|
+###################################################################################
+# MIXING TRANSACTIONAL and NON-TRANSACTIONAL TABLES
+###################################################################################
+#
+#1) "B T T C" generates in binlog the "B T T C" entries.
+#
+BEGIN;
+INSERT INTO tt_1 VALUES ("new text 4", 4, "new text 4");
+INSERT INTO tt_2 VALUES ("new text 4", 4, "new text 4");
+COMMIT;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 4", 4, "new text 4")
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_2 VALUES ("new text 4", 4, "new text 4")
+master-bin.000001 # Xid # # COMMIT /* XID */
+
+
+
+
+#
+#1.e) "B T T C" with error in T generates in binlog the "B T T C" entries.
+#
+INSERT INTO tt_1 VALUES ("new text -2", -2, "new text -2");
+BEGIN;
+INSERT INTO tt_1 VALUES ("new text -1", -1, "new text -1"), ("new text -2", -2, "new text -2");
+ERROR 23000: Duplicate entry '-2' for key 'PRIMARY'
+INSERT INTO tt_2 VALUES ("new text -3", -3, "new text -3");
+COMMIT;
+BEGIN;
+INSERT INTO tt_2 VALUES ("new text -5", -5, "new text -5");
+INSERT INTO tt_2 VALUES ("new text -4", -4, "new text -4"), ("new text -5", -5, "new text -5");
+ERROR 23000: Duplicate entry '-5' for key 'PRIMARY'
+COMMIT;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text -2", -2, "new text -2")
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_2 VALUES ("new text -3", -3, "new text -3")
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_2 VALUES ("new text -5", -5, "new text -5")
+master-bin.000001 # Xid # # COMMIT /* XID */
+
+
+
+
+#
+#2) "B T T R" generates in binlog an "empty" entry.
+#
+BEGIN;
+INSERT INTO tt_1 VALUES ("new text 5", 5, "new text 5");
+INSERT INTO tt_2 VALUES ("new text 5", 5, "new text 5");
+ROLLBACK;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+
+
+
+
+#
+#2.e) "B T T R" with error in T generates in binlog an "empty" entry.
+#
+INSERT INTO tt_1 VALUES ("new text -7", -7, "new text -7");
+BEGIN;
+INSERT INTO tt_1 VALUES ("new text -6", -6, "new text -6"), ("new text -7", -7, "new text -7");
+ERROR 23000: Duplicate entry '-7' for key 'PRIMARY'
+INSERT INTO tt_2 VALUES ("new text -8", -8, "new text -8");
+ROLLBACK;
+BEGIN;
+INSERT INTO tt_2 VALUES ("new text -10", -10, "new text -10");
+INSERT INTO tt_2 VALUES ("new text -9", -9, "new text -9"), ("new text -10", -10, "new text -10");
+ERROR 23000: Duplicate entry '-10' for key 'PRIMARY'
+ROLLBACK;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text -7", -7, "new text -7")
+master-bin.000001 # Xid # # COMMIT /* XID */
+
+
+
+
+#
+#3) "B T N C" generates in binlog the "B T N C" entries.
+#
+BEGIN;
+INSERT INTO tt_1 VALUES ("new text 6", 6, "new text 6");
+INSERT INTO nt_1 VALUES ("new text 6", 6, "new text 6");
+COMMIT;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 6", 6, "new text 6")
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text 6", 6, "new text 6")
+master-bin.000001 # Xid # # COMMIT /* XID */
+
+
+
+
+#
+#3.e) "B T N C" with error in either T or N generates in binlog the "B T N C" entries.
+#
+INSERT INTO tt_1 VALUES ("new text -12", -12, "new text -12");
+BEGIN;
+INSERT INTO tt_1 VALUES ("new text -11", -11, "new text -11"), ("new text -12", -12, "new text -12");
+ERROR 23000: Duplicate entry '-12' for key 'PRIMARY'
+INSERT INTO nt_1 VALUES ("new text -13", -13, "new text -13");
+COMMIT;
+BEGIN;
+INSERT INTO tt_1 VALUES ("new text -14", -14, "new text -14");
+INSERT INTO nt_1 VALUES ("new text -16", -16, "new text -16");
+INSERT INTO nt_1 VALUES ("new text -15", -15, "new text -15"), ("new text -16", -16, "new text -16");
+ERROR 23000: Duplicate entry '-16' for key 'PRIMARY'
+COMMIT;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text -12", -12, "new text -12")
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text -13", -13, "new text -13")
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text -14", -14, "new text -14")
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text -16", -16, "new text -16")
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text -15", -15, "new text -15"), ("new text -16", -16, "new text -16")
+master-bin.000001 # Xid # # COMMIT /* XID */
+
+
+
+
+#
+#4) "B T N R" generates in binlog the "B T N R" entries.
+#
+BEGIN;
+INSERT INTO tt_1 VALUES ("new text 7", 7, "new text 7");
+INSERT INTO nt_1 VALUES ("new text 7", 7, "new text 7");
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 7", 7, "new text 7")
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text 7", 7, "new text 7")
+master-bin.000001 # Query # # ROLLBACK
+
+
+
+
+#
+#4.e) "B T N R" with error in either T or N generates in binlog the "B T N R" entries.
+#
+INSERT INTO tt_1 VALUES ("new text -17", -17, "new text -17");
+BEGIN;
+INSERT INTO tt_1 VALUES ("new text -16", -16, "new text -16"), ("new text -17", -17, "new text -17");
+ERROR 23000: Duplicate entry '-17' for key 'PRIMARY'
+INSERT INTO nt_1 VALUES ("new text -18", -18, "new text -18");
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+BEGIN;
+INSERT INTO tt_1 VALUES ("new text -19", -19, "new text -19");
+INSERT INTO nt_1 VALUES ("new text -21", -21, "new text -21");
+INSERT INTO nt_1 VALUES ("new text -20", -20, "new text -20"), ("new text -21", -21, "new text -21");
+ERROR 23000: Duplicate entry '-21' for key 'PRIMARY'
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text -17", -17, "new text -17")
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text -18", -18, "new text -18")
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text -19", -19, "new text -19")
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text -21", -21, "new text -21")
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text -20", -20, "new text -20"), ("new text -21", -21, "new text -21")
+master-bin.000001 # Query # # ROLLBACK
+
+
+
+
+#
+#5) "T" generates in binlog the "B T C" entry.
+#
+INSERT INTO tt_1 VALUES ("new text 8", 8, "new text 8");
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 8", 8, "new text 8")
+master-bin.000001 # Xid # # COMMIT /* XID */
+
+
+
+
+#
+#5.e) "T" with error in T generates in binlog an "empty" entry.
+#
+INSERT INTO tt_1 VALUES ("new text -1", -1, "new text -1");
+INSERT INTO tt_1 VALUES ("new text -1", -1, "new text -1"), ("new text -22", -22, "new text -22");
+ERROR 23000: Duplicate entry '-1' for key 'PRIMARY'
+INSERT INTO tt_1 VALUES ("new text -23", -23, "new text -23"), ("new text -1", -1, "new text -1");
+ERROR 23000: Duplicate entry '-1' for key 'PRIMARY'
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text -1", -1, "new text -1")
+master-bin.000001 # Xid # # COMMIT /* XID */
+
+
+
+
+#
+#6) "N" generates in binlog the "N" entry.
+#
+INSERT INTO nt_1 VALUES ("new text 9", 9, "new text 9");
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text 9", 9, "new text 9")
+
+
+
+
+#
+#6.e) "N" with error in N generates in binlog an empty entry if the error
+# happens in the first tuple. Otherwise, generates the "N" entry and
+# the error is appended.
+#
+INSERT INTO nt_1 VALUES ("new text -1", -1, "new text -1");
+INSERT INTO nt_1 VALUES ("new text -1", -1, "new text -1");
+ERROR 23000: Duplicate entry '-1' for key 'PRIMARY'
+INSERT INTO nt_1 VALUES ("new text -24", -24, "new text -24"), ("new text -1", -1, "new text -1");
+ERROR 23000: Duplicate entry '-1' for key 'PRIMARY'
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text -1", -1, "new text -1")
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text -24", -24, "new text -24"), ("new text -1", -1, "new text -1")
+
+
+
+
+#
+#7) "M" generates in binglog the "B M C" entries.
+#
+DELETE FROM nt_1;
+INSERT INTO nt_1 SELECT * FROM tt_1;
+DELETE FROM tt_1;
+INSERT INTO tt_1 SELECT * FROM nt_1;
+INSERT INTO tt_3 VALUES ("new text 000", 000, '');
+INSERT INTO tt_3 VALUES("new text 100", 100, f1());
+INSERT INTO nt_4 VALUES("new text 100", 100, f1());
+INSERT INTO tt_3 VALUES("new text 200", 200, f2());
+INSERT INTO nt_4 VALUES ("new text 300", 300, '');
+INSERT INTO nt_4 VALUES ("new text 400", 400, f1());
+INSERT INTO nt_4 VALUES ("new text 500", 500, f2());
+CALL pc_i_tt_3(600, "Testing...");
+UPDATE nt_3, nt_4, tt_3, tt_4 SET nt_3.a= "new text 1", nt_4.a= "new text 1", tt_3.a= "new text 1", tt_4.a= "new text 1" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100;
+UPDATE tt_3, tt_4, nt_3, nt_4 SET tt_3.a= "new text 2", tt_4.a= "new text 2", nt_3.a= "new text 2", nt_4.a = "new text 2" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100;
+UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 3", nt_3.a= "new text 3", nt_4.a= "new text 3", tt_4.a = "new text 3" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100;
+UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 4", nt_3.a= "new text 4", nt_4.a= "new text 4", tt_4.a = "new text 4" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; DELETE FROM nt_1
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 SELECT * FROM tt_1
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; DELETE FROM tt_1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 SELECT * FROM nt_1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES ("new text 000", 000, '')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES("new text 100", 100, f1())
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES("new text 100", 100, f1())
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES("new text 200", 200, f2())
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES ("new text 300", 300, '')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES ("new text 400", 400, f1())
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES ("new text 500", 500, f2())
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES ( NAME_CONST('y',_latin1'Testing...' COLLATE 'latin1_swedish_ci'), NAME_CONST('x',600), NAME_CONST('x',600))
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; UPDATE nt_3, nt_4, tt_3, tt_4 SET nt_3.a= "new text 1", nt_4.a= "new text 1", tt_3.a= "new text 1", tt_4.a= "new text 1" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; UPDATE tt_3, tt_4, nt_3, nt_4 SET tt_3.a= "new text 2", tt_4.a= "new text 2", nt_3.a= "new text 2", nt_4.a = "new text 2" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 3", nt_3.a= "new text 3", nt_4.a= "new text 3", tt_4.a = "new text 3" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 4", nt_3.a= "new text 4", nt_4.a= "new text 4", tt_4.a = "new text 4" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100
+master-bin.000001 # Xid # # COMMIT /* XID */
+
+
+
+
+#
+#7.e) "M" with error in M generates in binglog the "B M R" entries.
+#
+INSERT INTO nt_3 VALUES ("new text -26", -26, '');
+SELECT * FROM tt_3;
+a b c
+new text 000 0
+new text 4 100 Testing...
+new text 200 200 Testing...
+Testing... 600 600
+INSERT INTO tt_3 VALUES ("new text -25", -25, ''), ("new text -26", -26, '');
+ERROR 23000: Duplicate entry '-26' for key 'PRIMARY'
+SELECT * FROM tt_3;
+a b c
+new text 000 0
+new text 4 100 Testing...
+new text 200 200 Testing...
+Testing... 600 600
+INSERT INTO tt_4 VALUES ("new text -26", -26, '');
+SELECT * FROM nt_4;
+a b c
+new text 4 100 Testing...
+new text 300 300
+new text 400 400 Testing...
+new text 500 500 Testing...
+INSERT INTO nt_4 VALUES ("new text -25", -25, ''), ("new text -26", -26, '');
+ERROR 23000: Duplicate entry '-26' for key 'PRIMARY'
+SELECT * FROM nt_4;
+a b c
+new text 4 100 Testing...
+new text 300 300
+new text 400 400 Testing...
+new text 500 500 Testing...
+new text -25 -25
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_3 VALUES ("new text -26", -26, '')
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES ("new text -25", -25, ''), ("new text -26", -26, '')
+master-bin.000001 # Query # # ROLLBACK
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_4 VALUES ("new text -26", -26, '')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES ("new text -25", -25, ''), ("new text -26", -26, '')
+master-bin.000001 # Query # # ROLLBACK
+
+
+
+
+#
+#8) "B N N T C" generates in binglog the "N N B T C" entries.
+#
+BEGIN;
+INSERT INTO nt_1 VALUES ("new text 10", 10, "new text 10");
+INSERT INTO nt_2 VALUES ("new text 10", 10, "new text 10");
+INSERT INTO tt_1 VALUES ("new text 10", 10, "new text 10");
+COMMIT;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text 10", 10, "new text 10")
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_2 VALUES ("new text 10", 10, "new text 10")
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 10", 10, "new text 10")
+master-bin.000001 # Xid # # COMMIT /* XID */
+
+
+
+
+#
+#8.e) "B N N T R" See 6.e and 9.e.
+#
+
+
+
+
+#
+#9) "B N N T R" generates in binlog the "N N B T R" entries.
+#
+BEGIN;
+INSERT INTO nt_1 VALUES ("new text 11", 11, "new text 11");
+INSERT INTO nt_2 VALUES ("new text 11", 11, "new text 11");
+INSERT INTO tt_1 VALUES ("new text 11", 11, "new text 11");
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text 11", 11, "new text 11")
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_2 VALUES ("new text 11", 11, "new text 11")
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 11", 11, "new text 11")
+master-bin.000001 # Query # # ROLLBACK
+
+
+
+
+#
+#9.e) "B N N T R" with error in N generates in binlog the "N N B T R" entries.
+#
+BEGIN;
+INSERT INTO nt_1 VALUES ("new text -25", -25, "new text -25");
+INSERT INTO nt_2 VALUES ("new text -25", -25, "new text -25");
+INSERT INTO nt_2 VALUES ("new text -26", -26, "new text -26"), ("new text -25", -25, "new text -25");
+ERROR 23000: Duplicate entry '-25' for key 'PRIMARY'
+INSERT INTO tt_1 VALUES ("new text -27", -27, "new text -27");
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text -25", -25, "new text -25")
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_2 VALUES ("new text -25", -25, "new text -25")
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_2 VALUES ("new text -26", -26, "new text -26"), ("new text -25", -25, "new text -25")
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text -27", -27, "new text -27")
+master-bin.000001 # Query # # ROLLBACK
+
+
+
+
+#
+#10) "B N N C" generates in binglog the "N N" entries.
+#
+BEGIN;
+INSERT INTO nt_1 VALUES ("new text 12", 12, "new text 12");
+INSERT INTO nt_2 VALUES ("new text 12", 12, "new text 12");
+COMMIT;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text 12", 12, "new text 12")
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_2 VALUES ("new text 12", 12, "new text 12")
+
+
+
+
+#
+#10.e) "B N N C" See 6.e and 9.e.
+#
+
+
+
+
+#
+#11) "B N N R" generates in binlog the "N N" entries.
+#
+BEGIN;
+INSERT INTO nt_1 VALUES ("new text 13", 13, "new text 13");
+INSERT INTO nt_2 VALUES ("new text 13", 13, "new text 13");
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text 13", 13, "new text 13")
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_2 VALUES ("new text 13", 13, "new text 13")
+
+
+
+
+#
+#11.e) "B N N R" See 6.e and 9.e.
+#
+
+
+
+
+#
+#12) "B M T C" generates in the binlog the "B M T C" entries.
+#
+DELETE FROM nt_1;
+BEGIN;
+INSERT INTO nt_1 SELECT * FROM tt_1;
+INSERT INTO tt_2 VALUES ("new text 14", 14, "new text 14");
+COMMIT;
+DELETE FROM tt_1;
+BEGIN;
+INSERT INTO tt_1 SELECT * FROM nt_1;
+INSERT INTO tt_2 VALUES ("new text 15", 15, "new text 15");
+COMMIT;
+BEGIN;
+INSERT INTO tt_3 VALUES ("new text 700", 700, '');
+INSERT INTO tt_1 VALUES ("new text 800", 800, '');
+COMMIT;
+BEGIN;
+INSERT INTO tt_3 VALUES("new text 900", 900, f1());
+INSERT INTO tt_1 VALUES ("new text 1000", 1000, '');
+COMMIT;
+BEGIN;
+INSERT INTO tt_3 VALUES(1100, 1100, f2());
+INSERT INTO tt_1 VALUES ("new text 1200", 1200, '');
+COMMIT;
+BEGIN;
+INSERT INTO nt_4 VALUES ("new text 1300", 1300, '');
+INSERT INTO tt_1 VALUES ("new text 1400", 1400, '');
+COMMIT;
+BEGIN;
+INSERT INTO nt_4 VALUES("new text 1500", 1500, f1());
+INSERT INTO tt_1 VALUES ("new text 1600", 1600, '');
+COMMIT;
+BEGIN;
+INSERT INTO nt_4 VALUES("new text 1700", 1700, f2());
+INSERT INTO tt_1 VALUES ("new text 1800", 1800, '');
+COMMIT;
+BEGIN;
+CALL pc_i_tt_3(1900, "Testing...");
+INSERT INTO tt_1 VALUES ("new text 2000", 2000, '');
+COMMIT;
+BEGIN;
+UPDATE nt_3, nt_4, tt_3, tt_4 SET nt_3.a= "new text 5", nt_4.a= "new text 5", tt_3.a= "new text 5", tt_4.a= "new text 5" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100;
+INSERT INTO tt_1 VALUES ("new text 2100", 2100, '');
+COMMIT;
+BEGIN;
+UPDATE tt_3, tt_4, nt_3, nt_4 SET tt_3.a= "new text 6", tt_4.a= "new text 6", nt_3.a= "new text 6", nt_4.a = "new text 6" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100;
+INSERT INTO tt_1 VALUES ("new text 2200", 2200, '');
+COMMIT;
+BEGIN;
+UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 7", nt_3.a= "new text 7", nt_4.a= "new text 7", tt_4.a = "new text 7" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100;
+INSERT INTO tt_1 VALUES ("new text 2300", 2300, '');
+COMMIT;
+BEGIN;
+UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 8", nt_3.a= "new text 8", nt_4.a= "new text 8", tt_4.a = "new text 8" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100;
+INSERT INTO tt_1 VALUES ("new text 2400", 2400, '');
+COMMIT;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; DELETE FROM nt_1
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 SELECT * FROM tt_1
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_2 VALUES ("new text 14", 14, "new text 14")
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; DELETE FROM tt_1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 SELECT * FROM nt_1
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_2 VALUES ("new text 15", 15, "new text 15")
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES ("new text 700", 700, '')
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 800", 800, '')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES("new text 900", 900, f1())
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 1000", 1000, '')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES(1100, 1100, f2())
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 1200", 1200, '')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES ("new text 1300", 1300, '')
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 1400", 1400, '')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES("new text 1500", 1500, f1())
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 1600", 1600, '')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES("new text 1700", 1700, f2())
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 1800", 1800, '')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES ( NAME_CONST('y',_latin1'Testing...' COLLATE 'latin1_swedish_ci'), NAME_CONST('x',1900), NAME_CONST('x',1900))
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 2000", 2000, '')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; UPDATE nt_3, nt_4, tt_3, tt_4 SET nt_3.a= "new text 5", nt_4.a= "new text 5", tt_3.a= "new text 5", tt_4.a= "new text 5" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 2100", 2100, '')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; UPDATE tt_3, tt_4, nt_3, nt_4 SET tt_3.a= "new text 6", tt_4.a= "new text 6", nt_3.a= "new text 6", nt_4.a = "new text 6" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 2200", 2200, '')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 7", nt_3.a= "new text 7", nt_4.a= "new text 7", tt_4.a = "new text 7" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 2300", 2300, '')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 8", nt_3.a= "new text 8", nt_4.a= "new text 8", tt_4.a = "new text 8" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 2400", 2400, '')
+master-bin.000001 # Xid # # COMMIT /* XID */
+
+
+
+
+#
+#12.e) "B M T C" with error in M generates in the binlog the "B M T C" entries.
+#
+# There is a bug in the slave that needs to be fixed before enabling
+# this part of the test. A bug report will be filed referencing this
+# test case.
+BEGIN;
+INSERT INTO nt_3 VALUES ("new text -28", -28, '');
+INSERT INTO tt_3 VALUES ("new text -27", -27, ''), ("new text -28", -28, '');
+ERROR 23000: Duplicate entry '-28' for key 'PRIMARY'
+INSERT INTO tt_1 VALUES ("new text -27", -27, '');
+COMMIT;
+BEGIN;
+INSERT INTO tt_4 VALUES ("new text -28", -28, '');
+INSERT INTO nt_4 VALUES ("new text -27", -27, ''), ("new text -28", -28, '');
+ERROR 23000: Duplicate entry '-28' for key 'PRIMARY'
+INSERT INTO tt_1 VALUES ("new text -28", -28, '');
+COMMIT;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_3 VALUES ("new text -28", -28, '')
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES ("new text -27", -27, ''), ("new text -28", -28, '')
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text -27", -27, '')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_4 VALUES ("new text -28", -28, '')
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES ("new text -27", -27, ''), ("new text -28", -28, '')
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text -28", -28, '')
+master-bin.000001 # Xid # # COMMIT /* XID */
+
+
+
+
+#
+#13) "B M T R" generates in the binlog the "B M T R" entries
+#
+DELETE FROM nt_1;
+BEGIN;
+INSERT INTO nt_1 SELECT * FROM tt_1;
+INSERT INTO tt_2 VALUES ("new text 17", 17, "new text 17");
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+DELETE FROM tt_1;
+BEGIN;
+INSERT INTO tt_1 SELECT * FROM nt_1;
+INSERT INTO tt_2 VALUES ("new text 18", 18, "new text 18");
+ROLLBACK;
+INSERT INTO tt_1 SELECT * FROM nt_1;
+BEGIN;
+INSERT INTO tt_3 VALUES ("new text 2500", 2500, '');
+INSERT INTO tt_1 VALUES ("new text 2600", 2600, '');
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+BEGIN;
+INSERT INTO tt_3 VALUES("new text 2700", 2700, f1());
+INSERT INTO tt_1 VALUES ("new text 2800", 2800, '');
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+BEGIN;
+INSERT INTO tt_3 VALUES(2900, 2900, f2());
+INSERT INTO tt_1 VALUES ("new text 3000", 3000, '');
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+BEGIN;
+INSERT INTO nt_4 VALUES ("new text 3100", 3100, '');
+INSERT INTO tt_1 VALUES ("new text 3200", 3200, '');
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+BEGIN;
+INSERT INTO nt_4 VALUES("new text 3300", 3300, f1());
+INSERT INTO tt_1 VALUES ("new text 3400", 3400, '');
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+BEGIN;
+INSERT INTO nt_4 VALUES("new text 3500", 3500, f2());
+INSERT INTO tt_1 VALUES ("new text 3600", 3600, '');
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+BEGIN;
+CALL pc_i_tt_3(3700, "Testing...");
+INSERT INTO tt_1 VALUES ("new text 3700", 3700, '');
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+BEGIN;
+UPDATE nt_3, nt_4, tt_3, tt_4 SET nt_3.a= "new text 9", nt_4.a= "new text 9", tt_3.a= "new text 9", tt_4.a= "new text 9" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100;
+INSERT INTO tt_1 VALUES ("new text 3800", 3800, '');
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+BEGIN;
+UPDATE tt_3, tt_4, nt_3, nt_4 SET tt_3.a= "new text 10", tt_4.a= "new text 10", nt_3.a= "new text 10", nt_4.a = "new text 10" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100;
+INSERT INTO tt_1 VALUES ("new text 3900", 3900, '');
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+BEGIN;
+UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 11", nt_3.a= "new text 11", nt_4.a= "new text 11", tt_4.a = "new text 11" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100;
+INSERT INTO tt_1 VALUES ("new text 4000", 4000, '');
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+BEGIN;
+UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 12", nt_3.a= "new text 12", nt_4.a= "new text 12", tt_4.a = "new text 12" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100;
+INSERT INTO tt_1 VALUES ("new text 4100", 4100, '');
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; DELETE FROM nt_1
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 SELECT * FROM tt_1
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_2 VALUES ("new text 17", 17, "new text 17")
+master-bin.000001 # Query # # ROLLBACK
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; DELETE FROM tt_1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 SELECT * FROM nt_1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES ("new text 2500", 2500, '')
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 2600", 2600, '')
+master-bin.000001 # Query # # ROLLBACK
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES("new text 2700", 2700, f1())
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 2800", 2800, '')
+master-bin.000001 # Query # # ROLLBACK
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES(2900, 2900, f2())
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 3000", 3000, '')
+master-bin.000001 # Query # # ROLLBACK
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES ("new text 3100", 3100, '')
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 3200", 3200, '')
+master-bin.000001 # Query # # ROLLBACK
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES("new text 3300", 3300, f1())
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 3400", 3400, '')
+master-bin.000001 # Query # # ROLLBACK
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES("new text 3500", 3500, f2())
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 3600", 3600, '')
+master-bin.000001 # Query # # ROLLBACK
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES ( NAME_CONST('y',_latin1'Testing...' COLLATE 'latin1_swedish_ci'), NAME_CONST('x',3700), NAME_CONST('x',3700))
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 3700", 3700, '')
+master-bin.000001 # Query # # ROLLBACK
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; UPDATE nt_3, nt_4, tt_3, tt_4 SET nt_3.a= "new text 9", nt_4.a= "new text 9", tt_3.a= "new text 9", tt_4.a= "new text 9" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 3800", 3800, '')
+master-bin.000001 # Query # # ROLLBACK
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; UPDATE tt_3, tt_4, nt_3, nt_4 SET tt_3.a= "new text 10", tt_4.a= "new text 10", nt_3.a= "new text 10", nt_4.a = "new text 10" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 3900", 3900, '')
+master-bin.000001 # Query # # ROLLBACK
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 11", nt_3.a= "new text 11", nt_4.a= "new text 11", tt_4.a = "new text 11" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 4000", 4000, '')
+master-bin.000001 # Query # # ROLLBACK
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 12", nt_3.a= "new text 12", nt_4.a= "new text 12", tt_4.a = "new text 12" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 4100", 4100, '')
+master-bin.000001 # Query # # ROLLBACK
+
+
+
+
+#
+#13.e) "B M T R" with error in M generates in the binlog the "B M T R" entries.
+#
+BEGIN;
+INSERT INTO nt_3 VALUES ("new text -30", -30, '');
+INSERT INTO tt_3 VALUES ("new text -29", -29, ''), ("new text -30", -30, '');
+ERROR 23000: Duplicate entry '-30' for key 'PRIMARY'
+INSERT INTO tt_1 VALUES ("new text -30", -30, '');
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+BEGIN;
+INSERT INTO tt_4 VALUES ("new text -30", -30, '');
+INSERT INTO nt_4 VALUES ("new text -29", -29, ''), ("new text -30", -30, '');
+ERROR 23000: Duplicate entry '-30' for key 'PRIMARY'
+INSERT INTO tt_1 VALUES ("new text -31", -31, '');
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_3 VALUES ("new text -30", -30, '')
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES ("new text -29", -29, ''), ("new text -30", -30, '')
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text -30", -30, '')
+master-bin.000001 # Query # # ROLLBACK
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_4 VALUES ("new text -30", -30, '')
+master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES ("new text -29", -29, ''), ("new text -30", -30, '')
+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text -31", -31, '')
+master-bin.000001 # Query # # ROLLBACK
+###################################################################################
+# CLEAN
+###################################################################################
+DROP TABLE tt_1;
+DROP TABLE tt_2;
+DROP TABLE tt_3;
+DROP TABLE tt_4;
+DROP TABLE nt_1;
+DROP TABLE nt_2;
+DROP TABLE nt_3;
+DROP TABLE nt_4;
+DROP PROCEDURE pc_i_tt_3;
+DROP FUNCTION f1;
+DROP FUNCTION f2;
=== modified file 'mysql-test/suite/rpl/t/rpl_concurrency_error.test'
--- a/mysql-test/suite/rpl/t/rpl_concurrency_error.test 2009-07-18 20:07:56 +0000
+++ b/mysql-test/suite/rpl/t/rpl_concurrency_error.test 2009-08-13 16:21:01 +0000
@@ -125,14 +125,13 @@ while ($type)
connection master;
sync_slave_with_master;
-# Re-enable this after fixing BUG#46130
-#connection master;
-#let $diff_statement= SELECT * FROM t order by i;
-#source include/diff_master_slave.inc;
-
-#connection master;
-#let $diff_statement= SELECT * FROM n order by d, f;
-#source include/diff_master_slave.inc;
+connection master;
+let $diff_statement= SELECT * FROM t order by i;
+source include/diff_master_slave.inc;
+
+connection master;
+let $diff_statement= SELECT * FROM n order by d, f;
+source include/diff_master_slave.inc;
--echo ########################################################################
--echo # Cleanup
=== added file 'mysql-test/suite/rpl/t/rpl_create_if_not_exists.test'
--- a/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_create_if_not_exists.test 2009-08-13 02:48:57 +0000
@@ -0,0 +1,70 @@
+# BUG#45574:
+# SP: CREATE DATABASE|TABLE IF NOT EXISTS not binlogged if routine exists.
+#
+# There is an inconsistency with DROP DATABASE|TABLE|EVENT IF EXISTS and
+# CREATE DATABASE|TABLE|EVENT IF NOT EXISTS. DROP IF EXISTS statements are
+# binlogged even if either the DB, TABLE or EVENT does not exist. In
+# contrast, Only the CREATE EVENT IF NOT EXISTS is binlogged when the EVENT
+# exists.
+#
+# This problem caused some of the tests to fail randomly on PB or PB2.
+#
+# Description:
+# Fixed this bug by adding calls to write_bin_log in:
+# mysql_create_db
+# mysql_create_table_no_lock
+# mysql_create_like_table
+# create_table_from_items
+#
+# Test is implemented as follows:
+# i) test each "CREATE IF NOT EXISTS" (DDL), found in MySQL 5.1 manual
+# exclude CREATE TEMPORARY TABLE, on existent objects;
+#
+# Note:
+# rpl_create_tmp_table_if_not_exists.test tests CREATE TEMPORARY TABLE cases.
+#
+# References:
+# http://dev.mysql.com/doc/refman/5.1/en/sql-syntax-data-definition.html
+#
+
+source include/master-slave.inc;
+disable_warnings;
+DROP DATABASE IF EXISTS mysqltest;
+
+CREATE DATABASE IF NOT EXISTS mysqltest;
+USE mysqltest;
+CREATE TABLE IF NOT EXISTS t(c1 int);
+CREATE TABLE IF NOT EXISTS t1 LIKE t;
+CREATE TABLE IF NOT EXISTS t2 SELECT * FROM t;
+CREATE EVENT IF NOT EXISTS e
+ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR
+DO SELECT now();
+sync_slave_with_master;
+
+connection slave;
+#DROP database from slave.
+#The database and all tables can be recreated in slave
+#if binlog of the second CREATE command is recorded and sent from master to slave.
+DROP DATABASE mysqltest;
+
+connection master;
+CREATE DATABASE IF NOT EXISTS mysqltest;
+USE mysqltest;
+CREATE TABLE IF NOT EXISTS t(c1 int);
+CREATE TABLE IF NOT EXISTS t1 LIKE t;
+CREATE TABLE IF NOT EXISTS t2 SELECT * FROM t;
+CREATE EVENT IF NOT EXISTS e
+ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR
+DO SELECT now();
+sync_slave_with_master;
+
+connection slave;
+SHOW TABLES in mysqltest;
+#Execution time changes in each run. So we disregard it by calling replace_column.
+replace_column 6 #;
+SHOW EVENTS in mysqltest;
+
+
+connection master;
+DROP DATABASE IF EXISTS mysqltest;
+source include/master-slave-end.inc;
=== added file 'mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test'
--- a/mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test 2009-08-13 02:48:57 +0000
@@ -0,0 +1,41 @@
+# BUG#45574:
+# SP: CREATE DATABASE|TABLE IF NOT EXISTS not binlogged if routine exists.
+#
+# There is an inconsistency with DROP DATABASE|TABLE|EVENT IF EXISTS and
+# CREATE DATABASE|TABLE|EVENT IF NOT EXISTS. DROP IF EXISTS statements are
+# binlogged even if either the DB, TABLE or EVENT does not exist. In
+# contrast, Only the CREATE EVENT IF NOT EXISTS is binlogged when the EVENT
+# exists.
+#
+# This problem caused some of the tests to fail randomly on PB or PB2.
+#
+# Test is implemented as follows:
+#
+# i) test each "CREATE TEMPORARY TABLE IF EXISTS" (DDL), found in MySQL
+# 5.1 manual, on existent objects;
+# ii) show binlog events;
+#
+# Note:
+# rpl_create_if_not_exists.test tests other cases.
+#
+# References:
+# http://dev.mysql.com/doc/refman/5.1/en/sql-syntax-data-definition.html
+#
+
+source include/master-slave.inc;
+#CREATE TEMPORARY TABLE statements are not binlogged in row mode,
+#So it must be test by itself.
+source include/have_binlog_format_mixed_or_statement.inc;
+disable_warnings;
+
+DROP DATABASE IF EXISTS mysqltest;
+
+CREATE TEMPORARY TABLE IF NOT EXISTS tmp(c1 int);
+CREATE TEMPORARY TABLE IF NOT EXISTS tmp(c1 int);
+CREATE TEMPORARY TABLE IF NOT EXISTS tmp1 LIKE tmp;
+CREATE TEMPORARY TABLE IF NOT EXISTS tmp1 LIKE tmp;
+CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp;
+CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp;
+source include/show_binlog_events.inc;
+
+source include/master-slave-end.inc;
=== modified file 'mysql-test/suite/rpl/t/rpl_drop_temp.test'
--- a/mysql-test/suite/rpl/t/rpl_drop_temp.test 2008-02-29 21:05:23 +0000
+++ b/mysql-test/suite/rpl/t/rpl_drop_temp.test 2009-08-28 09:45:57 +0000
@@ -12,21 +12,23 @@ source include/have_binlog_format_mixed_
create database if not exists mysqltest;
--enable_warnings
+connect (con_temp,127.0.0.1,root,,test,$MASTER_MYPORT,);
+
+connection con_temp;
+use mysqltest;
create temporary table mysqltest.t1 (n int)ENGINE=MyISAM;
create temporary table mysqltest.t2 (n int)ENGINE=MyISAM;
-connection master;
-disconnect master;
-
-connection master1;
-# Wait until drop of temp tables appears in binlog
-let $wait_binlog_event= DROP;
-source include/wait_for_binlog_event.inc;
+disconnect con_temp;
+--source include/wait_until_disconnected.inc
+connection master;
sync_slave_with_master;
+
+connection slave;
show status like 'Slave_open_temp_tables';
# Cleanup
-connection default;
+connection master;
drop database mysqltest;
sync_slave_with_master;
=== modified file 'mysql-test/suite/rpl/t/rpl_events.test'
--- a/mysql-test/suite/rpl/t/rpl_events.test 2009-01-30 13:44:49 +0000
+++ b/mysql-test/suite/rpl/t/rpl_events.test 2009-08-31 02:26:01 +0000
@@ -46,12 +46,62 @@ connection master;
DROP EVENT event2;
-sync_slave_with_master;
+#
+# BUG#44331
+# This test verifies if the definer is consistent between master and slave,
+# when the event is created without the DEFINER clause set explicitly or the
+# DEFINER is set to CURRENT_USER
+#
+CREATE TABLE test.t1(details CHAR(30));
+
+CREATE EVENT /*!50000 event44331_1 */
+ ON SCHEDULE AT CURRENT_TIMESTAMP
+ ON COMPLETION PRESERVE DISABLE
+ DO INSERT INTO test.t1 VALUES('event event44331_1 fired - no definer');
+
+CREATE DEFINER=CURRENT_USER /*!50000 EVENT event44331_2 */
+ ON SCHEDULE AT CURRENT_TIMESTAMP
+ ON COMPLETION PRESERVE DISABLE
+ DO INSERT INTO test.t1 VALUES('event event44331_2 fired - DEFINER=CURRENT_USER');
+
+CREATE DEFINER=CURRENT_USER() EVENT event44331_3
+ ON SCHEDULE AT CURRENT_TIMESTAMP
+ ON COMPLETION PRESERVE DISABLE
+ DO INSERT INTO test.t1 VALUES('event event44331_3 fired - DEFINER=CURRENT_USER() function');
-# Doing cleanup of the table referred to in the event to guarantee
-# that there is no bad timing cauing it to try to access the table.
+CREATE /*!50000 DEFINER='user44331' */ EVENT event44331_4
+ ON SCHEDULE AT CURRENT_TIMESTAMP
+ ON COMPLETION PRESERVE DISABLE
+ DO INSERT INTO test.t1 VALUES('event event44331_4 fired - DEFINER=user1');
+
+--echo #on master
+select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events
+ where EVENT_NAME='event44331_1';
+select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events
+ where EVENT_NAME='event44331_2';
+select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events
+ where EVENT_NAME='event44331_3';
+select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events
+ where EVENT_NAME='event44331_4';
+
+sync_slave_with_master;
+connection slave;
+--echo #on slave
+select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events
+ where EVENT_NAME='event44331_1';
+select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events
+ where EVENT_NAME='event44331_2';
+select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events
+ where EVENT_NAME='event44331_3';
+select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events
+ where EVENT_NAME='event44331_4';
connection master;
SET @@global.event_scheduler= @old_event_scheduler;
DROP TABLE t28953;
+DROP TABLE t1;
+DROP EVENT event44331_1;
+DROP EVENT event44331_2;
+DROP EVENT event44331_3;
+DROP EVENT event44331_4;
sync_slave_with_master;
=== modified file 'mysql-test/suite/rpl/t/rpl_loaddata_charset.test'
--- a/mysql-test/suite/rpl/t/rpl_loaddata_charset.test 2007-12-12 17:19:24 +0000
+++ b/mysql-test/suite/rpl/t/rpl_loaddata_charset.test 2009-08-12 05:31:56 +0000
@@ -31,3 +31,20 @@ select hex(a) from t1;
connection master;
drop table t1;
sync_slave_with_master;
+
+#
+# Bug#45516
+# When slave SQL thread executing LOAD DATA command, the
+# thd->variables.collation_database was not set properly to the default
+# database charset
+#
+
+echo -------------test bug#45516------------------;
+
+# LOAD DATA INFILE
+let $LOAD_LOCAL=1;
+source include/rpl_loaddata_charset.inc;
+
+# LOAD DATA LOCAL INFILE
+let $LOAD_LOCAL=0;
+source include/rpl_loaddata_charset.inc;
=== modified file 'mysql-test/suite/rpl/t/rpl_rewrt_db-slave.opt'
--- a/mysql-test/suite/rpl/t/rpl_rewrt_db-slave.opt 2007-06-27 12:28:02 +0000
+++ b/mysql-test/suite/rpl/t/rpl_rewrt_db-slave.opt 2009-08-28 09:45:57 +0000
@@ -1 +1 @@
-"--replicate-rewrite-db=test->rewrite" "--replicate-rewrite-db=mysqltest1->test"
+"--replicate-rewrite-db=test->rewrite" "--replicate-rewrite-db=mysqltest1->test" "--replicate-rewrite-db=database_master_temp_01->database_slave_temp_01" "--replicate-rewrite-db=database_master_temp_02->database_slave_temp_02" "--replicate-rewrite-db=database_master_temp_03->database_slave_temp_03"
=== modified file 'mysql-test/suite/rpl/t/rpl_rewrt_db.test'
--- a/mysql-test/suite/rpl/t/rpl_rewrt_db.test 2007-12-12 17:19:24 +0000
+++ b/mysql-test/suite/rpl/t/rpl_rewrt_db.test 2009-08-28 09:45:57 +0000
@@ -76,9 +76,164 @@ connection slave;
# The empty line last comes from the end line field in the file
select * from rewrite.t1;
+set sql_log_bin= 0;
drop database rewrite;
+set sql_log_bin= 1;
connection master;
+set sql_log_bin= 0;
drop table t1;
+set sql_log_bin= 1;
# End of 4.1 tests
+
+--echo
+--echo ****
+--echo **** Bug #46861 Auto-closing of temporary tables broken by replicate-rewrite-db
+--echo ****
+--echo
+
+--echo ****
+--echo **** Preparing the environment
+--echo ****
+connection master;
+
+connect (con_temp_03,127.0.0.1,root,,test,$MASTER_MYPORT,);
+connect (con_temp_02,127.0.0.1,root,,test,$MASTER_MYPORT,);
+connect (con_temp_01,127.0.0.1,root,,test,$MASTER_MYPORT,);
+
+connection master;
+SET sql_log_bin= 0;
+CREATE DATABASE database_master_temp_01;
+CREATE DATABASE database_master_temp_02;
+CREATE DATABASE database_master_temp_03;
+SET sql_log_bin= 1;
+
+connection slave;
+SET sql_log_bin= 0;
+CREATE DATABASE database_slave_temp_01;
+CREATE DATABASE database_slave_temp_02;
+CREATE DATABASE database_slave_temp_03;
+SET sql_log_bin= 1;
+
+--echo
+--echo ****
+--echo **** Creating temporary tables on different databases with different connections
+--echo ****
+--echo **** con_temp_01 --> creates
+--echo **** t_01_01_temp on database_master_temp_01
+--echo ****
+--echo **** con_temp_02 --> creates
+--echo **** t_01_01_temp on database_master_temp_01
+--echo **** t_02_01_temp, t_02_02_temp on database_master_temp_02
+--echo ****
+--echo **** con_temp_02 --> creates
+--echo **** t_01_01_temp on database_master_temp_01
+--echo **** t_02_01_temp, t_02_02_temp on database_master_temp_02
+--echo **** t_03_01_temp, t_03_02_temp, t_03_03_temp on database_master_temp_03
+--echo ****
+
+--echo
+--echo con_temp_01
+--echo
+connection con_temp_01;
+USE database_master_temp_01;
+CREATE TEMPORARY TABLE t_01_01_temp(a int);
+INSERT INTO t_01_01_temp VALUES(1);
+
+--echo
+--echo con_temp_02
+--echo
+connection con_temp_02;
+USE database_master_temp_01;
+CREATE TEMPORARY TABLE t_01_01_temp(a int);
+INSERT INTO t_01_01_temp VALUES(1);
+USE database_master_temp_02;
+CREATE TEMPORARY TABLE t_02_01_temp(a int);
+INSERT INTO t_02_01_temp VALUES(1);
+CREATE TEMPORARY TABLE t_02_02_temp(a int);
+INSERT INTO t_02_02_temp VALUES(1);
+
+--echo
+--echo con_temp_03
+--echo
+connection con_temp_03;
+USE database_master_temp_01;
+CREATE TEMPORARY TABLE t_01_01_temp(a int);
+INSERT INTO t_01_01_temp VALUES(1);
+USE database_master_temp_02;
+CREATE TEMPORARY TABLE t_02_01_temp(a int);
+INSERT INTO t_02_01_temp VALUES(1);
+CREATE TEMPORARY TABLE t_02_02_temp(a int);
+INSERT INTO t_02_02_temp VALUES(1);
+USE database_master_temp_03;
+CREATE TEMPORARY TABLE t_03_01_temp(a int);
+INSERT INTO t_03_01_temp VALUES(1);
+CREATE TEMPORARY TABLE t_03_02_temp(a int);
+INSERT INTO t_03_02_temp VALUES(1);
+CREATE TEMPORARY TABLE t_03_03_temp(a int);
+INSERT INTO t_03_03_temp VALUES(1);
+
+--echo
+--echo **** Dropping the connections
+--echo **** We want to SHOW BINLOG EVENTS, to know what was logged. But there is no
+--echo **** guarantee that logging of the terminated con1 has been done yet.a To be
+--echo **** sure that logging has been done, we use a user lock.
+--echo
+connection master;
+sync_slave_with_master;
+connection slave;
+show status like 'Slave_open_temp_tables';
+
+connection master;
+let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
+connection con_temp_01;
+select get_lock("con_01",10);
+connection master;
+disconnect con_temp_01;
+select get_lock("con_01",10);
+
+connection con_temp_02;
+select get_lock("con_02",10);
+connection master;
+disconnect con_temp_02;
+select get_lock("con_02",10);
+
+connection con_temp_03;
+select get_lock("con_03",10);
+connection master;
+disconnect con_temp_03;
+select get_lock("con_03",10);
+
+--echo
+--echo **** Checking the binary log and temporary tables
+--echo
+connection master;
+sync_slave_with_master;
+connection slave;
+show status like 'Slave_open_temp_tables';
+
+connection master;
+--source include/show_binlog_events.inc
+
+--echo ****
+--echo **** Cleaning up the test case
+--echo ****
+connection master;
+SET sql_log_bin= 0;
+DROP DATABASE database_master_temp_01;
+DROP DATABASE database_master_temp_02;
+DROP DATABASE database_master_temp_03;
+SET sql_log_bin= 1;
+
+connection slave;
+SET sql_log_bin= 0;
+DROP DATABASE database_slave_temp_01;
+DROP DATABASE database_slave_temp_02;
+DROP DATABASE database_slave_temp_03;
+SET sql_log_bin= 1;
+
+connection master;
+sync_slave_with_master;
+
+# end of 5.0 tests
=== added file 'mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test'
--- a/mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test 2009-08-26 23:13:03 +0000
@@ -0,0 +1,5 @@
+--source include/have_binlog_format_statement.inc
+--source include/master-slave.inc
+--source include/have_innodb.inc
+
+--source extra/rpl_tests/rpl_mixing_engines.test
=== modified file 'mysql-test/t/analyse.test'
--- a/mysql-test/t/analyse.test 2006-09-28 18:32:30 +0000
+++ b/mysql-test/t/analyse.test 2009-08-27 10:22:19 +0000
@@ -14,6 +14,7 @@ create table t2 select * from t1 procedu
select * from t2;
drop table t1,t2;
+--error ER_WRONG_USAGE
EXPLAIN SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE();
#
@@ -102,4 +103,13 @@ select f2 from t1 procedure analyse(1, 1
select f3 from t1 procedure analyse(1, 1);
drop table t1;
+#
+# Bug#46184 Crash, SELECT ... FROM derived table procedure analyze
+#
+CREATE TABLE t1(a INT,b INT,c INT,d INT,e INT,f INT,g INT,h INT,i INT,j INT,k INT);
+INSERT INTO t1 VALUES ();
+--error ER_WRONG_USAGE
+SELECT * FROM (SELECT * FROM t1) d PROCEDURE ANALYSE();
+DROP TABLE t1;
+
--echo End of 4.1 tests
=== modified file 'mysql-test/t/auto_increment.test'
--- a/mysql-test/t/auto_increment.test 2009-02-05 09:49:32 +0000
+++ b/mysql-test/t/auto_increment.test 2009-08-20 12:30:59 +0000
@@ -324,3 +324,21 @@ insert into t1 values(null,0,0,0,null);
replace into t1 values(null,1,0,2,null);
select last_insert_id();
drop table t1;
+
+--echo #
+--echo # Bug#46616: Assertion `!table->auto_increment_field_not_null' on view
+--echo # manipulations
+--echo #
+CREATE TABLE t1 ( a INT );
+INSERT INTO t1 VALUES (1), (1);
+
+CREATE TABLE t2 ( a INT AUTO_INCREMENT KEY );
+--error ER_DUP_ENTRY
+CREATE TABLE IF NOT EXISTS t2 AS SELECT a FROM t1;
+
+UPDATE t2 SET a = 2;
+
+SELECT a FROM t2;
+
+DROP TABLE t1, t2;
+
=== modified file 'mysql-test/t/group_min_max.test'
--- a/mysql-test/t/group_min_max.test 2009-07-13 17:36:54 +0000
+++ b/mysql-test/t/group_min_max.test 2009-08-30 07:03:37 +0000
@@ -1018,3 +1018,18 @@ DROP TABLE t;
--echo End of 5.0 tests
+
+--echo #
+--echo # Bug #46607: Assertion failed: (cond_type == Item::FUNC_ITEM) results in
+--echo # server crash
+--echo #
+
+CREATE TABLE t (a INT, b INT, INDEX (a,b));
+INSERT INTO t VALUES (2,0), (2,0), (2,1), (2,1);
+INSERT INTO t SELECT * FROM t;
+
+SELECT a, MAX(b) FROM t WHERE b GROUP BY a;
+
+DROP TABLE t;
+
+--echo End of 5.1 tests
=== modified file 'mysql-test/t/handler_myisam.test'
--- a/mysql-test/t/handler_myisam.test 2006-08-16 17:29:49 +0000
+++ b/mysql-test/t/handler_myisam.test 2009-08-21 05:55:35 +0000
@@ -19,3 +19,22 @@ let $other_engine_type= MEMORY;
let $other_handler_engine_type= MyISAM;
--source include/handler.inc
+
+--echo #
+--echo # BUG #46456: HANDLER OPEN + TRUNCATE + DROP (temporary) TABLE, crash
+--echo #
+CREATE TABLE t1 AS SELECT 1 AS f1;
+HANDLER t1 OPEN;
+TRUNCATE t1;
+--error ER_UNKNOWN_TABLE
+HANDLER t1 READ FIRST;
+DROP TABLE t1;
+
+CREATE TEMPORARY TABLE t1 AS SELECT 1 AS f1;
+HANDLER t1 OPEN;
+TRUNCATE t1;
+--error ER_UNKNOWN_TABLE
+HANDLER t1 READ FIRST;
+DROP TABLE t1;
+
+--echo End of 5.1 tests
=== modified file 'mysql-test/t/lock_multi_bug38499.test'
--- a/mysql-test/t/lock_multi_bug38499.test 2009-07-06 10:30:25 +0000
+++ b/mysql-test/t/lock_multi_bug38499.test 2009-08-28 21:49:16 +0000
@@ -5,6 +5,9 @@
# Save the initial number of concurrent sessions
--source include/count_sessions.inc
+SET @odl_sync_frm = @@global.sync_frm;
+SET @@global.sync_frm = OFF;
+
connect (locker,localhost,root,,);
connect (writer,localhost,root,,);
@@ -214,6 +217,8 @@ DROP TABLE t1;
--disconnect locker
--disconnect writer
+SET @@global.sync_frm = @odl_sync_frm;
+
# End of 5.0 tests
# Wait till all disconnects are completed
=== modified file 'mysql-test/t/lock_multi_bug38691.test'
--- a/mysql-test/t/lock_multi_bug38691.test 2009-03-23 14:22:31 +0000
+++ b/mysql-test/t/lock_multi_bug38691.test 2009-08-28 21:49:16 +0000
@@ -8,6 +8,9 @@
# Save the initial number of concurrent sessions
--source include/count_sessions.inc
+SET @odl_sync_frm = @@global.sync_frm;
+SET @@global.sync_frm = OFF;
+
# Test to see if select will get the lock ahead of low priority update
connect (locker,localhost,root,,);
@@ -136,6 +139,8 @@ DROP TABLE t1, t2, t3;
--disconnect locker
--disconnect writer
+SET @@global.sync_frm = @odl_sync_frm;
+
# Wait till all disconnects are completed
--source include/wait_until_count_sessions.inc
=== modified file 'mysql-test/t/merge.test'
--- a/mysql-test/t/merge.test 2009-09-07 20:50:10 +0000
+++ b/mysql-test/t/merge.test 2009-10-15 21:38:29 +0000
@@ -1628,6 +1628,17 @@ DROP TABLE m1,t1,t2,t3,t4,t5,t6,t7;
--error ER_NO_SUCH_TABLE
SELECT 1 FROM m1; # Should not hang!
+--echo #
+--echo # Bug #46614: Assertion in show_create_trigger()
+--echo #
+CREATE TABLE t1(a int);
+CREATE TABLE t2(a int);
+CREATE TABLE t3(a int) ENGINE = MERGE UNION(t1, t2);
+CREATE TRIGGER tr1 AFTER INSERT ON t3 FOR EACH ROW CALL foo();
+SHOW CREATE TRIGGER tr1;
+DROP TRIGGER tr1;
+DROP TABLE t1, t2, t3;
+
--echo End of 5.1 tests
--disable_result_log
=== modified file 'mysql-test/t/not_partition.test'
--- a/mysql-test/t/not_partition.test 2006-10-26 17:11:09 +0000
+++ b/mysql-test/t/not_partition.test 2009-01-08 14:16:44 +0000
@@ -1,12 +1,35 @@
--disable_abort_on_error
-# Run this tets only when mysqld don't has partitioning
+# Run this test only when mysqld don't has partitioning (not compiled with)
# the statements are not expected to work, just check that we
# can't crash the server
-- require r/not_partition.require
disable_query_log;
show variables like "have_partitioning";
enable_query_log;
-
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+let $MYSQLD_DATADIR= `SELECT @@datadir`;
+
+#
+# Bug#39893: Crash if select on a partitioned table,
+# when partitioning is disabled
+FLUSH TABLES;
+--copy_file $MYSQLTEST_VARDIR/std_data_ln/parts/t1.frm $MYSQLD_DATADIR/test/t1.frm
+SELECT * FROM t1;
+TRUNCATE TABLE t1;
+ANALYZE TABLE t1;
+CHECK TABLE t1;
+OPTIMIZE TABLE t1;
+REPAIR TABLE t1;
+ALTER TABLE t1 REPAIR PARTITION ALL;
+ALTER TABLE t1 CHECK PARTITION ALL;
+ALTER TABLE t1 OPTIMIZE PARTITION ALL;
+ALTER TABLE t1 ANALYZE PARTITION ALL;
+ALTER TABLE t1 REBUILD PARTITION ALL;
+ALTER TABLE t1 ENGINE Memory;
+ALTER TABLE t1 ADD (new INT);
+DROP TABLE t1;
--error ER_FEATURE_DISABLED
CREATE TABLE t1 (
=== modified file 'mysql-test/t/partition.test'
--- a/mysql-test/t/partition.test 2009-09-07 20:50:10 +0000
+++ b/mysql-test/t/partition.test 2009-10-15 21:38:29 +0000
@@ -15,6 +15,53 @@ drop table if exists t1, t2;
--enable_warnings
#
+# Bug#46639: 1030 (HY000): Got error 124 from storage engine on
+# INSERT ... SELECT ...
+CREATE TABLE t1 (
+ a int NOT NULL,
+ b int NOT NULL);
+
+CREATE TABLE t2 (
+ a int NOT NULL,
+ b int NOT NULL,
+ INDEX(b)
+)
+PARTITION BY HASH(a) PARTITIONS 2;
+
+INSERT INTO t1 VALUES (399, 22);
+INSERT INTO t2 VALUES (1, 22), (1, 42);
+
+INSERT INTO t2 SELECT 1, 399 FROM t2, t1
+WHERE t1.b = t2.b;
+
+DROP TABLE t1, t2;
+
+#
+# Bug#46478: timestamp field incorrectly defaulted when partition is reorganized
+#
+CREATE TABLE t1 (
+ a timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ b varchar(10),
+ PRIMARY KEY (a)
+)
+PARTITION BY RANGE (to_days(a)) (
+ PARTITION p1 VALUES LESS THAN (733407),
+ PARTITION pmax VALUES LESS THAN MAXVALUE
+);
+
+INSERT INTO t1 VALUES ('2007-07-30 17:35:48', 'p1');
+INSERT INTO t1 VALUES ('2009-07-14 17:35:55', 'pmax');
+INSERT INTO t1 VALUES ('2009-09-21 17:31:42', 'pmax');
+
+SELECT * FROM t1;
+ALTER TABLE t1 REORGANIZE PARTITION pmax INTO (
+ PARTITION p3 VALUES LESS THAN (733969),
+ PARTITION pmax VALUES LESS THAN MAXVALUE);
+SELECT * FROM t1;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+#
# Bug#36001: Partitions: spelling and using some error messages
#
--error ER_FOREIGN_KEY_ON_PARTITIONED
=== added file 'mysql-test/t/partition_disabled-master.opt'
--- a/mysql-test/t/partition_disabled-master.opt 1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/partition_disabled-master.opt 2009-01-08 14:16:44 +0000
@@ -0,0 +1 @@
+--loose-skip-partition
=== added file 'mysql-test/t/partition_disabled.test'
--- a/mysql-test/t/partition_disabled.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/partition_disabled.test 2009-08-12 10:03:05 +0000
@@ -0,0 +1,85 @@
+--disable_abort_on_error
+# Run this test only when mysqld has partitioning, but it is disabled.
+# The statements are not expected to work, just check that we
+# can't crash the server.
+--require r/disabled_partition.require
+--disable_query_log
+show variables like "have_partitioning";
+--enable_query_log
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+let $MYSQLD_DATADIR= `SELECT @@datadir`;
+
+#
+# Bug#39893: Crash if select on a partitioned table,
+# when partitioning is disabled
+FLUSH TABLES;
+--copy_file $MYSQLTEST_VARDIR/std_data/parts/t1.frm $MYSQLD_DATADIR/test/t1.frm
+SELECT * FROM t1;
+TRUNCATE TABLE t1;
+ANALYZE TABLE t1;
+CHECK TABLE t1;
+OPTIMIZE TABLE t1;
+REPAIR TABLE t1;
+ALTER TABLE t1 REPAIR PARTITION ALL;
+ALTER TABLE t1 CHECK PARTITION ALL;
+ALTER TABLE t1 OPTIMIZE PARTITION ALL;
+ALTER TABLE t1 ANALYZE PARTITION ALL;
+ALTER TABLE t1 REBUILD PARTITION ALL;
+ALTER TABLE t1 ENGINE Memory;
+ALTER TABLE t1 ADD (new INT);
+DROP TABLE t1;
+
+--error ER_OPTION_PREVENTS_STATEMENT
+CREATE TABLE t1 (
+ firstname VARCHAR(25) NOT NULL,
+ lastname VARCHAR(25) NOT NULL,
+ username VARCHAR(16) NOT NULL,
+ email VARCHAR(35),
+ joined DATE NOT NULL
+)
+PARTITION BY KEY(joined)
+PARTITIONS 6;
+
+--error ER_OPTION_PREVENTS_STATEMENT
+ALTER TABLE t1 PARTITION BY KEY(joined) PARTITIONS 2;
+
+--error ER_BAD_TABLE_ERROR
+drop table t1;
+
+--error ER_OPTION_PREVENTS_STATEMENT
+CREATE TABLE t1 (
+ firstname VARCHAR(25) NOT NULL,
+ lastname VARCHAR(25) NOT NULL,
+ username VARCHAR(16) NOT NULL,
+ email VARCHAR(35),
+ joined DATE NOT NULL
+)
+PARTITION BY RANGE( YEAR(joined) ) (
+ PARTITION p0 VALUES LESS THAN (1960),
+ PARTITION p1 VALUES LESS THAN (1970),
+ PARTITION p2 VALUES LESS THAN (1980),
+ PARTITION p3 VALUES LESS THAN (1990),
+ PARTITION p4 VALUES LESS THAN MAXVALUE
+);
+--error ER_BAD_TABLE_ERROR
+drop table t1;
+
+--error ER_OPTION_PREVENTS_STATEMENT
+CREATE TABLE t1 (id INT, purchased DATE)
+ PARTITION BY RANGE( YEAR(purchased) )
+ SUBPARTITION BY HASH( TO_DAYS(purchased) )
+ SUBPARTITIONS 2 (
+ PARTITION p0 VALUES LESS THAN (1990),
+ PARTITION p1 VALUES LESS THAN (2000),
+ PARTITION p2 VALUES LESS THAN MAXVALUE
+ );
+--error ER_BAD_TABLE_ERROR
+drop table t1;
+
+# Create a table without partitions to test "EXPLAIN PARTITIONS"
+create table t1 (a varchar(10) charset latin1 collate latin1_bin);
+insert into t1 values (''),(' '),('a'),('a '),('a ');
+explain partitions select * from t1 where a='a ' OR a='a';
+drop table t1;
=== modified file 'mysql-test/t/partition_pruning.test'
--- a/mysql-test/t/partition_pruning.test 2008-12-28 11:33:49 +0000
+++ b/mysql-test/t/partition_pruning.test 2009-08-28 10:55:59 +0000
@@ -9,6 +9,357 @@ drop table if exists t1,t2,t3,t4,t5,t6,t
--enable_warnings
#
+# Bug#20577: Partitions: use of to_days() function leads to selection failures
+#
+--let $explain_partitions= 1;
+--let $verify_without_partitions= 0;
+--echo # test of RANGE and index
+CREATE TABLE t1 (a DATE, KEY(a))
+PARTITION BY RANGE (TO_DAYS(a))
+(PARTITION `pNULL` VALUES LESS THAN (0),
+ PARTITION `p0001-01-01` VALUES LESS THAN (366 + 1),
+ PARTITION `p1001-01-01` VALUES LESS THAN (TO_DAYS('1001-01-01') + 1),
+ PARTITION `p2001-01-01` VALUES LESS THAN (TO_DAYS('2001-01-01') + 1));
+if ($verify_without_partitions)
+{
+ALTER TABLE t1 REMOVE PARTITIONING;
+}
+INSERT INTO t1 VALUES ('0000-00-00'), ('0000-01-02'), ('0001-01-01'),
+ ('1001-00-00'), ('1001-01-01'), ('1002-00-00'), ('2001-01-01');
+--source include/partition_date_range.inc
+--echo # test without index
+ALTER TABLE t1 DROP KEY a;
+--source include/partition_date_range.inc
+DROP TABLE t1;
+
+--echo # test of LIST and index
+CREATE TABLE t1 (a DATE, KEY(a))
+PARTITION BY LIST (TO_DAYS(a))
+(PARTITION `p0001-01-01` VALUES IN (TO_DAYS('0001-01-01')),
+ PARTITION `p2001-01-01` VALUES IN (TO_DAYS('2001-01-01')),
+ PARTITION `pNULL` VALUES IN (NULL),
+ PARTITION `p0000-01-02` VALUES IN (TO_DAYS('0000-01-02')),
+ PARTITION `p1001-01-01` VALUES IN (TO_DAYS('1001-01-01')));
+if ($verify_without_partitions)
+{
+ALTER TABLE t1 REMOVE PARTITIONING;
+}
+INSERT INTO t1 VALUES ('0000-00-00'), ('0000-01-02'), ('0001-01-01'),
+ ('1001-00-00'), ('1001-01-01'), ('1002-00-00'), ('2001-01-01');
+--source include/partition_date_range.inc
+--echo # test without index
+ALTER TABLE t1 DROP KEY a;
+--source include/partition_date_range.inc
+DROP TABLE t1;
+
+#
+# Bug#46362: Endpoint should be set to false for TO_DAYS(DATE)
+# There is a problem when comparing DATE with DATETIME.
+# In pruning it is converted into the field type
+# and in row evaluation it is converted to longlong
+# (like a DATETIME).
+--echo # Test with DATETIME column NOT NULL
+CREATE TABLE t1 (
+ a int(10) unsigned NOT NULL,
+ b DATETIME NOT NULL,
+ PRIMARY KEY (a, b)
+) PARTITION BY RANGE (TO_DAYS(b))
+(PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')),
+ PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')),
+ PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')),
+ PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')),
+ PARTITION p20090405 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, '2009-01-01'), (1, '2009-04-01'), (2, '2009-04-01'),
+ (1, '2009-04-02'), (2, '2009-04-02'), (1, '2009-04-02 23:59:59'),
+ (1, '2009-04-03'), (2, '2009-04-03'), (1, '2009-04-04'), (2, '2009-04-04'),
+ (1, '2009-04-05'), (1, '2009-04-06'), (1, '2009-04-07');
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b > CAST('2009-04-02 23:59:59' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03';
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b > CAST('2009-04-02 23:59:58' AS DATETIME);
+DROP TABLE t1;
+
+--echo # Test with DATE column NOT NULL
+CREATE TABLE t1 (
+ a int(10) unsigned NOT NULL,
+ b DATE NOT NULL,
+ PRIMARY KEY (a, b)
+) PARTITION BY RANGE (TO_DAYS(b))
+(PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')),
+ PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')),
+ PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')),
+ PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')),
+ PARTITION p20090405 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, '2009-01-01'), (1, '2009-04-01'), (2, '2009-04-01'),
+ (1, '2009-04-02'), (2, '2009-04-02'), (1, '2009-04-03'), (2, '2009-04-03'),
+ (1, '2009-04-04'), (2, '2009-04-04'), (1, '2009-04-05'), (1, '2009-04-06'),
+ (1, '2009-04-07');
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b > CAST('2009-04-02 23:59:59' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03';
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b > CAST('2009-04-02 23:59:58' AS DATETIME);
+DROP TABLE t1;
+
+--echo # Test with DATETIME column NULL
+CREATE TABLE t1 (
+ a int(10) unsigned NOT NULL,
+ b DATETIME NULL
+) PARTITION BY RANGE (TO_DAYS(b))
+(PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')),
+ PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')),
+ PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')),
+ PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')),
+ PARTITION p20090405 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, '2009-01-01'), (1, '2009-04-01'), (2, '2009-04-01'),
+ (1, '2009-04-02'), (2, '2009-04-02'), (1, '2009-04-02 23:59:59'),
+ (1, '2009-04-03'), (2, '2009-04-03'), (1, '2009-04-04'), (2, '2009-04-04'),
+ (1, '2009-04-05'), (1, '2009-04-06'), (1, '2009-04-07');
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b > CAST('2009-04-02 23:59:59' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03';
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b > CAST('2009-04-02 23:59:58' AS DATETIME);
+DROP TABLE t1;
+
+--echo # Test with DATE column NULL
+CREATE TABLE t1 (
+ a int(10) unsigned NOT NULL,
+ b DATE NULL
+) PARTITION BY RANGE (TO_DAYS(b))
+(PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')),
+ PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')),
+ PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')),
+ PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')),
+ PARTITION p20090405 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, '2009-01-01'), (1, '2009-04-01'), (2, '2009-04-01'),
+ (1, '2009-04-02'), (2, '2009-04-02'), (1, '2009-04-03'), (2, '2009-04-03'),
+ (1, '2009-04-04'), (2, '2009-04-04'), (1, '2009-04-05'), (1, '2009-04-06'),
+ (1, '2009-04-07');
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b > CAST('2009-04-02 23:59:59' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE);
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03';
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03';
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME);
+EXPLAIN PARTITIONS SELECT * FROM t1
+ WHERE b > CAST('2009-04-02 23:59:58' AS DATETIME);
+DROP TABLE t1;
+
+--echo # For better code coverage of the patch
+CREATE TABLE t1 (
+ a int(10) unsigned NOT NULL,
+ b DATE
+) PARTITION BY RANGE ( TO_DAYS(b) )
+(PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')),
+ PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')),
+ PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')),
+ PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')),
+ PARTITION p20090405 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, '2009-01-01'), (2, NULL);
+--echo # test with an invalid date, which lead to item->null_value is set.
+EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-99' AS DATETIME);
+DROP TABLE t1;
+
+#
# Bug#40972: some sql execution lead the whole database crashing
#
# Setup so the start is at partition pX and end is at p1
=== modified file 'mysql-test/t/subselect.test'
--- a/mysql-test/t/subselect.test 2009-09-07 20:50:10 +0000
+++ b/mysql-test/t/subselect.test 2009-10-15 21:38:29 +0000
@@ -30,7 +30,7 @@ SELECT 1 IN (SELECT 1);
SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
-- error ER_WRONG_USAGE
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1));
--- error ER_WRONG_PARAMETERS_TO_PROCEDURE
+-- error ER_WRONG_USAGE
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
-- error ER_BAD_FIELD_ERROR
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
@@ -3336,6 +3336,38 @@ EXPLAIN EXTENDED SELECT * FROM C WHERE `
DROP TABLE C;
--echo # End of test for bug#45061.
+
+--echo #
+--echo # Bug #46749: Segfault in add_key_fields() with outer subquery level
+--echo # field references
+--echo #
+
+CREATE TABLE t1 (
+ a int,
+ b int,
+ UNIQUE (a), KEY (b)
+);
+INSERT INTO t1 VALUES (1,1), (2,1);
+
+CREATE TABLE st1 like t1;
+INSERT INTO st1 VALUES (1,1), (2,1);
+
+CREATE TABLE st2 like t1;
+INSERT INTO st2 VALUES (1,1), (2,1);
+
+# should have "impossible where"
+EXPLAIN
+SELECT MAX(b), (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b)
+FROM t1
+WHERE a = 230;
+
+# should not crash
+SELECT MAX(b), (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b)
+FROM t1
+WHERE a = 230;
+
+DROP TABLE t1, st1, st2;
+
--echo End of 5.0 tests.
#
=== modified file 'mysql-test/t/type_newdecimal.test'
--- a/mysql-test/t/type_newdecimal.test 2009-07-03 10:36:04 +0000
+++ b/mysql-test/t/type_newdecimal.test 2009-08-24 19:47:08 +0000
@@ -1286,3 +1286,137 @@ CREATE TABLE t1 SELECT 1 % .123456789123
DESCRIBE t1;
SELECT my_col FROM t1;
DROP TABLE t1;
+
+--echo #
+--echo # Bug#45261: Crash, stored procedure + decimal
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1 SELECT
+ /* 81 */ 100000000000000000000000000000000000000000000000000000000000000000000000000000001
+ AS c1;
+DESC t1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 SELECT
+ /* 81 */ 100000000000000000000000000000000000000000000000000000000000000000000000000000001.
+ AS c1;
+DESC t1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 SELECT
+ /* 81 */ 100000000000000000000000000000000000000000000000000000000000000000000000000000001.1 /* 1 */
+ AS c1;
+DESC t1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 SELECT
+ /* 82 */ 1000000000000000000000000000000000000000000000000000000000000000000000000000000001
+ AS c1;
+DESC t1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 SELECT
+ /* 40 */ 1000000000000000000000000000000000000001.1000000000000000000000000000000000000001 /* 40 */
+ AS c1;
+DESC t1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 SELECT
+ /* 1 */ 1.10000000000000000000000000000000000000000000000000000000000000000000000000000001 /* 80 */
+ AS c1;
+DESC t1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 SELECT
+ /* 1 */ 1.100000000000000000000000000000000000000000000000000000000000000000000000000000001 /* 81 */
+ AS c1;
+DESC t1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 SELECT
+ .100000000000000000000000000000000000000000000000000000000000000000000000000000001 /* 81 */
+ AS c1;
+DESC t1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 SELECT
+ /* 45 */ 123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345 /* 45 */
+ AS c1;
+DESC t1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 SELECT
+ /* 65 */ 12345678901234567890123456789012345678901234567890123456789012345.1 /* 1 */
+ AS c1;
+DESC t1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 SELECT
+ /* 66 */ 123456789012345678901234567890123456789012345678901234567890123456.1 /* 1 */
+ AS c1;
+DESC t1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 SELECT
+ .123456789012345678901234567890123456789012345678901234567890123456 /* 66 */
+ AS c1;
+DESC t1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 AS SELECT 123.1234567890123456789012345678901 /* 31 */ AS c1;
+DESC t1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 SELECT 1.1 + CAST(1 AS DECIMAL(65,30)) AS c1;
+DESC t1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # Test that the integer and decimal parts are properly calculated.
+--echo #
+
+CREATE TABLE t1 (a DECIMAL(30,30));
+INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
+CREATE TABLE t2 SELECT MIN(a + 0.0000000000000000000000000000001) AS c1 FROM t1;
+DESC t2;
+DROP TABLE t1,t2;
+
+CREATE TABLE t1 (a DECIMAL(30,30));
+INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
+CREATE TABLE t2 SELECT IFNULL(a + 0.0000000000000000000000000000001, NULL) AS c1 FROM t1;
+DESC t2;
+DROP TABLE t1,t2;
+
+CREATE TABLE t1 (a DECIMAL(30,30));
+INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
+CREATE TABLE t2 SELECT CASE a WHEN 0.1 THEN 0.0000000000000000000000000000000000000000000000000000000000000000001 END AS c1 FROM t1;
+DESC t2;
+DROP TABLE t1,t2;
+
+--echo #
+--echo # Test that variables get maximum precision.
+--echo #
+
+SET @decimal= 1.1;
+CREATE TABLE t1 SELECT @decimal AS c1;
+DESC t1;
+SELECT * FROM t1;
+DROP TABLE t1;
=== modified file 'mysql-test/t/view.test'
--- a/mysql-test/t/view.test 2009-09-07 20:50:10 +0000
+++ b/mysql-test/t/view.test 2009-10-15 21:38:29 +0000
@@ -3703,38 +3703,6 @@ DROP TABLE t1;
--echo # -- End of test case for Bug#40825
--echo
---echo #
---echo # Bug #45806 crash when replacing into a view with a join!
---echo #
-CREATE TABLE t1(a INT UNIQUE);
-CREATE VIEW v1 AS SELECT t1.a FROM t1, t1 AS a;
-INSERT INTO t1 VALUES (1), (2);
-
-REPLACE INTO v1(a) SELECT 1 FROM t1,t1 AS c;
-SELECT * FROM v1;
-REPLACE INTO v1(a) SELECT 3 FROM t1,t1 AS c;
-SELECT * FROM v1;
-DELETE FROM t1 WHERE a=3;
-INSERT INTO v1(a) SELECT 1 FROM t1,t1 AS c
-ON DUPLICATE KEY UPDATE `v1`.`a`= 1;
-SELECT * FROM v1;
-
-CREATE VIEW v2 AS SELECT t1.a FROM t1, v1 AS a;
-
-REPLACE INTO v2(a) SELECT 1 FROM t1,t1 AS c;
-SELECT * FROM v2;
-REPLACE INTO v2(a) SELECT 3 FROM t1,t1 AS c;
-SELECT * FROM v2;
-INSERT INTO v2(a) SELECT 1 FROM t1,t1 AS c
-ON DUPLICATE KEY UPDATE `v2`.`a`= 1;
-SELECT * FROM v2;
-
-DROP VIEW v1;
-DROP VIEW v2;
-DROP TABLE t1;
-
---echo # -- End of test case for Bug#45806
-
--echo # -----------------------------------------------------------------
--echo # -- End of 5.0 tests.
--echo # -----------------------------------------------------------------
=== modified file 'mysys/array.c'
--- a/mysys/array.c 2009-09-07 20:50:10 +0000
+++ b/mysys/array.c 2009-10-15 21:38:29 +0000
@@ -61,7 +61,7 @@ my_bool init_dynamic_array2(DYNAMIC_ARRA
Since the dynamic array is usable even if allocation fails here malloc
should not throw an error
*/
- if (!(array->buffer= (char*) my_malloc_ci(element_size*init_alloc, MYF(0))))
+ if (!(array->buffer= (uchar*) my_malloc_ci(element_size*init_alloc, MYF(0))))
array->max_element=0;
DBUG_RETURN(FALSE);
}
=== modified file 'mysys/mf_iocache.c'
--- a/mysys/mf_iocache.c 2008-04-28 16:24:05 +0000
+++ b/mysys/mf_iocache.c 2009-10-15 21:38:29 +0000
@@ -227,15 +227,21 @@ int init_io_cache(IO_CACHE *info, File f
for (;;)
{
size_t buffer_block;
+ /*
+ Unset MY_WAIT_IF_FULL bit if it is set, to prevent conflict with
+ MY_ZEROFILL.
+ */
+ myf flags= (myf) (cache_myflags & ~(MY_WME | MY_WAIT_IF_FULL));
+
if (cachesize < min_cache)
cachesize = min_cache;
buffer_block= cachesize;
if (type == SEQ_READ_APPEND)
buffer_block *= 2;
- if ((info->buffer=
- (uchar*) my_malloc(buffer_block,
- MYF((cache_myflags & ~ MY_WME) |
- (cachesize == min_cache ? MY_WME : 0)))) != 0)
+ if (cachesize == min_cache)
+ flags|= (myf) MY_WME;
+
+ if ((info->buffer= (uchar*) my_malloc(buffer_block, flags)) != 0)
{
info->write_buffer=info->buffer;
if (type == SEQ_READ_APPEND)
=== modified file 'mysys/mf_pack.c'
--- a/mysys/mf_pack.c 2008-08-18 17:11:55 +0000
+++ b/mysys/mf_pack.c 2009-08-28 16:21:54 +0000
@@ -33,12 +33,11 @@ static char * NEAR_F expand_tilde(char *
void pack_dirname(char * to, const char *from)
{
int cwd_err;
- size_t d_length,length,buff_length;
+ size_t d_length,length,UNINIT_VAR(buff_length);
char * start;
char buff[FN_REFLEN];
DBUG_ENTER("pack_dirname");
- LINT_INIT(buff_length);
(void) intern_filename(to,from); /* Change to intern name */
#ifdef FN_DEVCHAR
=== modified file 'mysys/my_copy.c'
--- a/mysys/my_copy.c 2009-02-13 16:41:47 +0000
+++ b/mysys/my_copy.c 2009-08-28 16:21:54 +0000
@@ -56,6 +56,7 @@ int my_copy(const char *from, const char
File from_file,to_file;
uchar buff[IO_SIZE];
MY_STAT stat_buff,new_stat_buff;
+ int res;
DBUG_ENTER("my_copy");
DBUG_PRINT("my",("from %s to %s MyFlags %d", from, to, MyFlags));
@@ -94,9 +95,9 @@ int my_copy(const char *from, const char
if (MyFlags & MY_HOLD_ORIGINAL_MODES && !new_file_stat)
DBUG_RETURN(0); /* File copyed but not stat */
- VOID(chmod(to, stat_buff.st_mode & 07777)); /* Copy modes */
+ res= chmod(to, stat_buff.st_mode & 07777); /* Copy modes */
#if !defined(__WIN__) && !defined(__NETWARE__)
- VOID(chown(to, stat_buff.st_uid,stat_buff.st_gid)); /* Copy ownership */
+ res= chown(to, stat_buff.st_uid,stat_buff.st_gid); /* Copy ownership */
#endif
#if !defined(VMS) && !defined(__ZTC__)
if (MyFlags & MY_COPYTIME)
=== modified file 'mysys/my_getopt.c'
--- a/mysys/my_getopt.c 2009-09-15 12:53:07 +0000
+++ b/mysys/my_getopt.c 2009-10-15 21:38:29 +0000
@@ -115,7 +115,7 @@ int handle_options(int *argc, char ***ar
uint opt_found, argvpos= 0, length;
my_bool end_of_options= 0, must_be_var, set_maximum_value,
option_is_loose;
- char **pos, **pos_end, *optend, *prev_found,
+ char **pos, **pos_end, *optend, *UNINIT_VAR(prev_found),
*opt_str, key_name[FN_REFLEN];
const struct my_option *optp;
uchar* *value;
=== modified file 'mysys/my_redel.c'
--- a/mysys/my_redel.c 2007-03-29 17:01:51 +0000
+++ b/mysys/my_redel.c 2009-09-02 15:45:33 +0000
@@ -76,6 +76,9 @@ end:
int my_copystat(const char *from, const char *to, int MyFlags)
{
struct stat statbuf;
+#if !defined(__WIN__) && !defined(__NETWARE__)
+ int res;
+#endif
if (stat((char*) from, &statbuf))
{
@@ -94,7 +97,7 @@ int my_copystat(const char *from, const
if (MyFlags & MY_LINK_WARNING)
my_error(EE_LINK_WARNING,MYF(ME_BELL+ME_WAITTANG),from,statbuf.st_nlink);
}
- VOID(chown(to, statbuf.st_uid, statbuf.st_gid)); /* Copy ownership */
+ res= chown(to, statbuf.st_uid, statbuf.st_gid); /* Copy ownership */
#endif /* !__WIN__ && !__NETWARE__ */
#ifndef VMS
=== modified file 'mysys/typelib.c'
--- a/mysys/typelib.c 2009-03-12 22:27:35 +0000
+++ b/mysys/typelib.c 2009-10-15 21:38:29 +0000
@@ -78,7 +78,8 @@ uint find_type_or_exit(const char *x, TY
int find_type(char *x, const TYPELIB *typelib, uint full_name)
{
- int find,pos,findpos;
+ int find,pos;
+ int UNINIT_VAR(findpos); /* guarded by find */
reg1 char * i;
reg2 const char *j;
DBUG_ENTER("find_type");
@@ -89,7 +90,6 @@ int find_type(char *x, const TYPELIB *ty
DBUG_PRINT("exit",("no count"));
DBUG_RETURN(0);
}
- LINT_INIT(findpos);
find=0;
for (pos=0 ; (j=typelib->type_names[pos]) ; pos++)
{
=== modified file 'regex/regcomp.c'
--- a/regex/regcomp.c 2007-08-13 13:11:25 +0000
+++ b/regex/regcomp.c 2009-08-28 16:21:54 +0000
@@ -213,11 +213,11 @@ register struct parse *p;
int stop; /* character this ERE should end at */
{
register char c;
- register sopno prevback;
- register sopno prevfwd;
+ register sopno UNINIT_VAR(prevback);
+ register sopno UNINIT_VAR(prevfwd);
register sopno conc;
register int first = 1; /* is this the first alternative? */
- LINT_INIT(prevback); LINT_INIT(prevfwd);
+
for (;;) {
/* do a bunch of concatenated expressions */
conc = HERE();
=== modified file 'scripts/make_win_bin_dist'
--- a/scripts/make_win_bin_dist 2009-09-01 06:40:13 +0000
+++ b/scripts/make_win_bin_dist 2009-09-04 15:45:07 +0000
@@ -280,6 +280,7 @@ cp include/mysql/plugin.h $DESTDIR/inclu
mkdir -p $DESTDIR/lib/opt
mkdir -p $DESTDIR/lib/plugin
+cp sql/$TARGET/mysqld.lib $DESTDIR/lib/
cp libmysql/$TARGET/libmysql.dll \
libmysql/$TARGET/libmysql.lib \
libmysql/$TARGET/mysqlclient.lib \
=== modified file 'server-tools/instance-manager/mysql_connection.cc'
--- a/server-tools/instance-manager/mysql_connection.cc 2009-04-25 10:05:32 +0000
+++ b/server-tools/instance-manager/mysql_connection.cc 2009-10-15 21:38:29 +0000
@@ -69,6 +69,18 @@ void my_net_local_init(NET *net)
C_MODE_END
+/*
+ Unused stub hook required for linking the client API.
+*/
+
+C_MODE_START
+
+void slave_io_thread_detach_vio()
+{
+}
+
+C_MODE_END
+
/*
Every resource, which we can fail to acquire, is allocated in init().
=== modified file 'sql-common/client.c'
--- a/sql-common/client.c 2009-09-07 20:50:10 +0000
+++ b/sql-common/client.c 2009-10-15 21:38:29 +0000
@@ -482,6 +482,15 @@ HANDLE create_shared_memory(MYSQL *mysql
int i;
/*
+ If this is NULL, somebody freed the MYSQL* options. mysql_close()
+ is a good candidate. We don't just silently (re)set it to
+ def_shared_memory_base_name as that would create really confusing/buggy
+ behavior if the user passed in a different name on the command-line or
+ in a my.cnf.
+ */
+ DBUG_ASSERT(shared_memory_base_name != NULL);
+
+ /*
get enough space base-name + '_' + longest suffix we might ever send
*/
if (!(tmp= (char *)my_malloc(strlen(shared_memory_base_name) + 32L, MYF(MY_FAE))))
@@ -933,6 +942,9 @@ void end_server(MYSQL *mysql)
{
init_sigpipe_variables
DBUG_PRINT("info",("Net: %s", vio_description(mysql->net.vio)));
+#ifdef MYSQL_SERVER
+ slave_io_thread_detach_vio();
+#endif
set_sigpipe(mysql);
vio_delete(mysql->net.vio);
reset_sigpipe(mysql);
@@ -1851,7 +1863,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,cons
uint port, const char *unix_socket,ulong client_flag)
{
char buff[NAME_LEN+USERNAME_LENGTH+100];
- char *end,*host_info;
+ char *end,*host_info= NULL;
my_socket sock;
in_addr_t ip_addr;
struct sockaddr_in sock_addr;
@@ -1869,7 +1881,6 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,cons
#endif
init_sigpipe_variables
DBUG_ENTER("mysql_real_connect");
- LINT_INIT(host_info);
DBUG_PRINT("enter",("host: %s db: %s user: %s",
host ? host : "(Null)",
=== modified file 'sql-common/my_time.c'
--- a/sql-common/my_time.c 2009-06-11 16:21:32 +0000
+++ b/sql-common/my_time.c 2009-09-01 11:04:56 +0000
@@ -160,7 +160,7 @@ enum enum_mysql_timestamp_type
str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
uint flags, int *was_cut)
{
- uint field_length, year_length, digits, i, number_of_fields;
+ uint field_length, UNINIT_VAR(year_length), digits, i, number_of_fields;
uint date[MAX_DATE_PARTS], date_len[MAX_DATE_PARTS];
uint add_hours= 0, start_loop;
ulong not_zero_date, allow_space;
@@ -174,7 +174,6 @@ str_to_datetime(const char *str, uint le
DBUG_PRINT("ENTER",("str: %.*s",length,str));
LINT_INIT(field_length);
- LINT_INIT(year_length);
LINT_INIT(last_field_pos);
*was_cut= 0;
@@ -450,9 +449,7 @@ str_to_datetime(const char *str, uint le
}
}
- DBUG_RETURN(l_time->time_type=
- (number_of_fields <= 3 ? MYSQL_TIMESTAMP_DATE :
- MYSQL_TIMESTAMP_DATETIME));
+ DBUG_RETURN(l_time->time_type);
err:
bzero((char*) l_time, sizeof(*l_time));
@@ -778,11 +775,12 @@ long calc_daynr(uint year,uint month,uin
if (y == 0 && month == 0 && day == 0)
DBUG_RETURN(0); /* Skip errors */
- delsum= (long) (365L * y+ 31*(month-1) +day);
+ /* Cast to int to be able to handle month == 0 */
+ delsum= (long) (365 * y + 31 *((int) month - 1) + (int) day);
if (month <= 2)
y--;
else
- delsum-= (long) (month*4+23)/10;
+ delsum-= (long) ((int) month * 4 + 23) / 10;
temp=(int) ((y/100+1)*3)/4;
DBUG_PRINT("exit",("year: %d month: %d day: %d -> daynr: %ld",
y+(month <= 2),month,day,delsum+y/4-temp));
=== modified file 'sql/client_settings.h'
--- a/sql/client_settings.h 2006-12-31 00:02:27 +0000
+++ b/sql/client_settings.h 2009-08-13 20:07:20 +0000
@@ -33,3 +33,11 @@
#define mysql_server_init(a,b,c) 0
+#ifdef HAVE_REPLICATION
+C_MODE_START
+void slave_io_thread_detach_vio();
+C_MODE_END
+#else
+#define slave_io_thread_detach_vio()
+#endif
+
=== modified file 'sql/events.cc'
--- a/sql/events.cc 2009-09-15 10:46:35 +0000
+++ b/sql/events.cc 2009-10-15 21:38:29 +0000
@@ -341,6 +341,33 @@ common_1_lev_code:
/**
+ Create a new query string for removing executable comments
+ for avoiding leak and keeping consistency of the execution
+ on master and slave.
+
+ @param[in] thd Thread handler
+ @param[in] buf Query string
+
+ @return
+ 0 ok
+ 1 error
+*/
+static int
+create_query_string(THD *thd, String *buf)
+{
+ /* Append the "CREATE" part of the query */
+ if (buf->append(STRING_WITH_LEN("CREATE ")))
+ return 1;
+ /* Append definer */
+ append_definer(thd, buf, &(thd->lex->definer->user), &(thd->lex->definer->host));
+ /* Append the left part of thd->query after "DEFINER" part */
+ if (buf->append(thd->lex->stmt_definition_begin))
+ return 1;
+
+ return 0;
+}
+
+/**
Create a new event.
@param[in,out] thd THD
@@ -438,7 +465,16 @@ Events::create_event(THD *thd, Event_par
{
/* Binlog the create event. */
DBUG_ASSERT(thd->query && thd->query_length);
- write_bin_log(thd, TRUE, thd->query, thd->query_length);
+ String log_query;
+ if (create_query_string(thd, &log_query))
+ {
+ sql_print_error("Event Error: An error occurred while creating query string, "
+ "before writing it into binary log.");
+ DBUG_RETURN(TRUE);
+ }
+ /* If the definer is not set or set to CURRENT_USER, the value of CURRENT_USER
+ will be written into the binary log as the definer for the SQL thread. */
+ write_bin_log(thd, TRUE, log_query.c_ptr(), log_query.length());
}
}
pthread_mutex_unlock(&LOCK_event_metadata);
=== modified file 'sql/field.cc'
--- a/sql/field.cc 2009-09-07 20:50:10 +0000
+++ b/sql/field.cc 2009-10-15 21:38:29 +0000
@@ -1923,16 +1923,16 @@ int Field_decimal::store(const char *fro
Pointers used when digits move from the left of the '.' to the
right of the '.' (explained below)
*/
- const uchar *int_digits_tail_from;
+ const uchar *UNINIT_VAR(int_digits_tail_from);
/* Number of 0 that need to be added at the left of the '.' (1E3: 3 zeros) */
- uint int_digits_added_zeros;
+ uint UNINIT_VAR(int_digits_added_zeros);
/*
Pointer used when digits move from the right of the '.' to the left
of the '.'
*/
- const uchar *frac_digits_head_end;
+ const uchar *UNINIT_VAR(frac_digits_head_end);
/* Number of 0 that need to be added at the right of the '.' (for 1E-3) */
- uint frac_digits_added_zeros;
+ uint UNINIT_VAR(frac_digits_added_zeros);
uchar *pos,*tmp_left_pos,*tmp_right_pos;
/* Pointers that are used as limits (begin and end of the field buffer) */
uchar *left_wall,*right_wall;
@@ -1943,11 +1943,6 @@ int Field_decimal::store(const char *fro
*/
bool is_cuted_fields_incr=0;
- LINT_INIT(int_digits_tail_from);
- LINT_INIT(int_digits_added_zeros);
- LINT_INIT(frac_digits_head_end);
- LINT_INIT(frac_digits_added_zeros);
-
/*
There are three steps in this function :
- parse the input string
@@ -2486,12 +2481,97 @@ Field_new_decimal::Field_new_decimal(uin
{
precision= my_decimal_length_to_precision(len_arg, dec_arg, unsigned_arg);
set_if_smaller(precision, DECIMAL_MAX_PRECISION);
+ DBUG_ASSERT(precision >= dec);
DBUG_ASSERT((precision <= DECIMAL_MAX_PRECISION) &&
(dec <= DECIMAL_MAX_SCALE));
bin_size= my_decimal_get_binary_size(precision, dec);
}
+/**
+ Create a field to hold a decimal value from an item.
+
+ @remark The MySQL DECIMAL data type has a characteristic that needs to be
+ taken into account when deducing the type from a Item_decimal.
+
+ But first, let's briefly recap what is the new MySQL DECIMAL type:
+
+ The declaration syntax for a decimal is DECIMAL(M,D), where:
+
+ * M is the maximum number of digits (the precision).
+ It has a range of 1 to 65.
+ * D is the number of digits to the right of the decimal separator (the scale).
+ It has a range of 0 to 30 and must be no larger than M.
+
+ D and M are used to determine the storage requirements for the integer
+ and fractional parts of each value. The integer part is to the left of
+ the decimal separator and to the right is the fractional part. Hence:
+
+ M is the number of digits for the integer and fractional part.
+ D is the number of digits for the fractional part.
+
+ Consequently, M - D is the number of digits for the integer part. For
+ example, a DECIMAL(20,10) column has ten digits on either side of
+ the decimal separator.
+
+ The characteristic that needs to be taken into account is that the
+ backing type for Item_decimal is a my_decimal that has a higher
+ precision (DECIMAL_MAX_POSSIBLE_PRECISION, see my_decimal.h) than
+ DECIMAL.
+
+ Drawing a comparison between my_decimal and DECIMAL:
+
+ * M has a range of 1 to 81.
+ * D has a range of 0 to 81.
+
+ There can be a difference in range if the decimal contains a integer
+ part. This is because the fractional part must always be on a group
+ boundary, leaving at least one group for the integer part. Since each
+ group is 9 (DIG_PER_DEC1) digits and there are 9 (DECIMAL_BUFF_LENGTH)
+ groups, the fractional part is limited to 72 digits if there is at
+ least one digit in the integral part.
+
+ Although the backing type for a DECIMAL is also my_decimal, every
+ time a my_decimal is stored in a DECIMAL field, the precision and
+ scale are explicitly capped at 65 (DECIMAL_MAX_PRECISION) and 30
+ (DECIMAL_MAX_SCALE) digits, following my_decimal truncation procedure
+ (FIX_INTG_FRAC_ERROR).
+*/
+
+Field_new_decimal *
+Field_new_decimal::new_decimal_field(const Item *item)
+{
+ uint32 len;
+ uint intg= item->decimal_int_part(), scale= item->decimals;
+
+ DBUG_ASSERT(item->decimal_precision() >= item->decimals);
+
+ /*
+ Employ a procedure along the lines of the my_decimal truncation process:
+ - If the integer part is equal to or bigger than the maximum precision:
+ Truncate integer part to fit and the fractional becomes zero.
+ - Otherwise:
+ Truncate fractional part to fit.
+ */
+ if (intg >= DECIMAL_MAX_PRECISION)
+ {
+ intg= DECIMAL_MAX_PRECISION;
+ scale= 0;
+ }
+ else
+ {
+ uint room= min(DECIMAL_MAX_PRECISION - intg, DECIMAL_MAX_SCALE);
+ if (scale > room)
+ scale= room;
+ }
+
+ len= my_decimal_precision_to_length(intg + scale, scale, item->unsigned_flag);
+
+ return new Field_new_decimal(len, item->maybe_null, item->name, scale,
+ item->unsigned_flag);
+}
+
+
int Field_new_decimal::reset(void)
{
store_value(&decimal_zero);
@@ -9923,10 +10003,8 @@ Field *make_field(TABLE_SHARE *share, uc
TYPELIB *interval,
const char *field_name)
{
- uchar *bit_ptr;
- uchar bit_offset;
- LINT_INIT(bit_ptr);
- LINT_INIT(bit_offset);
+ uchar *UNINIT_VAR(bit_ptr);
+ uchar UNINIT_VAR(bit_offset);
if (field_type == MYSQL_TYPE_BIT && !f_bit_as_char(pack_flag))
{
bit_ptr= null_pos;
=== modified file 'sql/field.h'
--- a/sql/field.h 2009-09-07 20:50:10 +0000
+++ b/sql/field.h 2009-10-15 21:38:29 +0000
@@ -608,6 +608,10 @@ protected:
class Field_num :public Field {
public:
+ /**
+ The scale of the Field's value, i.e. the number of digits to the right
+ of the decimal point.
+ */
const uint8 dec;
bool zerofill,unsigned_flag; // Purify cannot handle bit fields
Field_num(uchar *ptr_arg,uint32 len_arg, uchar *null_ptr_arg,
@@ -766,6 +770,11 @@ public:
Field_new_decimal(uint32 len_arg, bool maybe_null_arg,
const char *field_name_arg, uint8 dec_arg,
bool unsigned_arg);
+ /*
+ Create a field to hold a decimal value from an item.
+ Truncates the precision and/or scale if necessary.
+ */
+ static Field_new_decimal *new_decimal_field(const Item *item);
enum_field_types type() const { return MYSQL_TYPE_NEWDECIMAL;}
enum ha_base_keytype key_type() const { return HA_KEYTYPE_BINARY; }
Item_result result_type () const { return DECIMAL_RESULT; }
=== modified file 'sql/ha_partition.cc'
--- a/sql/ha_partition.cc 2009-09-07 20:50:10 +0000
+++ b/sql/ha_partition.cc 2009-10-15 21:38:29 +0000
@@ -4415,17 +4415,6 @@ int ha_partition::handle_unordered_scan_
break;
case partition_index_first:
DBUG_PRINT("info", ("index_first on partition %d", i));
- /* MyISAM engine can fail if we call index_first() when indexes disabled */
- /* that happens if the table is empty. */
- /* Here we use file->stats.records instead of file->records() because */
- /* file->records() is supposed to return an EXACT count, and it can be */
- /* possibly slow. We don't need an exact number, an approximate one- from*/
- /* the last ::info() call - is sufficient. */
- if (file->stats.records == 0)
- {
- error= HA_ERR_END_OF_FILE;
- break;
- }
error= file->index_first(buf);
break;
case partition_index_first_unordered:
@@ -4513,32 +4502,10 @@ int ha_partition::handle_ordered_index_s
m_start_key.flag);
break;
case partition_index_first:
- /* MyISAM engine can fail if we call index_first() when indexes disabled */
- /* that happens if the table is empty. */
- /* Here we use file->stats.records instead of file->records() because */
- /* file->records() is supposed to return an EXACT count, and it can be */
- /* possibly slow. We don't need an exact number, an approximate one- from*/
- /* the last ::info() call - is sufficient. */
- if (file->stats.records == 0)
- {
- error= HA_ERR_END_OF_FILE;
- break;
- }
error= file->index_first(rec_buf_ptr);
reverse_order= FALSE;
break;
case partition_index_last:
- /* MyISAM engine can fail if we call index_last() when indexes disabled */
- /* that happens if the table is empty. */
- /* Here we use file->stats.records instead of file->records() because */
- /* file->records() is supposed to return an EXACT count, and it can be */
- /* possibly slow. We don't need an exact number, an approximate one- from*/
- /* the last ::info() call - is sufficient. */
- if (file->stats.records == 0)
- {
- error= HA_ERR_END_OF_FILE;
- break;
- }
error= file->index_last(rec_buf_ptr);
reverse_order= TRUE;
break;
=== modified file 'sql/item.cc'
--- a/sql/item.cc 2009-09-15 10:46:35 +0000
+++ b/sql/item.cc 2009-10-15 21:38:29 +0000
@@ -433,17 +433,26 @@ Item::Item(THD *thd, Item *item):
}
+/**
+ Decimal precision of the item.
+
+ @remark The precision must not be capped as it can be used in conjunction
+ with Item::decimals to determine the size of the integer part when
+ constructing a decimal data type.
+
+ @see Item::decimal_int_part()
+ @see Item::decimals
+*/
+
uint Item::decimal_precision() const
{
+ uint precision= max_length;
Item_result restype= result_type();
if ((restype == DECIMAL_RESULT) || (restype == INT_RESULT))
- {
- uint prec=
- my_decimal_length_to_precision(max_length, decimals, unsigned_flag);
- return min(prec, DECIMAL_MAX_PRECISION);
- }
- return min(max_length, DECIMAL_MAX_PRECISION);
+ precision= my_decimal_length_to_precision(max_length, decimals, unsigned_flag);
+
+ return precision;
}
@@ -1664,7 +1673,7 @@ bool agg_item_collations_for_comparison(
bool agg_item_set_converter(DTCollation &coll, const char *fname,
Item **args, uint nargs, uint flags, int item_sep)
{
- Item **arg, *safe_args[2];
+ Item **arg, *safe_args[2]= {NULL, NULL};
/*
For better error reporting: save the first and the second argument.
@@ -1673,8 +1682,6 @@ bool agg_item_set_converter(DTCollation
doesn't display each argument's characteristics.
- if nargs is 1, then this error cannot happen.
*/
- LINT_INIT(safe_args[0]);
- LINT_INIT(safe_args[1]);
if (nargs >=2 && nargs <= 3)
{
safe_args[0]= args[0];
@@ -3305,8 +3312,7 @@ Item_copy *Item_copy::create (Item *item
new Item_copy_uint (item) : new Item_copy_int (item);
case DECIMAL_RESULT:
return new Item_copy_decimal (item);
- case IMPOSSIBLE_RESULT:
- case ROW_RESULT:
+ default:
DBUG_ASSERT (0);
}
/* should not happen */
@@ -4911,9 +4917,7 @@ Field *Item::tmp_table_field_from_field_
switch (field_type()) {
case MYSQL_TYPE_DECIMAL:
case MYSQL_TYPE_NEWDECIMAL:
- field= new Field_new_decimal((uchar*) 0, max_length, null_ptr, 0,
- Field::NONE, name, decimals, 0,
- unsigned_flag);
+ field= Field_new_decimal::new_decimal_field(this);
break;
case MYSQL_TYPE_TINY:
field= new Field_tiny((uchar*) 0, max_length, null_ptr, 0, Field::NONE,
@@ -5510,9 +5514,8 @@ bool Item_null::send(Protocol *protocol,
bool Item::send(Protocol *protocol, String *buffer)
{
- bool result;
+ bool UNINIT_VAR(result); // Will be set if null_value == 0
enum_field_types f_type;
- LINT_INIT(result); // Will be set if null_value == 0
switch ((f_type=field_type())) {
default:
@@ -6855,14 +6858,21 @@ void resolve_const_item(THD *thd, Item *
}
/**
- Return true if the value stored in the field is equal to the const
- item.
+ Compare the value stored in field, with the original item.
+
+ @param field field which the item is converted and stored in
+ @param item original item
- We need to use this on the range optimizer because in some cases
- we can't store the value in the field without some precision/character loss.
+ @return Return an integer greater than, equal to, or less than 0 if
+ the value stored in the field is greater than, equal to,
+ or less than the original item
+
+ @note We only use this on the range optimizer/partition pruning,
+ because in some cases we can't store the value in the field
+ without some precision/character loss.
*/
-bool field_is_equal_to_item(Field *field,Item *item)
+int stored_field_cmp_to_item(Field *field, Item *item)
{
Item_result res_type=item_cmp_type(field->result_type(),
@@ -6873,28 +6883,49 @@ bool field_is_equal_to_item(Field *field
char field_buff[MAX_FIELD_WIDTH];
String item_tmp(item_buff,sizeof(item_buff),&my_charset_bin),*item_result;
String field_tmp(field_buff,sizeof(field_buff),&my_charset_bin);
+ enum_field_types field_type;
item_result=item->val_str(&item_tmp);
if (item->null_value)
- return 1; // This must be true
+ return 0;
field->val_str(&field_tmp);
- return !stringcmp(&field_tmp,item_result);
+
+ /*
+ If comparing DATE with DATETIME, append the time-part to the DATE.
+ So that the strings are equally formatted.
+ A DATE converted to string is 10 characters, and a DATETIME converted
+ to string is 19 characters.
+ */
+ field_type= field->type();
+ if (field_type == MYSQL_TYPE_DATE &&
+ item_result->length() == 19)
+ field_tmp.append(" 00:00:00");
+ else if (field_type == MYSQL_TYPE_DATETIME &&
+ item_result->length() == 10)
+ item_result->append(" 00:00:00");
+
+ return stringcmp(&field_tmp,item_result);
}
if (res_type == INT_RESULT)
- return 1; // Both where of type int
+ return 0; // Both are of type int
if (res_type == DECIMAL_RESULT)
{
my_decimal item_buf, *item_val,
field_buf, *field_val;
item_val= item->val_decimal(&item_buf);
if (item->null_value)
- return 1; // This must be true
+ return 0;
field_val= field->val_decimal(&field_buf);
- return !my_decimal_cmp(item_val, field_val);
+ return my_decimal_cmp(item_val, field_val);
}
double result= item->val_real();
if (item->null_value)
+ return 0;
+ double field_result= field->val_real();
+ if (field_result < result)
+ return -1;
+ else if (field_result > result)
return 1;
- return result == field->val_real();
+ return 0;
}
Item_cache* Item_cache::get_cache(const Item *item)
=== modified file 'sql/item.h'
--- a/sql/item.h 2009-09-15 10:46:35 +0000
+++ b/sql/item.h 2009-10-15 21:38:29 +0000
@@ -397,13 +397,20 @@ public:
from INT_RESULT, may be NULL, or are unsigned.
It will be possible to address this issue once the related partitioning bugs
(BUG#16002, BUG#15447, BUG#13436) are fixed.
+
+ The NOT_NULL enums are used in TO_DAYS, since TO_DAYS('2001-00-00') returns
+ NULL which puts those rows into the NULL partition, but
+ '2000-12-31' < '2001-00-00' < '2001-01-01'. So special handling is needed
+ for this (see Bug#20577).
*/
typedef enum monotonicity_info
{
NON_MONOTONIC, /* none of the below holds */
MONOTONIC_INCREASING, /* F() is unary and (x < y) => (F(x) <= F(y)) */
- MONOTONIC_STRICT_INCREASING /* F() is unary and (x < y) => (F(x) < F(y)) */
+ MONOTONIC_INCREASING_NOT_NULL, /* But only for valid/real x and y */
+ MONOTONIC_STRICT_INCREASING,/* F() is unary and (x < y) => (F(x) < F(y)) */
+ MONOTONIC_STRICT_INCREASING_NOT_NULL /* But only for valid/real x and y */
} enum_monotonicity_info;
/*************************************************************************/
@@ -576,8 +583,8 @@ public:
left_endp FALSE <=> The interval is "x < const" or "x <= const"
TRUE <=> The interval is "x > const" or "x >= const"
- incl_endp IN TRUE <=> the comparison is '<' or '>'
- FALSE <=> the comparison is '<=' or '>='
+ incl_endp IN FALSE <=> the comparison is '<' or '>'
+ TRUE <=> the comparison is '<=' or '>='
OUT The same but for the "F(x) $CMP$ F(const)" comparison
DESCRIPTION
@@ -759,9 +766,10 @@ public:
virtual cond_result eq_cmp_result() const { return COND_OK; }
inline uint float_length(uint decimals_par) const
{ return decimals != NOT_FIXED_DEC ? (DBL_DIG+2+decimals_par) : DBL_DIG+8;}
+ /** Returns the uncapped decimal precision of this item. */
virtual uint decimal_precision() const;
inline int decimal_int_part() const
- { return my_decimal_int_part(decimal_precision(), decimals); }
+ { return decimal_precision() - decimals; }
/*
Returns true if this is constant (during query execution, i.e. its value
will not change until next fix_fields) and its value is known.
@@ -3152,4 +3160,4 @@ void mark_select_range_as_dependent(THD
extern Cached_item *new_Cached_item(THD *thd, Item *item);
extern Item_result item_cmp_type(Item_result a,Item_result b);
extern void resolve_const_item(THD *thd, Item **ref, Item *cmp_item);
-extern bool field_is_equal_to_item(Field *field,Item *item);
+extern int stored_field_cmp_to_item(Field *field, Item *item);
=== modified file 'sql/item_cmpfunc.cc'
--- a/sql/item_cmpfunc.cc 2009-09-15 10:46:35 +0000
+++ b/sql/item_cmpfunc.cc 2009-10-15 21:38:29 +0000
@@ -395,11 +395,10 @@ static bool convert_constant_item(THD *t
ulong orig_sql_mode= thd->variables.sql_mode;
enum_check_fields orig_count_cuted_fields= thd->count_cuted_fields;
my_bitmap_map *old_maps[2];
- ulonglong orig_field_val; /* original field value if valid */
+ ulonglong UNINIT_VAR(orig_field_val); /* original field value if valid */
LINT_INIT(old_maps[0]);
LINT_INIT(old_maps[1]);
- LINT_INIT(orig_field_val);
if (table)
dbug_tmp_use_all_columns(table, old_maps,
@@ -2182,7 +2181,7 @@ uint Item_func_ifnull::decimal_precision
int arg1_int_part= args[1]->decimal_int_part();
int max_int_part= max(arg0_int_part, arg1_int_part);
int precision= max_int_part + decimals;
- return min(precision, DECIMAL_MAX_PRECISION);
+ return precision;
}
@@ -2366,7 +2365,7 @@ uint Item_func_if::decimal_precision() c
int arg1_prec= args[1]->decimal_int_part();
int arg2_prec= args[2]->decimal_int_part();
int precision=max(arg1_prec,arg2_prec) + decimals;
- return min(precision, DECIMAL_MAX_PRECISION);
+ return precision;
}
@@ -2783,7 +2782,7 @@ uint Item_func_case::decimal_precision()
if (else_expr_num != -1)
set_if_bigger(max_int_part, args[else_expr_num]->decimal_int_part());
- return min(max_int_part + decimals, DECIMAL_MAX_PRECISION);
+ return max_int_part + decimals;
}
=== modified file 'sql/item_create.cc'
--- a/sql/item_create.cc 2009-04-25 10:05:32 +0000
+++ b/sql/item_create.cc 2009-10-15 21:38:29 +0000
@@ -5032,10 +5032,9 @@ create_func_cast(THD *thd, Item *a, Cast
const char *c_len, const char *c_dec,
CHARSET_INFO *cs)
{
- Item *res;
+ Item *UNINIT_VAR(res);
ulong len;
uint dec;
- LINT_INIT(res);
switch (cast_type) {
case ITEM_CAST_BINARY:
=== modified file 'sql/item_func.cc'
--- a/sql/item_func.cc 2009-09-07 20:50:10 +0000
+++ b/sql/item_func.cc 2009-10-15 21:38:29 +0000
@@ -451,45 +451,8 @@ Field *Item_func::tmp_table_field(TABLE
case STRING_RESULT:
return make_string_field(table);
case DECIMAL_RESULT:
- {
- uint8 dec= decimals;
- uint8 intg= decimal_precision() - dec;
- uint32 len= max_length;
-
- /*
- Trying to put too many digits overall in a DECIMAL(prec,dec)
- will always throw a warning. We must limit dec to
- DECIMAL_MAX_SCALE however to prevent an assert() later.
- */
-
- if (dec > 0)
- {
- int overflow;
-
- dec= min(dec, DECIMAL_MAX_SCALE);
-
- /*
- If the value still overflows the field with the corrected dec,
- we'll throw out decimals rather than integers. This is still
- bad and of course throws a truncation warning.
- */
-
- const int required_length=
- my_decimal_precision_to_length(intg + dec, dec,
- unsigned_flag);
-
- overflow= required_length - len;
-
- if (overflow > 0)
- dec= max(0, dec - overflow); // too long, discard fract
- else
- /* Corrected value fits. */
- len= required_length;
- }
-
- field= new Field_new_decimal(len, maybe_null, name, dec, unsigned_flag);
+ field= Field_new_decimal::new_decimal_field(this);
break;
- }
case ROW_RESULT:
default:
// This case should never be chosen
@@ -2304,9 +2267,8 @@ void Item_func_min_max::fix_length_and_d
uint Item_func_min_max::cmp_datetimes(ulonglong *value)
{
- longlong min_max;
+ longlong UNINIT_VAR(min_max);
uint min_max_idx= 0;
- LINT_INIT(min_max);
for (uint i=0; i < arg_count ; i++)
{
@@ -2371,8 +2333,7 @@ String *Item_func_min_max::val_str(Strin
}
case STRING_RESULT:
{
- String *res;
- LINT_INIT(res);
+ String *UNINIT_VAR(res);
for (uint i=0; i < arg_count ; i++)
{
if (i == 0)
@@ -2461,8 +2422,7 @@ longlong Item_func_min_max::val_int()
my_decimal *Item_func_min_max::val_decimal(my_decimal *dec)
{
DBUG_ASSERT(fixed == 1);
- my_decimal tmp_buf, *tmp, *res;
- LINT_INIT(res);
+ my_decimal tmp_buf, *tmp, *UNINIT_VAR(res);
if (compare_as_dates)
{
@@ -4784,6 +4744,19 @@ void Item_func_get_user_var::fix_length_
}
+uint Item_func_get_user_var::decimal_precision() const
+{
+ uint precision= max_length;
+ Item_result restype= result_type();
+
+ /* Default to maximum as the precision is unknown a priori. */
+ if ((restype == DECIMAL_RESULT) || (restype == INT_RESULT))
+ precision= DECIMAL_MAX_PRECISION;
+
+ return precision;
+}
+
+
bool Item_func_get_user_var::const_item() const
{
return (!var_entry || current_thd->query_id != var_entry->update_query_id);
@@ -5447,8 +5420,7 @@ void Item_func_match::init_search(bool n
bool Item_func_match::fix_fields(THD *thd, Item **ref)
{
DBUG_ASSERT(fixed == 0);
- Item *item;
- LINT_INIT(item); // Safe as arg_count is > 1
+ Item *UNINIT_VAR(item); // Safe as arg_count is > 1
maybe_null=1;
join_key=0;
=== modified file 'sql/item_func.h'
--- a/sql/item_func.h 2009-09-07 20:50:10 +0000
+++ b/sql/item_func.h 2009-10-15 21:38:29 +0000
@@ -1393,6 +1393,7 @@ public:
table_map used_tables() const
{ return const_item() ? 0 : RAND_TABLE_BIT; }
bool eq(const Item *item, bool binary_cmp) const;
+ uint decimal_precision() const;
private:
bool set_value(THD *thd, sp_rcontext *ctx, Item **it);
=== modified file 'sql/item_sum.cc'
--- a/sql/item_sum.cc 2009-09-15 10:46:35 +0000
+++ b/sql/item_sum.cc 2009-10-15 21:38:29 +0000
@@ -517,8 +517,7 @@ Field *Item_sum::create_tmp_field(bool g
name, table->s, collation.collation);
break;
case DECIMAL_RESULT:
- field= new Field_new_decimal(max_length, maybe_null, name,
- decimals, unsigned_flag);
+ field= Field_new_decimal::new_decimal_field(this);
break;
case ROW_RESULT:
default:
=== modified file 'sql/item_timefunc.cc'
--- a/sql/item_timefunc.cc 2009-09-07 20:50:10 +0000
+++ b/sql/item_timefunc.cc 2009-10-15 21:38:29 +0000
@@ -961,9 +961,9 @@ enum_monotonicity_info Item_func_to_days
if (args[0]->type() == Item::FIELD_ITEM)
{
if (args[0]->field_type() == MYSQL_TYPE_DATE)
- return MONOTONIC_STRICT_INCREASING;
+ return MONOTONIC_STRICT_INCREASING_NOT_NULL;
if (args[0]->field_type() == MYSQL_TYPE_DATETIME)
- return MONOTONIC_INCREASING;
+ return MONOTONIC_INCREASING_NOT_NULL;
}
return NON_MONOTONIC;
}
@@ -974,12 +974,27 @@ longlong Item_func_to_days::val_int_endp
DBUG_ASSERT(fixed == 1);
MYSQL_TIME ltime;
longlong res;
- if (get_arg0_date(<ime, TIME_NO_ZERO_DATE))
+ int dummy; /* unused */
+ if (get_arg0_date(<ime, TIME_FUZZY_DATE))
{
/* got NULL, leave the incl_endp intact */
return LONGLONG_MIN;
}
res=(longlong) calc_daynr(ltime.year,ltime.month,ltime.day);
+ /* Set to NULL if invalid date, but keep the value */
+ null_value= check_date(<ime,
+ (ltime.year || ltime.month || ltime.day),
+ (TIME_NO_ZERO_IN_DATE | TIME_NO_ZERO_DATE),
+ &dummy);
+ if (null_value)
+ {
+ /*
+ Even if the evaluation return NULL, the calc_daynr is useful for pruning
+ */
+ if (args[0]->field_type() != MYSQL_TYPE_DATE)
+ *incl_endp= TRUE;
+ return res;
+ }
if (args[0]->field_type() == MYSQL_TYPE_DATE)
{
@@ -992,15 +1007,19 @@ longlong Item_func_to_days::val_int_endp
point to day bound ("strictly less" comparison stays intact):
col < '2007-09-15 00:00:00' -> TO_DAYS(col) < TO_DAYS('2007-09-15')
+ col > '2007-09-15 23:59:59' -> TO_DAYS(col) > TO_DAYS('2007-09-15')
which is different from the general case ("strictly less" changes to
"less or equal"):
col < '2007-09-15 12:34:56' -> TO_DAYS(col) <= TO_DAYS('2007-09-15')
*/
- if (!left_endp && !(ltime.hour || ltime.minute || ltime.second ||
- ltime.second_part))
- ; /* do nothing */
+ if ((!left_endp && !(ltime.hour || ltime.minute || ltime.second ||
+ ltime.second_part)) ||
+ (left_endp && ltime.hour == 23 && ltime.minute == 59 &&
+ ltime.second == 59))
+ /* do nothing */
+ ;
else
*incl_endp= TRUE;
return res;
=== modified file 'sql/lock.cc'
--- a/sql/lock.cc 2009-09-07 20:50:10 +0000
+++ b/sql/lock.cc 2009-10-15 21:38:29 +0000
@@ -1472,11 +1472,10 @@ void unlock_global_read_lock(THD *thd)
bool wait_if_global_read_lock(THD *thd, bool abort_on_refresh,
bool is_not_commit)
{
- const char *old_message;
+ const char *UNINIT_VAR(old_message);
bool result= 0, need_exit_cond;
DBUG_ENTER("wait_if_global_read_lock");
- LINT_INIT(old_message);
/*
Assert that we do not own LOCK_open. If we would own it, other
threads could not close their tables. This would make a pretty
=== modified file 'sql/log.cc'
--- a/sql/log.cc 2009-09-15 10:46:35 +0000
+++ b/sql/log.cc 2009-10-15 21:38:29 +0000
@@ -1275,6 +1275,25 @@ int LOGGER::set_handlers(uint error_log_
return 0;
}
+/**
+ This function checks if a transactional talbe was updated by the
+ current statement.
+
+ @param thd The client thread that executed the current statement.
+ @return
+ @c true if a transactional table was updated, @false otherwise.
+*/
+static bool stmt_has_updated_trans_table(THD *thd)
+{
+ Ha_trx_info *ha_info;
+
+ for (ha_info= thd->transaction.stmt.ha_list; ha_info; ha_info= ha_info->next())
+ {
+ if (ha_info->is_trx_read_write() && ha_info->ht() != binlog_hton)
+ return (TRUE);
+ }
+ return (FALSE);
+}
/*
Save position of binary log transaction cache.
@@ -4104,7 +4123,8 @@ bool MYSQL_BIN_LOG::write(Log_event *eve
(binlog_trx_data*) thd_get_ha_data(thd, binlog_hton);
IO_CACHE *trans_log= &trx_data->trans_log;
my_off_t trans_log_pos= my_b_tell(trans_log);
- if (event_info->get_cache_stmt() || trans_log_pos != 0)
+ if (event_info->get_cache_stmt() || trans_log_pos != 0 ||
+ stmt_has_updated_trans_table(thd))
{
DBUG_PRINT("info", ("Using trans_log: cache: %d, trans_log_pos: %lu",
event_info->get_cache_stmt(),
@@ -4855,7 +4875,8 @@ bool flush_error_log()
my_rename(log_error_file,err_renamed,MYF(0));
if (freopen(log_error_file,"a+",stdout))
{
- freopen(log_error_file,"a+",stderr);
+ FILE *reopen;
+ reopen= freopen(log_error_file,"a+",stderr);
setbuf(stderr, NULL);
}
else
=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc 2009-09-07 20:50:10 +0000
+++ b/sql/log_event.cc 2009-10-15 21:38:29 +0000
@@ -2948,6 +2948,8 @@ int Query_log_event::do_apply_event(Rela
{
LEX_STRING new_db;
int expected_error,actual_error= 0;
+ HA_CREATE_INFO db_options;
+
/*
Colleagues: please never free(thd->catalog) in MySQL. This would
lead to bugs as here thd->catalog is a part of an alloced block,
@@ -2959,6 +2961,13 @@ int Query_log_event::do_apply_event(Rela
new_db.length= db_len;
new_db.str= (char *) rpl_filter->get_rewrite_db(db, &new_db.length);
thd->set_db(new_db.str, new_db.length); /* allocates a copy of 'db' */
+
+ /*
+ Setting the character set and collation of the current database thd->db.
+ */
+ load_db_opt_by_name(thd, thd->db, &db_options);
+ if (db_options.default_table_charset)
+ thd->db_charset= db_options.default_table_charset;
thd->variables.auto_increment_increment= auto_increment_increment;
thd->variables.auto_increment_offset= auto_increment_offset;
@@ -3159,7 +3168,7 @@ compare_errors:
/*
If we expected a non-zero error code, and we don't get the same error
- code, and none of them should be ignored.
+ code, and it should be ignored or is related to a concurrency issue.
*/
actual_error= thd->is_error() ? thd->main_da.sql_errno() : 0;
DBUG_PRINT("info",("expected_error: %d sql_errno: %d",
@@ -3182,7 +3191,8 @@ Default database: '%s'. Query: '%s'",
thd->is_slave_error= 1;
}
/*
- If we get the same error code as expected, or they should be ignored.
+ If we get the same error code as expected and it is not a concurrency
+ issue, or should be ignored.
*/
else if ((expected_error == actual_error &&
!concurrency_error_code(expected_error)) ||
@@ -3191,8 +3201,25 @@ Default database: '%s'. Query: '%s'",
DBUG_PRINT("info",("error ignored"));
clear_all_errors(thd, const_cast<Relay_log_info*>(rli));
thd->killed= THD::NOT_KILLED;
+ /*
+ When an error is expected and matches the actual error the
+ slave does not report any error and by consequence changes
+ on transactional tables are not rolled back in the function
+ close_thread_tables(). For that reason, we explicitly roll
+ them back here.
+ */
+ if (expected_error && expected_error == actual_error)
+ ha_autocommit_or_rollback(thd, TRUE);
}
/*
+ If we expected a non-zero error code and get nothing and, it is a concurrency
+ issue or should be ignored.
+ */
+ else if (expected_error && !actual_error &&
+ (concurrency_error_code(expected_error) ||
+ ignored_error_code(expected_error)))
+ ha_autocommit_or_rollback(thd, TRUE);
+ /*
Other cases: mostly we expected no error and get one.
*/
else if (thd->is_slave_error || thd->is_fatal_error)
=== modified file 'sql/my_decimal.h'
--- a/sql/my_decimal.h 2009-09-07 20:50:10 +0000
+++ b/sql/my_decimal.h 2009-10-15 21:38:29 +0000
@@ -48,10 +48,12 @@ C_MODE_END
digits * number of decimal digits in one our big digit - number of decimal
digits in one our big digit decreased by 1 (because we always put decimal
point on the border of our big digits))
+
+ This value is 65 due to historical reasons partly due to it being used
+ as the maximum allowed precision and not the actual maximum precision.
*/
#define DECIMAL_MAX_PRECISION (DECIMAL_MAX_POSSIBLE_PRECISION - 8*2)
#define DECIMAL_MAX_SCALE 30
-#define DECIMAL_NOT_SPECIFIED 31
/**
maximum length of string representation (number of maximum decimal
@@ -75,12 +77,6 @@ inline uint my_decimal_size(uint precisi
}
-inline int my_decimal_int_part(uint precision, uint decimals)
-{
- return precision - ((decimals == DECIMAL_NOT_SPECIFIED) ? 0 : decimals);
-}
-
-
/**
my_decimal class limits 'decimal_t' type to what we need in MySQL.
@@ -184,7 +180,7 @@ inline uint my_decimal_length_to_precisi
}
inline uint32 my_decimal_precision_to_length_no_truncation(uint precision,
- uint8 scale,
+ uint scale,
bool unsigned_flag)
{
/*
@@ -196,7 +192,7 @@ inline uint32 my_decimal_precision_to_le
(unsigned_flag || !precision ? 0 : 1));
}
-inline uint32 my_decimal_precision_to_length(uint precision, uint8 scale,
+inline uint32 my_decimal_precision_to_length(uint precision, uint scale,
bool unsigned_flag)
{
/*
=== modified file 'sql/mysql_priv.h'
--- a/sql/mysql_priv.h 2009-09-15 10:46:35 +0000
+++ b/sql/mysql_priv.h 2009-10-15 21:38:29 +0000
@@ -2304,7 +2304,8 @@ enum enum_explain_filename_mode
{
EXPLAIN_ALL_VERBOSE= 0,
EXPLAIN_PARTITIONS_VERBOSE,
- EXPLAIN_PARTITIONS_AS_COMMENT
+ EXPLAIN_PARTITIONS_AS_COMMENT,
+ EXPLAIN_PARTITIONS_AS_COMMENT_NO_QUOTING
};
uint explain_filename(const char *from, char *to, uint to_length,
enum_explain_filename_mode explain_mode);
=== modified file 'sql/opt_range.cc'
--- a/sql/opt_range.cc 2009-09-09 21:59:28 +0000
+++ b/sql/opt_range.cc 2009-10-15 21:38:29 +0000
@@ -2243,7 +2243,7 @@ int SQL_SELECT::test_quick_select(THD *t
KEY *key_info;
PARAM param;
- if (check_stack_overrun(thd, 2*STACK_MIN_SIZE, buff))
+ if (check_stack_overrun(thd, 2*STACK_MIN_SIZE + sizeof(PARAM), buff))
DBUG_RETURN(0); // Fatal error flag is set
/* set up parameter that is passed to all functions */
@@ -4839,11 +4839,10 @@ static TRP_RANGE *get_key_scans_params(P
{
int idx;
SEL_ARG **key,**end, **key_to_read= NULL;
- ha_rows best_records;
+ ha_rows UNINIT_VAR(best_records); /* protected by key_to_read */
TRP_RANGE* read_plan= NULL;
bool pk_is_clustered= param->table->file->primary_key_is_clustered();
DBUG_ENTER("get_key_scans_params");
- LINT_INIT(best_records); /* protected by key_to_read */
/*
Note that there may be trees that have type SEL_TREE::KEY but contain no
key reads at all, e.g. tree for expression "key1 is not null" where key1
@@ -5827,6 +5826,7 @@ get_mm_leaf(RANGE_OPT_PARAM *param, COND
{
tree= new (alloc) SEL_ARG(field, 0, 0);
tree->type= SEL_ARG::IMPOSSIBLE;
+ field->table->in_use->variables.sql_mode= orig_sql_mode;
goto end;
}
else
@@ -5856,11 +5856,14 @@ get_mm_leaf(RANGE_OPT_PARAM *param, COND
but we'll need to convert '>' to '>=' and '<' to '<='. This will
be done together with other types at the end of this function
- (grep for field_is_equal_to_item)
+ (grep for stored_field_cmp_to_item)
*/
}
else
+ {
+ field->table->in_use->variables.sql_mode= orig_sql_mode;
goto end;
+ }
}
}
@@ -5931,7 +5934,7 @@ get_mm_leaf(RANGE_OPT_PARAM *param, COND
switch (type) {
case Item_func::LT_FUNC:
- if (field_is_equal_to_item(field,value))
+ if (stored_field_cmp_to_item(field,value) == 0)
tree->max_flag=NEAR_MAX;
/* fall through */
case Item_func::LE_FUNC:
@@ -5945,11 +5948,16 @@ get_mm_leaf(RANGE_OPT_PARAM *param, COND
break;
case Item_func::GT_FUNC:
/* Don't use open ranges for partial key_segments */
- if (field_is_equal_to_item(field,value) &&
- !(key_part->flag & HA_PART_KEY_SEG))
+ if ((!(key_part->flag & HA_PART_KEY_SEG)) &&
+ (stored_field_cmp_to_item(field, value) <= 0))
tree->min_flag=NEAR_MIN;
- /* fall through */
+ tree->max_flag= NO_MAX_RANGE;
+ break;
case Item_func::GE_FUNC:
+ /* Don't use open ranges for partial key_segments */
+ if ((!(key_part->flag & HA_PART_KEY_SEG)) &&
+ (stored_field_cmp_to_item(field,value) < 0))
+ tree->min_flag= NEAR_MIN;
tree->max_flag=NO_MAX_RANGE;
break;
case Item_func::SP_EQUALS_FUNC:
@@ -6440,13 +6448,6 @@ key_and(RANGE_OPT_PARAM *param, SEL_ARG
return 0; // Can't optimize this
}
- if ((key1->min_flag | key2->min_flag) & GEOM_FLAG)
- {
- key1->free_tree();
- key2->free_tree();
- return 0; // Can't optimize this
- }
-
key1->use_count--;
key2->use_count--;
SEL_ARG *e1=key1->first(), *e2=key2->first(), *new_tree=0;
@@ -6797,9 +6798,7 @@ static bool eq_tree(SEL_ARG* a,SEL_ARG *
SEL_ARG *
SEL_ARG::insert(SEL_ARG *key)
{
- SEL_ARG *element,**par,*last_element;
- LINT_INIT(par);
- LINT_INIT(last_element);
+ SEL_ARG *element,**UNINIT_VAR(par),*UNINIT_VAR(last_element);
for (element= this; element != &null_element ; )
{
@@ -8066,7 +8065,10 @@ int QUICK_INDEX_MERGE_SELECT::read_keys_
if (cur_quick->file->inited != handler::NONE)
cur_quick->file->ha_index_end();
if (cur_quick->init() || cur_quick->reset())
+ {
+ delete unique;
DBUG_RETURN(1);
+ }
}
if (result)
@@ -8074,13 +8076,17 @@ int QUICK_INDEX_MERGE_SELECT::read_keys_
if (result != HA_ERR_END_OF_FILE)
{
cur_quick->range_end();
+ delete unique;
DBUG_RETURN(result);
}
break;
}
if (thd->killed)
+ {
+ delete unique;
DBUG_RETURN(1);
+ }
/* skip row if it will be retrieved by clustered PK scan */
if (pk_quick_select && pk_quick_select->row_in_ranges())
@@ -8089,8 +8095,10 @@ int QUICK_INDEX_MERGE_SELECT::read_keys_
cur_quick->file->position(cur_quick->record);
result= unique->unique_add((char*)cur_quick->file->ref);
if (result)
+ {
+ delete unique;
DBUG_RETURN(1);
-
+ }
}
/*
@@ -9395,7 +9403,9 @@ get_best_group_min_max(PARAM *param, SEL
goto next_index;
}
else
+ {
DBUG_ASSERT(FALSE);
+ }
/* Check (SA2). */
if (min_max_arg_item)
@@ -9629,7 +9639,17 @@ check_group_min_max_predicates(COND *con
*/
if (cond_type == Item::SUBSELECT_ITEM)
DBUG_RETURN(FALSE);
-
+
+ /*
+ Condition of the form 'field' is equivalent to 'field <> 0' and thus
+ satisfies the SA3 condition.
+ */
+ if (cond_type == Item::FIELD_ITEM)
+ {
+ DBUG_PRINT("info", ("Analyzing: %s", cond->full_name()));
+ DBUG_RETURN(TRUE);
+ }
+
/* We presume that at this point there are no other Items than functions. */
DBUG_ASSERT(cond_type == Item::FUNC_ITEM);
@@ -9787,11 +9807,22 @@ get_constant_key_infix(KEY *index_info,
return FALSE;
uint field_length= cur_part->store_length;
- if ((cur_range->maybe_null &&
- cur_range->min_value[0] && cur_range->max_value[0]) ||
- !memcmp(cur_range->min_value, cur_range->max_value, field_length))
- {
- /* cur_range specifies 'IS NULL' or an equality condition. */
+ if (cur_range->maybe_null &&
+ cur_range->min_value[0] && cur_range->max_value[0])
+ {
+ /*
+ cur_range specifies 'IS NULL'. In this case the argument points
+ to a "null value" (is_null_string) that may not always be long
+ enough for a direct memcpy to a field.
+ */
+ DBUG_ASSERT (field_length > 0);
+ *key_ptr= 1;
+ bzero(key_ptr+1,field_length-1);
+ key_ptr+= field_length;
+ *key_infix_len+= field_length;
+ }
+ else if (memcmp(cur_range->min_value, cur_range->max_value, field_length) == 0)
+ { /* cur_range specifies an equality condition. */
memcpy(key_ptr, cur_range->min_value, field_length);
key_ptr+= field_length;
*key_infix_len+= field_length;
=== modified file 'sql/partition_info.h'
--- a/sql/partition_info.h 2008-11-10 20:21:49 +0000
+++ b/sql/partition_info.h 2009-09-02 15:42:08 +0000
@@ -300,6 +300,7 @@ static inline void init_single_partition
{
part_iter->part_nums.start= part_iter->part_nums.cur= part_id;
part_iter->part_nums.end= part_id+1;
+ part_iter->ret_null_part= part_iter->ret_null_part_orig= FALSE;
part_iter->get_next= get_next_partition_id_range;
}
@@ -310,5 +311,6 @@ void init_all_partitions_iterator(partit
{
part_iter->part_nums.start= part_iter->part_nums.cur= 0;
part_iter->part_nums.end= part_info->no_parts;
+ part_iter->ret_null_part= part_iter->ret_null_part_orig= FALSE;
part_iter->get_next= get_next_partition_id_range;
}
=== modified file 'sql/share/errmsg.txt'
--- a/sql/share/errmsg.txt 2009-09-15 11:55:37 +0000
+++ b/sql/share/errmsg.txt 2009-10-15 21:38:29 +0000
@@ -6184,17 +6184,17 @@ ER_FUNC_INEXISTENT_NAME_COLLISION 42000
# When updating these, please update EXPLAIN_FILENAME_MAX_EXTRA_LENGTH in
# mysql_priv.h with the new maximal additional length for explain_filename.
ER_DATABASE_NAME
- eng "Database `%s`"
- swe "Databas `%s`"
+ eng "Database"
+ swe "Databas"
ER_TABLE_NAME
- eng "Table `%s`"
- swe "Tabell `%s`"
+ eng "Table"
+ swe "Tabell"
ER_PARTITION_NAME
- eng "Partition `%s`"
- swe "Partition `%s`"
+ eng "Partition"
+ swe "Partition"
ER_SUBPARTITION_NAME
- eng "Subpartition `%s`"
- swe "Subpartition `%s`"
+ eng "Subpartition"
+ swe "Subpartition"
ER_TEMPORARY_NAME
eng "Temporary"
swe "Tempor�
=== modified file 'sql/slave.cc'
--- a/sql/slave.cc 2009-09-15 10:46:35 +0000
+++ b/sql/slave.cc 2009-10-15 21:38:29 +0000
@@ -1961,9 +1961,6 @@ static int has_temporary_error(THD *thd)
{
DBUG_ENTER("has_temporary_error");
- if (thd->is_fatal_error)
- DBUG_RETURN(0);
-
DBUG_EXECUTE_IF("all_errors_are_temporary_errors",
if (thd->main_da.is_error())
{
@@ -3689,6 +3686,31 @@ void end_relay_log_info(Relay_log_info*
DBUG_VOID_RETURN;
}
+
+/**
+ Hook to detach the active VIO before closing a connection handle.
+
+ The client API might close the connection (and associated data)
+ in case it encounters a unrecoverable (network) error. This hook
+ is called from the client code before the VIO handle is deleted
+ allows the thread to detach the active vio so it does not point
+ to freed memory.
+
+ Other calls to THD::clear_active_vio throughout this module are
+ redundant due to the hook but are left in place for illustrative
+ purposes.
+*/
+
+extern "C" void slave_io_thread_detach_vio()
+{
+#ifdef SIGNAL_WITH_VIO_CLOSE
+ THD *thd= current_thd;
+ if (thd->slave_thread)
+ thd->clear_active_vio();
+#endif
+}
+
+
/*
Try to connect until successful or slave killed
=== modified file 'sql/spatial.cc'
--- a/sql/spatial.cc 2009-04-25 10:05:32 +0000
+++ b/sql/spatial.cc 2009-10-15 21:38:29 +0000
@@ -935,13 +935,10 @@ int Gis_polygon::interior_ring_n(uint32
int Gis_polygon::centroid_xy(double *x, double *y) const
{
uint32 n_linear_rings;
- double res_area;
- double res_cx, res_cy;
+ double UNINIT_VAR(res_area);
+ double UNINIT_VAR(res_cx), UNINIT_VAR(res_cy);
const char *data= m_data;
bool first_loop= 1;
- LINT_INIT(res_area);
- LINT_INIT(res_cx);
- LINT_INIT(res_cy);
if (no_data(data, 4))
return 1;
@@ -1636,14 +1633,10 @@ int Gis_multi_polygon::centroid(String *
uint32 n_polygons;
bool first_loop= 1;
Gis_polygon p;
- double res_area, res_cx, res_cy;
+ double UNINIT_VAR(res_area), UNINIT_VAR(res_cx), UNINIT_VAR(res_cy);
double cur_area, cur_cx, cur_cy;
const char *data= m_data;
- LINT_INIT(res_area);
- LINT_INIT(res_cx);
- LINT_INIT(res_cy);
-
if (no_data(data, 4))
return 1;
n_polygons= uint4korr(data);
=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc 2009-09-07 20:50:10 +0000
+++ b/sql/sql_base.cc 2009-10-15 21:38:29 +0000
@@ -1515,21 +1515,23 @@ void close_temporary_tables(THD *thd)
my_thread_id save_pseudo_thread_id= thd->variables.pseudo_thread_id;
/* Set pseudo_thread_id to be that of the processed table */
thd->variables.pseudo_thread_id= tmpkeyval(thd, table);
- /*
- Loop forward through all tables within the sublist of
- common pseudo_thread_id to create single DROP query.
+ String db;
+ db.append(table->s->db.str);
+ /* Loop forward through all tables that belong to a common database
+ within the sublist of common pseudo_thread_id to create single
+ DROP query
*/
for (s_query.length(stub_len);
table && is_user_table(table) &&
- tmpkeyval(thd, table) == thd->variables.pseudo_thread_id;
+ tmpkeyval(thd, table) == thd->variables.pseudo_thread_id &&
+ table->s->db.length == db.length() &&
+ strcmp(table->s->db.str, db.ptr()) == 0;
table= next)
{
/*
- We are going to add 4 ` around the db/table names and possible more
- due to special characters in the names
+ We are going to add ` around the table names and possible more
+ due to special characters
*/
- append_identifier(thd, &s_query, table->s->db.str, strlen(table->s->db.str));
- s_query.append('.');
append_identifier(thd, &s_query, table->s->table_name.str,
strlen(table->s->table_name.str));
s_query.append(',');
@@ -1542,6 +1544,7 @@ void close_temporary_tables(THD *thd)
Query_log_event qinfo(thd, s_query.ptr(),
s_query.length() - 1 /* to remove trailing ',' */,
0, FALSE, 0);
+ qinfo.db= db.ptr();
thd->variables.character_set_client= cs_save;
mysql_bin_log.write(&qinfo);
thd->variables.pseudo_thread_id= save_pseudo_thread_id;
=== modified file 'sql/sql_db.cc'
--- a/sql/sql_db.cc 2009-09-07 20:50:10 +0000
+++ b/sql/sql_db.cc 2009-10-15 21:38:29 +0000
@@ -658,10 +658,8 @@ int mysql_create_db(THD *thd, char *db,
}
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
ER_DB_CREATE_EXISTS, ER(ER_DB_CREATE_EXISTS), db);
- if (!silent)
- my_ok(thd);
error= 0;
- goto exit;
+ goto not_silent;
}
else
{
@@ -698,7 +696,8 @@ int mysql_create_db(THD *thd, char *db,
happened. (This is a very unlikely senario)
*/
}
-
+
+not_silent:
if (!silent)
{
char *query;
=== modified file 'sql/sql_delete.cc'
--- a/sql/sql_delete.cc 2009-09-07 20:50:10 +0000
+++ b/sql/sql_delete.cc 2009-10-15 21:38:29 +0000
@@ -1067,6 +1067,9 @@ bool mysql_truncate(THD *thd, TABLE_LIST
bzero((char*) &create_info,sizeof(create_info));
+ /* Remove tables from the HANDLER's hash. */
+ mysql_ha_rm_tables(thd, table_list, FALSE);
+
/* If it is a temporary table, close and regenerate it */
if (!dont_send_ok && (table= find_temporary_table(thd, table_list)))
{
=== modified file 'sql/sql_insert.cc'
--- a/sql/sql_insert.cc 2009-09-07 20:50:10 +0000
+++ b/sql/sql_insert.cc 2009-10-15 21:38:29 +0000
@@ -3420,25 +3420,6 @@ static TABLE *create_table_from_items(TH
bool not_used;
DBUG_ENTER("create_table_from_items");
- DBUG_EXECUTE_IF("sleep_create_select_before_check_if_exists", my_sleep(6000000););
-
- if (!(create_info->options & HA_LEX_CREATE_TMP_TABLE) &&
- create_table->table->db_stat)
- {
- /* Table already exists and was open at open_and_lock_tables() stage. */
- if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS)
- {
- create_info->table_existed= 1; // Mark that table existed
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
- ER_TABLE_EXISTS_ERROR, ER(ER_TABLE_EXISTS_ERROR),
- create_table->table_name);
- DBUG_RETURN(create_table->table);
- }
-
- my_error(ER_TABLE_EXISTS_ERROR, MYF(0), create_table->table_name);
- DBUG_RETURN(0);
- }
-
tmp_table.alias= 0;
tmp_table.timestamp_field= 0;
tmp_table.s= &share;
@@ -3647,10 +3628,35 @@ select_create::prepare(List<Item> &value
thd->binlog_start_trans_and_stmt();
}
- if (!(table= create_table_from_items(thd, create_info, create_table,
- alter_info, &values,
- &extra_lock, hook_ptr)))
- DBUG_RETURN(-1); // abort() deletes table
+ DBUG_EXECUTE_IF("sleep_create_select_before_check_if_exists", my_sleep(6000000););
+
+ if (!(create_info->options & HA_LEX_CREATE_TMP_TABLE) &&
+ create_table->table->db_stat)
+ {
+ /* Table already exists and was open at open_and_lock_tables() stage. */
+ if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS)
+ {
+ /* Mark that table existed */
+ create_info->table_existed= 1;
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
+ ER_TABLE_EXISTS_ERROR, ER(ER_TABLE_EXISTS_ERROR),
+ create_table->table_name);
+ if (thd->current_stmt_binlog_row_based)
+ binlog_show_create_table(&(create_table->table), 1);
+ table= create_table->table;
+ }
+ else
+ {
+ my_error(ER_TABLE_EXISTS_ERROR, MYF(0), create_table->table_name);
+ DBUG_RETURN(-1);
+ }
+ }
+ else
+ if (!(table= create_table_from_items(thd, create_info, create_table,
+ alter_info, &values,
+ &extra_lock, hook_ptr)))
+ /* abort() deletes table */
+ DBUG_RETURN(-1);
if (extra_lock)
{
=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc 2009-09-15 10:46:35 +0000
+++ b/sql/sql_parse.cc 2009-10-15 21:38:29 +0000
@@ -464,7 +464,7 @@ pthread_handler_t handle_bootstrap(void
thd->init_for_queries();
while (fgets(buff, thd->net.max_packet, file))
{
- char *query;
+ char *query, *res;
/* strlen() can't be deleted because fgets() doesn't return length */
ulong length= (ulong) strlen(buff);
while (buff[length-1] != '\n' && !feof(file))
@@ -481,7 +481,7 @@ pthread_handler_t handle_bootstrap(void
break;
}
buff= (char*) thd->net.buff;
- fgets(buff + length, thd->net.max_packet - length, file);
+ res= fgets(buff + length, thd->net.max_packet - length, file);
length+= (ulong) strlen(buff + length);
/* purecov: end */
}
=== modified file 'sql/sql_partition.cc'
--- a/sql/sql_partition.cc 2009-09-07 20:50:10 +0000
+++ b/sql/sql_partition.cc 2009-10-15 21:38:29 +0000
@@ -2766,8 +2766,24 @@ uint32 get_list_array_idx_for_endpoint(p
if (part_info->part_expr->null_value)
{
- DBUG_RETURN(0);
+ /*
+ Special handling for MONOTONIC functions that can return NULL for
+ values that are comparable. I.e.
+ '2000-00-00' can be compared to '2000-01-01' but TO_DAYS('2000-00-00')
+ returns NULL which cannot be compared used <, >, <=, >= etc.
+
+ Otherwise, just return the the first index (lowest value).
+ */
+ enum_monotonicity_info monotonic;
+ monotonic= part_info->part_expr->get_monotonicity_info();
+ if (monotonic != MONOTONIC_INCREASING_NOT_NULL &&
+ monotonic != MONOTONIC_STRICT_INCREASING_NOT_NULL)
+ {
+ /* F(col) can not return NULL, return index with lowest value */
+ DBUG_RETURN(0);
+ }
}
+
if (unsigned_flag)
part_func_value-= 0x8000000000000000ULL;
DBUG_ASSERT(part_info->no_list_values);
@@ -2916,11 +2932,29 @@ uint32 get_partition_id_range_for_endpoi
if (part_info->part_expr->null_value)
{
- uint32 ret_part_id= 0;
- if (!left_endpoint && include_endpoint)
- ret_part_id= 1;
- DBUG_RETURN(ret_part_id);
+ /*
+ Special handling for MONOTONIC functions that can return NULL for
+ values that are comparable. I.e.
+ '2000-00-00' can be compared to '2000-01-01' but TO_DAYS('2000-00-00')
+ returns NULL which cannot be compared used <, >, <=, >= etc.
+
+ Otherwise, just return the first partition
+ (may be included if not left endpoint)
+ */
+ enum_monotonicity_info monotonic;
+ monotonic= part_info->part_expr->get_monotonicity_info();
+ if (monotonic != MONOTONIC_INCREASING_NOT_NULL &&
+ monotonic != MONOTONIC_STRICT_INCREASING_NOT_NULL)
+ {
+ /* F(col) can not return NULL, return partition with lowest value */
+ if (!left_endpoint && include_endpoint)
+ DBUG_RETURN(1);
+ DBUG_RETURN(0);
+
+ }
}
+
+
if (unsigned_flag)
part_func_value-= 0x8000000000000000ULL;
if (left_endpoint && !include_endpoint)
@@ -6077,6 +6111,9 @@ uint fast_alter_partition_table(THD *thd
lpt->pack_frm_len= 0;
thd->work_part_info= part_info;
+ /* Never update timestamp columns when alter */
+ table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET;
+
if (fast_alter_partition & HA_PARTITION_ONE_PHASE)
{
/*
@@ -6693,6 +6730,7 @@ int get_part_iter_for_interval_via_mappi
Field *field= part_info->part_field_array[0];
uint32 max_endpoint_val;
get_endpoint_func get_endpoint;
+ bool can_match_multiple_values; /* is not '=' */
uint field_len= field->pack_length_in_rec();
part_iter->ret_null_part= part_iter->ret_null_part_orig= FALSE;
@@ -6730,6 +6768,23 @@ int get_part_iter_for_interval_via_mappi
}
else
assert(0);
+
+ can_match_multiple_values= (flags || !min_value || !max_value ||
+ memcmp(min_value, max_value, field_len));
+ if (can_match_multiple_values &&
+ (part_info->part_type == RANGE_PARTITION ||
+ part_info->has_null_value))
+ {
+ /* Range scan on RANGE or LIST partitioned table */
+ enum_monotonicity_info monotonic;
+ monotonic= part_info->part_expr->get_monotonicity_info();
+ if (monotonic == MONOTONIC_INCREASING_NOT_NULL ||
+ monotonic == MONOTONIC_STRICT_INCREASING_NOT_NULL)
+ {
+ /* col is NOT NULL, but F(col) can return NULL, add NULL partition */
+ part_iter->ret_null_part= part_iter->ret_null_part_orig= TRUE;
+ }
+ }
/*
Find minimum: Do special handling if the interval has left bound in form
@@ -6762,6 +6817,14 @@ int get_part_iter_for_interval_via_mappi
store_key_image_to_rec(field, min_value, field_len);
bool include_endp= !test(flags & NEAR_MIN);
part_iter->part_nums.start= get_endpoint(part_info, 1, include_endp);
+ if (!can_match_multiple_values && part_info->part_expr->null_value)
+ {
+ /* col = x and F(x) = NULL -> only search NULL partition */
+ part_iter->part_nums.cur= part_iter->part_nums.start= 0;
+ part_iter->part_nums.end= 0;
+ part_iter->ret_null_part= part_iter->ret_null_part_orig= TRUE;
+ return 1;
+ }
part_iter->part_nums.cur= part_iter->part_nums.start;
if (part_iter->part_nums.start == max_endpoint_val)
return 0; /* No partitions */
@@ -6846,6 +6909,7 @@ int get_part_iter_for_interval_via_walki
Field *field;
uint total_parts;
partition_iter_func get_next_func;
+ part_iter->ret_null_part= part_iter->ret_null_part_orig= FALSE;
if (is_subpart)
{
field= part_info->subpart_field_array[0];
@@ -6956,7 +7020,13 @@ uint32 get_next_partition_id_range(PARTI
{
if (part_iter->part_nums.cur >= part_iter->part_nums.end)
{
+ if (part_iter->ret_null_part)
+ {
+ part_iter->ret_null_part= FALSE;
+ return 0; /* NULL always in first range partition */
+ }
part_iter->part_nums.cur= part_iter->part_nums.start;
+ part_iter->ret_null_part= part_iter->ret_null_part_orig;
return NOT_A_PARTITION_ID;
}
else
@@ -6984,7 +7054,7 @@ uint32 get_next_partition_id_range(PARTI
uint32 get_next_partition_id_list(PARTITION_ITERATOR *part_iter)
{
- if (part_iter->part_nums.cur == part_iter->part_nums.end)
+ if (part_iter->part_nums.cur >= part_iter->part_nums.end)
{
if (part_iter->ret_null_part)
{
=== modified file 'sql/sql_profile.cc'
--- a/sql/sql_profile.cc 2009-09-07 20:50:10 +0000
+++ b/sql/sql_profile.cc 2009-10-15 21:38:29 +0000
@@ -33,7 +33,7 @@
#include "my_sys.h"
#define TIME_FLOAT_DIGITS 9
-/** two vals encoded: (dec*100)+len */
+/** two vals encoded: (len*100)+dec */
#define TIME_I_S_DECIMAL_SIZE (TIME_FLOAT_DIGITS*100)+(TIME_FLOAT_DIGITS-3)
#define MAX_QUERY_LENGTH 300
=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc 2009-09-15 10:46:35 +0000
+++ b/sql/sql_select.cc 2009-10-15 21:38:29 +0000
@@ -9493,43 +9493,8 @@ static Field *create_tmp_field_from_item
new_field->set_derivation(item->collation.derivation);
break;
case DECIMAL_RESULT:
- {
- uint8 dec= item->decimals;
- uint8 intg= ((Item_decimal *) item)->decimal_precision() - dec;
- uint32 len= item->max_length;
-
- /*
- Trying to put too many digits overall in a DECIMAL(prec,dec)
- will always throw a warning. We must limit dec to
- DECIMAL_MAX_SCALE however to prevent an assert() later.
- */
-
- if (dec > 0)
- {
- signed int overflow;
-
- dec= min(dec, DECIMAL_MAX_SCALE);
-
- /*
- If the value still overflows the field with the corrected dec,
- we'll throw out decimals rather than integers. This is still
- bad and of course throws a truncation warning.
- +1: for decimal point
- */
-
- overflow= my_decimal_precision_to_length(intg + dec, dec,
- item->unsigned_flag) - len;
-
- if (overflow > 0)
- dec= max(0, dec - overflow); // too long, discard fract
- else
- len -= item->decimals - dec; // corrected value fits
- }
-
- new_field= new Field_new_decimal(len, maybe_null, item->name,
- dec, item->unsigned_flag);
+ new_field= Field_new_decimal::new_decimal_field(item);
break;
- }
case ROW_RESULT:
default:
// This case should never be choosen
=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc 2009-09-23 11:03:47 +0000
+++ b/sql/sql_show.cc 2009-10-15 21:38:29 +0000
@@ -7095,8 +7095,6 @@ bool show_create_trigger(THD *thd, const
/* Perform closing actions and return error status. */
}
- DBUG_ASSERT(num_tables == 1);
-
Table_triggers_list *triggers= lst->table->triggers;
if (!triggers)
=== modified file 'sql/sql_table.cc'
--- a/sql/sql_table.cc 2009-09-18 01:04:43 +0000
+++ b/sql/sql_table.cc 2009-10-15 21:38:29 +0000
@@ -72,7 +72,7 @@ static void wait_for_kill_signal(THD *th
@brief Helper function for explain_filename
*/
static char* add_identifier(char *to_p, const char * end_p,
- const char* name, uint name_len, int errcode)
+ const char* name, uint name_len, bool add_quotes)
{
uint res;
uint errors;
@@ -92,18 +92,44 @@ static char* add_identifier(char *to_p,
res= strconvert(&my_charset_filename, conv_name, system_charset_info,
conv_string, FN_REFLEN, &errors);
if (!res || errors)
+ {
+ DBUG_PRINT("error", ("strconvert of '%s' failed with %u (errors: %u)", conv_name, res, errors));
conv_name= name;
+ }
else
{
DBUG_PRINT("info", ("conv '%s' -> '%s'", conv_name, conv_string));
conv_name= conv_string;
}
- if (errcode)
- to_p+= my_snprintf(to_p, end_p - to_p, ER(errcode), conv_name);
+ if (add_quotes && (end_p - to_p > 2))
+ {
+ *(to_p++)= '`';
+ while (*conv_name && (end_p - to_p - 1) > 0)
+ {
+ uint length= my_mbcharlen(system_charset_info, *conv_name);
+ if (!length)
+ length= 1;
+ if (length == 1 && *conv_name == '`')
+ {
+ if ((end_p - to_p) < 3)
+ break;
+ *(to_p++)= '`';
+ *(to_p++)= *(conv_name++);
+ }
+ else if (((long) length) < (end_p - to_p))
+ {
+ to_p= strnmov(to_p, conv_name, length);
+ conv_name+= length;
+ }
+ else
+ break; /* string already filled */
+ }
+ to_p= strnmov(to_p, "`", end_p - to_p);
+ }
else
- to_p+= my_snprintf(to_p, end_p - to_p, "`%s`", conv_name);
- return to_p;
+ to_p= strnmov(to_p, conv_name, end_p - to_p);
+ DBUG_RETURN(to_p);
}
@@ -135,6 +161,8 @@ static char* add_identifier(char *to_p,
[,[ Temporary| Renamed] Partition `p`
[, Subpartition `sp`]] *|
(| is really a /, and it is all in one line)
+ EXPLAIN_PARTITIONS_AS_COMMENT_NO_QUOTING ->
+ same as above but no quotes are added.
@retval Length of returned string
*/
@@ -245,28 +273,39 @@ uint explain_filename(const char *from,
part_name_len-= 5;
}
}
+ else
+ table_name_len= strlen(table_name);
if (db_name)
{
if (explain_mode == EXPLAIN_ALL_VERBOSE)
{
- to_p= add_identifier(to_p, end_p, db_name, db_name_len,
- ER_DATABASE_NAME);
+ to_p= strnmov(to_p, ER(ER_DATABASE_NAME), end_p - to_p);
+ *(to_p++)= ' ';
+ to_p= add_identifier(to_p, end_p, db_name, db_name_len, 1);
to_p= strnmov(to_p, ", ", end_p - to_p);
}
else
{
- to_p= add_identifier(to_p, end_p, db_name, db_name_len, 0);
+ to_p= add_identifier(to_p, end_p, db_name, db_name_len,
+ (explain_mode !=
+ EXPLAIN_PARTITIONS_AS_COMMENT_NO_QUOTING));
to_p= strnmov(to_p, ".", end_p - to_p);
}
}
if (explain_mode == EXPLAIN_ALL_VERBOSE)
- to_p= add_identifier(to_p, end_p, table_name, table_name_len,
- ER_TABLE_NAME);
+ {
+ to_p= strnmov(to_p, ER(ER_TABLE_NAME), end_p - to_p);
+ *(to_p++)= ' ';
+ to_p= add_identifier(to_p, end_p, table_name, table_name_len, 1);
+ }
else
- to_p= add_identifier(to_p, end_p, table_name, table_name_len, 0);
+ to_p= add_identifier(to_p, end_p, table_name, table_name_len,
+ (explain_mode !=
+ EXPLAIN_PARTITIONS_AS_COMMENT_NO_QUOTING));
if (part_name)
{
- if (explain_mode == EXPLAIN_PARTITIONS_AS_COMMENT)
+ if (explain_mode == EXPLAIN_PARTITIONS_AS_COMMENT ||
+ explain_mode == EXPLAIN_PARTITIONS_AS_COMMENT_NO_QUOTING)
to_p= strnmov(to_p, " /* ", end_p - to_p);
else if (explain_mode == EXPLAIN_PARTITIONS_VERBOSE)
to_p= strnmov(to_p, " ", end_p - to_p);
@@ -280,15 +319,22 @@ uint explain_filename(const char *from,
to_p= strnmov(to_p, ER(ER_RENAMED_NAME), end_p - to_p);
to_p= strnmov(to_p, " ", end_p - to_p);
}
+ to_p= strnmov(to_p, ER(ER_PARTITION_NAME), end_p - to_p);
+ *(to_p++)= ' ';
to_p= add_identifier(to_p, end_p, part_name, part_name_len,
- ER_PARTITION_NAME);
+ (explain_mode !=
+ EXPLAIN_PARTITIONS_AS_COMMENT_NO_QUOTING));
if (subpart_name)
{
to_p= strnmov(to_p, ", ", end_p - to_p);
+ to_p= strnmov(to_p, ER(ER_SUBPARTITION_NAME), end_p - to_p);
+ *(to_p++)= ' ';
to_p= add_identifier(to_p, end_p, subpart_name, subpart_name_len,
- ER_SUBPARTITION_NAME);
+ (explain_mode !=
+ EXPLAIN_PARTITIONS_AS_COMMENT_NO_QUOTING));
}
- if (explain_mode == EXPLAIN_PARTITIONS_AS_COMMENT)
+ if (explain_mode == EXPLAIN_PARTITIONS_AS_COMMENT ||
+ explain_mode == EXPLAIN_PARTITIONS_AS_COMMENT_NO_QUOTING)
to_p= strnmov(to_p, " */", end_p - to_p);
}
DBUG_PRINT("exit", ("to '%s'", to));
@@ -3476,6 +3522,41 @@ void sp_prepare_create_field(THD *thd, C
/*
+ Write CREATE TABLE binlog
+
+ SYNOPSIS
+ write_create_table_bin_log()
+ thd Thread object
+ create_info Create information
+ internal_tmp_table Set to 1 if this is an internal temporary table
+
+ DESCRIPTION
+ This function only is called in mysql_create_table_no_lock and
+ mysql_create_table
+
+ RETURN VALUES
+ NONE
+ */
+static inline void write_create_table_bin_log(THD *thd,
+ const HA_CREATE_INFO *create_info,
+ bool internal_tmp_table)
+{
+ /*
+ Don't write statement if:
+ - It is an internal temporary table,
+ - Row-based logging is used and it we are creating a temporary table, or
+ - The binary log is not open.
+ Otherwise, the statement shall be binlogged.
+ */
+ if (!internal_tmp_table &&
+ (!thd->current_stmt_binlog_row_based ||
+ (thd->current_stmt_binlog_row_based &&
+ !(create_info->options & HA_LEX_CREATE_TMP_TABLE))))
+ write_bin_log(thd, TRUE, thd->query, thd->query_length);
+}
+
+
+/*
Create a table
SYNOPSIS
@@ -3739,6 +3820,7 @@ bool mysql_create_table_no_lock(THD *thd
ER_TABLE_EXISTS_ERROR, ER(ER_TABLE_EXISTS_ERROR),
alias);
error= 0;
+ write_create_table_bin_log(thd, create_info, internal_tmp_table);
goto err;
}
my_error(ER_TABLE_EXISTS_ERROR, MYF(0), alias);
@@ -3866,18 +3948,7 @@ bool mysql_create_table_no_lock(THD *thd
thd->thread_specific_used= TRUE;
}
- /*
- Don't write statement if:
- - It is an internal temporary table,
- - Row-based logging is used and it we are creating a temporary table, or
- - The binary log is not open.
- Otherwise, the statement shall be binlogged.
- */
- if (!internal_tmp_table &&
- (!thd->current_stmt_binlog_row_based ||
- (thd->current_stmt_binlog_row_based &&
- !(create_info->options & HA_LEX_CREATE_TMP_TABLE))))
- write_bin_log(thd, TRUE, thd->query, thd->query_length);
+ write_create_table_bin_log(thd, create_info, internal_tmp_table);
error= FALSE;
unlock_and_end:
VOID(pthread_mutex_unlock(&LOCK_open));
@@ -3893,6 +3964,7 @@ warn:
ER_TABLE_EXISTS_ERROR, ER(ER_TABLE_EXISTS_ERROR),
alias);
create_info->table_existed= 1; // Mark that table existed
+ write_create_table_bin_log(thd, create_info, internal_tmp_table);
goto unlock_and_end;
}
@@ -3944,6 +4016,7 @@ bool mysql_create_table(THD *thd, const
table_name);
create_info->table_existed= 1;
result= FALSE;
+ write_create_table_bin_log(thd, create_info, internal_tmp_table);
}
else
{
@@ -5285,6 +5358,24 @@ bool mysql_create_like_table(THD* thd, T
goto err; /* purecov: inspected */
}
+goto binlog;
+
+table_exists:
+ if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS)
+ {
+ char warn_buff[MYSQL_ERRMSG_SIZE];
+ my_snprintf(warn_buff, sizeof(warn_buff),
+ ER(ER_TABLE_EXISTS_ERROR), table_name);
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
+ ER_TABLE_EXISTS_ERROR,warn_buff);
+ }
+ else
+ {
+ my_error(ER_TABLE_EXISTS_ERROR, MYF(0), table_name);
+ goto err;
+ }
+
+binlog:
DBUG_EXECUTE_IF("sleep_create_like_before_binlogging", my_sleep(6000000););
/*
@@ -5348,20 +5439,6 @@ bool mysql_create_like_table(THD* thd, T
write_bin_log(thd, TRUE, thd->query, thd->query_length);
res= FALSE;
- goto err;
-
-table_exists:
- if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS)
- {
- char warn_buff[MYSQL_ERRMSG_SIZE];
- my_snprintf(warn_buff, sizeof(warn_buff),
- ER(ER_TABLE_EXISTS_ERROR), table_name);
- push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
- ER_TABLE_EXISTS_ERROR,warn_buff);
- res= FALSE;
- }
- else
- my_error(ER_TABLE_EXISTS_ERROR, MYF(0), table_name);
err:
if (name_lock)
=== modified file 'sql/sql_update.cc'
--- a/sql/sql_update.cc 2009-09-07 20:50:10 +0000
+++ b/sql/sql_update.cc 2009-10-15 21:38:29 +0000
@@ -730,6 +730,7 @@ int mysql_update(THD *thd,
break;
}
}
+ table->auto_increment_field_not_null= FALSE;
dup_key_found= 0;
/*
Caching the killed status to pass as the arg to query event constuctor;
=== modified file 'sql/sql_view.cc'
--- a/sql/sql_view.cc 2009-09-07 20:50:10 +0000
+++ b/sql/sql_view.cc 2009-10-15 21:38:29 +0000
@@ -1032,7 +1032,8 @@ bool mysql_make_view(THD *thd, File_pars
TABLE_LIST *top_view= table->top_table();
bool parse_status;
bool result, view_is_mergeable;
- TABLE_LIST *view_main_select_tables;
+ TABLE_LIST *UNINIT_VAR(view_main_select_tables);
+
DBUG_ENTER("mysql_make_view");
DBUG_PRINT("info", ("table: 0x%lx (%s)", (ulong) table, table->table_name));
@@ -1309,7 +1310,6 @@ bool mysql_make_view(THD *thd, File_pars
old_lex->set_stmt_unsafe();
view_is_mergeable= (table->algorithm != VIEW_ALGORITHM_TMPTABLE &&
lex->can_be_merged());
- LINT_INIT(view_main_select_tables);
if (view_is_mergeable)
{
=== modified file 'sql/sql_yacc.yy'
--- a/sql/sql_yacc.yy 2009-09-07 20:50:10 +0000
+++ b/sql/sql_yacc.yy 2009-10-15 21:38:29 +0000
@@ -1814,15 +1814,16 @@ server_option:
;
event_tail:
- EVENT_SYM opt_if_not_exists sp_name
+ remember_name EVENT_SYM opt_if_not_exists sp_name
{
THD *thd= YYTHD;
LEX *lex=Lex;
- lex->create_info.options= $2;
+ lex->stmt_definition_begin= $1;
+ lex->create_info.options= $3;
if (!(lex->event_parse_data= Event_parse_data::new_instance(thd)))
MYSQL_YYABORT;
- lex->event_parse_data->identifier= $3;
+ lex->event_parse_data->identifier= $4;
lex->event_parse_data->on_completion=
Event_parse_data::ON_COMPLETION_DROP;
@@ -3759,8 +3760,8 @@ partitioning:
LEX_STRING partition_name={C_STRING_WITH_LEN("partition")};
if (!plugin_is_ready(&partition_name, MYSQL_STORAGE_ENGINE_PLUGIN))
{
- my_error(ER_FEATURE_DISABLED, MYF(0),
- "partitioning", "--with-partition");
+ my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0),
+ "--skip-partition");
MYSQL_YYABORT;
}
lex->part_info= new partition_info();
@@ -9096,7 +9097,8 @@ procedure_clause:
MYSQL_YYABORT;
}
- if (&lex->select_lex != lex->current_select)
+ if (&lex->select_lex != lex->current_select ||
+ lex->select_lex.get_table_list()->derived)
{
my_error(ER_WRONG_USAGE, MYF(0), "PROCEDURE", "subquery");
MYSQL_YYABORT;
=== modified file 'sql/table.cc'
--- a/sql/table.cc 2009-09-09 21:06:57 +0000
+++ b/sql/table.cc 2009-10-15 21:38:29 +0000
@@ -914,6 +914,15 @@ static int open_binary_frm(THD *thd, TAB
we unlock the old value of share->db_plugin before
replacing it with a globally locked version of tmp_plugin
*/
+ /* Check if the partitioning engine is ready */
+ if (!plugin_is_ready(&name, MYSQL_STORAGE_ENGINE_PLUGIN))
+ {
+ error= 8;
+ my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0),
+ "--skip-partition");
+ my_free(buff, MYF(0));
+ goto err;
+ }
plugin_unlock(NULL, share->db_plugin);
share->db_plugin= ha_lock_engine(NULL, partition_hton);
DBUG_PRINT("info", ("setting dbtype to '%.*s' (%d)",
=== modified file 'storage/heap/hp_test2.c'
--- a/storage/heap/hp_test2.c 2008-03-29 08:02:54 +0000
+++ b/storage/heap/hp_test2.c 2009-08-28 16:21:54 +0000
@@ -62,11 +62,10 @@ int main(int argc, char *argv[])
HP_SHARE *tmp_share;
HP_KEYDEF keyinfo[MAX_KEYS];
HA_KEYSEG keyseg[MAX_KEYS*5];
- HEAP_PTR position;
+ HEAP_PTR UNINIT_VAR(position);
HP_CREATE_INFO hp_create_info;
CHARSET_INFO *cs= &my_charset_latin1;
MY_INIT(argv[0]); /* init my_sys library & pthreads */
- LINT_INIT(position);
filename= "test2";
filename2= "test2_2";
=== modified file 'storage/myisam/ft_boolean_search.c'
--- a/storage/myisam/ft_boolean_search.c 2009-09-07 20:50:10 +0000
+++ b/storage/myisam/ft_boolean_search.c 2009-10-15 21:38:29 +0000
@@ -358,9 +358,8 @@ static int _ft2_search(FTB *ftb, FTB_WOR
int subkeys=1;
my_bool can_go_down;
MI_INFO *info=ftb->info;
- uint off, extra=HA_FT_WLEN+info->s->base.rec_reflength;
+ uint UNINIT_VAR(off), extra=HA_FT_WLEN+info->s->base.rec_reflength;
uchar *lastkey_buf=ftbw->word+ftbw->off;
- LINT_INIT(off);
if (ftbw->flags & FTB_FLAG_TRUNC)
lastkey_buf+=ftbw->len;
=== modified file 'storage/myisam/mi_check.c'
--- a/storage/myisam/mi_check.c 2009-06-29 21:03:30 +0000
+++ b/storage/myisam/mi_check.c 2009-10-15 21:38:29 +0000
@@ -140,11 +140,10 @@ int chk_del(HA_CHECK *param, register MI
{
reg2 ha_rows i;
uint delete_link_length;
- my_off_t empty,next_link,old_link;
+ my_off_t empty,next_link,UNINIT_VAR(old_link);
char buff[22],buff2[22];
DBUG_ENTER("chk_del");
- LINT_INIT(old_link);
param->record_checksum=0;
delete_link_length=((info->s->options & HA_OPTION_PACK_RECORD) ? 20 :
info->s->rec_reflength+1);
@@ -940,11 +939,11 @@ static uint isam_key_length(MI_INFO *inf
int chk_data_link(HA_CHECK *param, MI_INFO *info, my_bool extend)
{
int error,got_error,flag;
- uint key,left_length,b_type,field;
+ uint key,UNINIT_VAR(left_length),b_type,field;
ha_rows records,del_blocks;
- my_off_t used,empty,pos,splits,start_recpos,
+ my_off_t used,empty,pos,splits,UNINIT_VAR(start_recpos),
del_length,link_used,start_block;
- uchar *record= 0, *to;
+ uchar *record= 0, *UNINIT_VAR(to);
char llbuff[22],llbuff2[22],llbuff3[22];
ha_checksum intern_record_checksum;
ha_checksum key_checksum[HA_MAX_POSSIBLE_KEY];
@@ -969,7 +968,6 @@ int chk_data_link(HA_CHECK *param, MI_IN
records=del_blocks=0;
used=link_used=splits=del_length=0;
intern_record_checksum=param->glob_crc=0;
- LINT_INIT(left_length); LINT_INIT(start_recpos); LINT_INIT(to);
got_error=error=0;
empty=info->s->pack.header_length;
@@ -1550,7 +1548,7 @@ int mi_repair(HA_CHECK *param, register
if (!param->using_global_keycache)
VOID(init_key_cache(dflt_key_cache, param->key_cache_block_size,
- param->use_buffers, 0, 0));
+ (size_t) param->use_buffers, 0, 0));
if (init_io_cache(¶m->read_cache,info->dfile,
(uint) param->read_buffer_length,
@@ -2227,9 +2225,8 @@ int mi_repair_by_sort(HA_CHECK *param, r
ulong *rec_per_key_part;
char llbuff[22];
MI_SORT_INFO sort_info;
- ulonglong key_map;
+ ulonglong UNINIT_VAR(key_map);
DBUG_ENTER("mi_repair_by_sort");
- LINT_INIT(key_map);
start_records=info->state->records;
got_error=1;
@@ -2651,11 +2648,10 @@ int mi_repair_parallel(HA_CHECK *param,
IO_CACHE new_data_cache; /* For non-quick repair. */
IO_CACHE_SHARE io_share;
MI_SORT_INFO sort_info;
- ulonglong key_map;
+ ulonglong UNINIT_VAR(key_map);
pthread_attr_t thr_attr;
ulong max_pack_reclength;
DBUG_ENTER("mi_repair_parallel");
- LINT_INIT(key_map);
start_records=info->state->records;
got_error=1;
@@ -3242,7 +3238,7 @@ static int sort_get_next_record(MI_SORT_
int parallel_flag;
uint found_record,b_type,left_length;
my_off_t pos;
- uchar *to;
+ uchar *UNINIT_VAR(to);
MI_BLOCK_INFO block_info;
MI_SORT_INFO *sort_info=sort_param->sort_info;
HA_CHECK *param=sort_info->param;
=== modified file 'storage/myisam/mi_create.c'
--- a/storage/myisam/mi_create.c 2009-01-15 22:25:53 +0000
+++ b/storage/myisam/mi_create.c 2009-10-15 21:38:29 +0000
@@ -38,7 +38,7 @@ int mi_create(const char *name,uint keys
MI_CREATE_INFO *ci,uint flags)
{
register uint i,j;
- File dfile,file;
+ File UNINIT_VAR(dfile),file;
int errpos,save_errno, create_mode= O_RDWR | O_TRUNC;
myf create_flag;
uint fields,length,max_key_length,packed,pack_bytes,pointer,real_length_diff,
=== modified file 'storage/myisam/mi_delete.c'
--- a/storage/myisam/mi_delete.c 2009-09-07 20:50:10 +0000
+++ b/storage/myisam/mi_delete.c 2009-10-15 21:38:29 +0000
@@ -221,7 +221,7 @@ static int d_search(register MI_INFO *in
uint length,nod_flag,search_key_length;
my_bool last_key;
uchar *leaf_buff,*keypos;
- my_off_t leaf_page,next_block;
+ my_off_t UNINIT_VAR(leaf_page),next_block;
uchar lastkey[HA_MAX_KEY_BUFF];
DBUG_ENTER("d_search");
DBUG_DUMP("page",(uchar*) anc_buff,mi_getint(anc_buff));
=== modified file 'storage/myisam/mi_dynrec.c'
--- a/storage/myisam/mi_dynrec.c 2009-09-07 20:50:10 +0000
+++ b/storage/myisam/mi_dynrec.c 2009-10-15 21:38:29 +0000
@@ -1419,16 +1419,14 @@ void _mi_store_blob_length(uchar *pos,ui
int _mi_read_dynamic_record(MI_INFO *info, my_off_t filepos, uchar *buf)
{
int block_of_record;
- uint b_type,left_length;
- uchar *to;
+ uint b_type,UNINIT_VAR(left_length);
+ uchar *UNINIT_VAR(to);
MI_BLOCK_INFO block_info;
File file;
DBUG_ENTER("mi_read_dynamic_record");
if (filepos != HA_OFFSET_ERROR)
{
- LINT_INIT(to);
- LINT_INIT(left_length);
file=info->dfile;
block_of_record= 0; /* First block of record is numbered as zero. */
block_info.second_read= 0;
@@ -1697,13 +1695,12 @@ int _mi_read_rnd_dynamic_record(MI_INFO
{
int block_of_record, info_read, save_errno;
uint left_len,b_type;
- uchar *to;
+ uchar *UNINIT_VAR(to);
MI_BLOCK_INFO block_info;
MYISAM_SHARE *share=info->s;
DBUG_ENTER("_mi_read_rnd_dynamic_record");
info_read=0;
- LINT_INIT(to);
if (info->lock_type == F_UNLCK)
{
=== modified file 'storage/myisam/mi_open.c'
--- a/storage/myisam/mi_open.c 2009-09-07 20:50:10 +0000
+++ b/storage/myisam/mi_open.c 2009-10-15 21:38:29 +0000
@@ -709,7 +709,7 @@ err:
uchar *mi_alloc_rec_buff(MI_INFO *info, ulong length, uchar **buf)
{
uint extra;
- uint32 old_length;
+ uint32 UNINIT_VAR(old_length);
LINT_INIT(old_length);
if (! *buf || length > (old_length=mi_get_rec_buff_len(info, *buf)))
=== modified file 'storage/myisam/mi_packrec.c'
--- a/storage/myisam/mi_packrec.c 2009-09-07 20:50:10 +0000
+++ b/storage/myisam/mi_packrec.c 2009-10-15 21:38:29 +0000
@@ -1364,7 +1364,7 @@ uint _mi_pack_get_block_info(MI_INFO *my
File file, my_off_t filepos)
{
uchar *header=info->header;
- uint head_length,ref_length;
+ uint head_length, UNINIT_VAR(ref_length);
LINT_INIT(ref_length);
if (file >= 0)
=== modified file 'storage/myisam/mi_search.c'
--- a/storage/myisam/mi_search.c 2009-05-19 09:28:05 +0000
+++ b/storage/myisam/mi_search.c 2009-10-15 21:38:29 +0000
@@ -28,9 +28,15 @@ int _mi_check_index(MI_INFO *info, int i
{
if (inx == -1) /* Use last index */
inx=info->lastinx;
- if (inx < 0 || ! mi_is_key_active(info->s->state.key_map, inx))
+ if (inx < 0)
{
- my_errno=HA_ERR_WRONG_INDEX;
+ my_errno= HA_ERR_WRONG_INDEX;
+ return -1;
+ }
+ if (!mi_is_key_active(info->s->state.key_map, inx))
+ {
+ my_errno= info->s->state.state.records ? HA_ERR_WRONG_INDEX :
+ HA_ERR_END_OF_FILE;
return -1;
}
if (info->lastinx != inx) /* Index changed */
@@ -240,12 +246,11 @@ int _mi_seq_search(MI_INFO *info, regist
uchar *key, uint key_len, uint comp_flag, uchar **ret_pos,
uchar *buff, my_bool *last_key)
{
- int flag;
- uint nod_flag,length,not_used[2];
+ int UNINIT_VAR(flag);
+ uint nod_flag,UNINIT_VAR(length),not_used[2];
uchar t_buff[HA_MAX_KEY_BUFF],*end;
DBUG_ENTER("_mi_seq_search");
- LINT_INIT(flag); LINT_INIT(length);
end= page+mi_getint(page);
nod_flag=mi_test_if_nod(page);
page+=2+nod_flag;
=== modified file 'storage/myisam/mi_update.c'
--- a/storage/myisam/mi_update.c 2008-02-18 22:35:17 +0000
+++ b/storage/myisam/mi_update.c 2009-10-15 21:38:29 +0000
@@ -27,11 +27,8 @@ int mi_update(register MI_INFO *info, co
my_bool auto_key_changed=0;
ulonglong changed;
MYISAM_SHARE *share=info->s;
- ha_checksum old_checksum;
+ ha_checksum UNINIT_VAR(old_checksum);
DBUG_ENTER("mi_update");
- LINT_INIT(new_key);
- LINT_INIT(changed);
- LINT_INIT(old_checksum);
DBUG_EXECUTE_IF("myisam_pretend_crashed_table_on_usage",
mi_print_error(info->s, HA_ERR_CRASHED);
=== modified file 'storage/myisam/sort.c'
--- a/storage/myisam/sort.c 2008-04-28 16:24:05 +0000
+++ b/storage/myisam/sort.c 2009-10-15 21:38:29 +0000
@@ -489,7 +489,7 @@ int thr_write_keys(MI_SORT_PARAM *sort_p
{
MI_SORT_INFO *sort_info=sort_param->sort_info;
HA_CHECK *param=sort_info->param;
- ulong length, keys;
+ ulong UNINIT_VAR(length), keys;
ulong *rec_per_key_part=param->rec_per_key_part;
int got_error=sort_info->got_error;
uint i;
@@ -896,7 +896,7 @@ merge_buffers(MI_SORT_PARAM *info, uint
int error;
uint sort_length,maxcount;
ha_rows count;
- my_off_t to_start_filepos;
+ my_off_t UNINIT_VAR(to_start_filepos);
uchar *strpos;
BUFFPEK *buffpek,**refpek;
QUEUE queue;
=== modified file 'storage/myisammrg/ha_myisammrg.cc'
--- a/storage/myisammrg/ha_myisammrg.cc 2009-09-17 23:01:09 +0000
+++ b/storage/myisammrg/ha_myisammrg.cc 2009-10-15 21:38:29 +0000
@@ -147,7 +147,7 @@ static void split_file_name(const char *
extern "C" void myrg_print_wrong_table(const char *table_name)
{
- LEX_STRING db, name;
+ LEX_STRING db= {NULL, 0}, name;
char buf[FN_REFLEN];
split_file_name(table_name, &db, &name);
memcpy(buf, db.str, db.length);
=== modified file 'storage/myisammrg/myrg_open.c'
--- a/storage/myisammrg/myrg_open.c 2009-07-10 11:34:03 +0000
+++ b/storage/myisammrg/myrg_open.c 2009-08-28 16:21:54 +0000
@@ -37,7 +37,7 @@
MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
{
int save_errno,errpos=0;
- uint files= 0, i, dir_length, length, key_parts, min_keys= 0;
+ uint files= 0, i, dir_length, length, UNINIT_VAR(key_parts), min_keys= 0;
ulonglong file_offset=0;
char name_buff[FN_REFLEN*2],buff[FN_REFLEN],*end;
MYRG_INFO *m_info=0;
@@ -49,8 +49,6 @@ MYRG_INFO *myrg_open(const char *name, i
my_bool bad_children= FALSE;
DBUG_ENTER("myrg_open");
- LINT_INIT(key_parts);
-
bzero((char*) &file,sizeof(file));
if ((fd=my_open(fn_format(name_buff,name,"",MYRG_NAME_EXT,
MY_UNPACK_FILENAME|MY_APPEND_EXT),
=== modified file 'storage/myisammrg/myrg_rkey.c'
--- a/storage/myisammrg/myrg_rkey.c 2008-03-29 08:02:54 +0000
+++ b/storage/myisammrg/myrg_rkey.c 2009-08-28 16:21:54 +0000
@@ -38,16 +38,13 @@
int myrg_rkey(MYRG_INFO *info,uchar *buf,int inx, const uchar *key,
key_part_map keypart_map, enum ha_rkey_function search_flag)
{
- uchar *key_buff;
- uint pack_key_length;
- uint16 last_used_keyseg;
+ uchar *UNINIT_VAR(key_buff);
+ uint UNINIT_VAR(pack_key_length);
+ uint16 UNINIT_VAR(last_used_keyseg);
MYRG_TABLE *table;
MI_INFO *mi;
int err;
DBUG_ENTER("myrg_rkey");
- LINT_INIT(key_buff);
- LINT_INIT(pack_key_length);
- LINT_INIT(last_used_keyseg);
if (_myrg_init_queue(info,inx,search_flag))
DBUG_RETURN(my_errno);
=== modified file 'storage/ndb/include/mgmapi/ndb_logevent.h'
--- a/storage/ndb/include/mgmapi/ndb_logevent.h 2007-11-14 02:52:29 +0000
+++ b/storage/ndb/include/mgmapi/ndb_logevent.h 2009-08-28 15:06:59 +0000
@@ -272,6 +272,300 @@ extern "C" {
#endif
};
+ struct ndb_logevent_Connected {
+ unsigned node;
+ };
+
+ struct ndb_logevent_Disconnected {
+ unsigned node;
+ };
+
+ struct ndb_logevent_CommunicationClosed {
+ unsigned node;
+ };
+
+ struct ndb_logevent_CommunicationOpened {
+ unsigned node;
+ };
+
+ struct ndb_logevent_ConnectedApiVersion {
+ unsigned node;
+ unsigned version;
+ };
+
+ /* CHECKPOINT */
+ struct ndb_logevent_GlobalCheckpointStarted {
+ unsigned gci;
+ };
+ struct ndb_logevent_GlobalCheckpointCompleted {
+ unsigned gci;
+ };
+ struct ndb_logevent_LocalCheckpointStarted {
+ unsigned lci;
+ unsigned keep_gci;
+ unsigned restore_gci;
+ };
+ struct ndb_logevent_LocalCheckpointCompleted {
+ unsigned lci;
+ };
+ struct ndb_logevent_LCPStoppedInCalcKeepGci {
+ unsigned data;
+ };
+ struct ndb_logevent_LCPFragmentCompleted {
+ unsigned node;
+ unsigned table_id;
+ unsigned fragment_id;
+ };
+ struct ndb_logevent_UndoLogBlocked {
+ unsigned acc_count;
+ unsigned tup_count;
+ };
+
+ /* STARTUP */
+ struct ndb_logevent_NDBStartStarted {
+ unsigned version;
+ };
+ struct ndb_logevent_NDBStartCompleted {
+ unsigned version;
+ };
+ struct ndb_logevent_STTORRYRecieved {
+ };
+ struct ndb_logevent_StartPhaseCompleted {
+ unsigned phase;
+ unsigned starttype;
+ };
+ struct ndb_logevent_CM_REGCONF {
+ unsigned own_id;
+ unsigned president_id;
+ unsigned dynamic_id;
+ };
+ struct ndb_logevent_CM_REGREF {
+ unsigned own_id;
+ unsigned other_id;
+ unsigned cause;
+ };
+ struct ndb_logevent_FIND_NEIGHBOURS {
+ unsigned own_id;
+ unsigned left_id;
+ unsigned right_id;
+ unsigned dynamic_id;
+ };
+ struct ndb_logevent_NDBStopStarted {
+ unsigned stoptype;
+ };
+ struct ndb_logevent_NDBStopCompleted {
+ unsigned action;
+ unsigned signum;
+ };
+ struct ndb_logevent_NDBStopForced {
+ unsigned action;
+ unsigned signum;
+ unsigned error;
+ unsigned sphase;
+ unsigned extra;
+ };
+ struct ndb_logevent_NDBStopAborted {
+ };
+ struct ndb_logevent_StartREDOLog {
+ unsigned node;
+ unsigned keep_gci;
+ unsigned completed_gci;
+ unsigned restorable_gci;
+ };
+ struct ndb_logevent_StartLog {
+ unsigned log_part;
+ unsigned start_mb;
+ unsigned stop_mb;
+ unsigned gci;
+ };
+ struct ndb_logevent_UNDORecordsExecuted {
+ unsigned block;
+ unsigned data1;
+ unsigned data2;
+ unsigned data3;
+ unsigned data4;
+ unsigned data5;
+ unsigned data6;
+ unsigned data7;
+ unsigned data8;
+ unsigned data9;
+ unsigned data10;
+ };
+
+ /* NODERESTART */
+ struct ndb_logevent_NR_CopyDict {
+ };
+ struct ndb_logevent_NR_CopyDistr {
+ };
+ struct ndb_logevent_NR_CopyFragsStarted {
+ unsigned dest_node;
+ };
+ struct ndb_logevent_NR_CopyFragDone {
+ unsigned dest_node;
+ unsigned table_id;
+ unsigned fragment_id;
+ };
+ struct ndb_logevent_NR_CopyFragsCompleted {
+ unsigned dest_node;
+ };
+
+ struct ndb_logevent_NodeFailCompleted {
+ unsigned block; /* 0 = all */
+ unsigned failed_node;
+ unsigned completing_node; /* 0 = all */
+ };
+ struct ndb_logevent_NODE_FAILREP {
+ unsigned failed_node;
+ unsigned failure_state;
+ };
+ struct ndb_logevent_ArbitState {
+ unsigned code; /* code & state << 16 */
+ unsigned arbit_node;
+ unsigned ticket_0;
+ unsigned ticket_1;
+ /* TODO */
+ };
+ struct ndb_logevent_ArbitResult {
+ unsigned code; /* code & state << 16 */
+ unsigned arbit_node;
+ unsigned ticket_0;
+ unsigned ticket_1;
+ /* TODO */
+ };
+ struct ndb_logevent_GCP_TakeoverStarted {
+ };
+ struct ndb_logevent_GCP_TakeoverCompleted {
+ };
+ struct ndb_logevent_LCP_TakeoverStarted {
+ };
+ struct ndb_logevent_LCP_TakeoverCompleted {
+ unsigned state;
+ };
+
+ /* STATISTIC */
+ struct ndb_logevent_TransReportCounters {
+ unsigned trans_count;
+ unsigned commit_count;
+ unsigned read_count;
+ unsigned simple_read_count;
+ unsigned write_count;
+ unsigned attrinfo_count;
+ unsigned conc_op_count;
+ unsigned abort_count;
+ unsigned scan_count;
+ unsigned range_scan_count;
+ };
+ struct ndb_logevent_OperationReportCounters {
+ unsigned ops;
+ };
+ struct ndb_logevent_TableCreated {
+ unsigned table_id;
+ };
+ struct ndb_logevent_JobStatistic {
+ unsigned mean_loop_count;
+ };
+ struct ndb_logevent_SendBytesStatistic {
+ unsigned to_node;
+ unsigned mean_sent_bytes;
+ };
+ struct ndb_logevent_ReceiveBytesStatistic {
+ unsigned from_node;
+ unsigned mean_received_bytes;
+ };
+ struct ndb_logevent_MemoryUsage {
+ int gth;
+ /* union is for compatibility backward.
+ * page_size_kb member variable should be removed in the future
+ */
+ union {
+ unsigned page_size_kb;
+ unsigned page_size_bytes;
+ };
+ unsigned pages_used;
+ unsigned pages_total;
+ unsigned block;
+ };
+
+ /* ERROR */
+ struct ndb_logevent_TransporterError {
+ unsigned to_node;
+ unsigned code;
+ };
+ struct ndb_logevent_TransporterWarning {
+ unsigned to_node;
+ unsigned code;
+ };
+ struct ndb_logevent_MissedHeartbeat {
+ unsigned node;
+ unsigned count;
+ };
+ struct ndb_logevent_DeadDueToHeartbeat {
+ unsigned node;
+ };
+ struct ndb_logevent_WarningEvent {
+ /* TODO */
+ };
+
+ /* INFO */
+ struct ndb_logevent_SentHeartbeat {
+ unsigned node;
+ };
+ struct ndb_logevent_CreateLogBytes {
+ unsigned node;
+ };
+ struct ndb_logevent_InfoEvent {
+ /* TODO */
+ };
+ struct ndb_logevent_EventBufferStatus {
+ unsigned usage;
+ unsigned alloc;
+ unsigned max;
+ unsigned apply_gci_l;
+ unsigned apply_gci_h;
+ unsigned latest_gci_l;
+ unsigned latest_gci_h;
+ };
+
+ /** Log event data for @ref NDB_LE_BackupStarted */
+ struct ndb_logevent_BackupStarted {
+ unsigned starting_node;
+ unsigned backup_id;
+ };
+ /** Log event data @ref NDB_LE_BackupFailedToStart */
+ struct ndb_logevent_BackupFailedToStart {
+ unsigned starting_node;
+ unsigned error;
+ };
+ /** Log event data @ref NDB_LE_BackupCompleted */
+ struct ndb_logevent_BackupCompleted {
+ unsigned starting_node;
+ unsigned backup_id;
+ unsigned start_gci;
+ unsigned stop_gci;
+ unsigned n_records;
+ unsigned n_log_records;
+ unsigned n_bytes;
+ unsigned n_log_bytes;
+ };
+ /** Log event data @ref NDB_LE_BackupAborted */
+ struct ndb_logevent_BackupAborted {
+ unsigned starting_node;
+ unsigned backup_id;
+ unsigned error;
+ };
+ /** Log event data @ref NDB_LE_SingleUser */
+ struct ndb_logevent_SingleUser {
+ unsigned type;
+ unsigned node_id;
+ };
+ /** Log even data @ref NDB_LE_StartReport */
+ struct ndb_logevent_StartReport {
+ unsigned report_type;
+ unsigned remaining_time;
+ unsigned bitmask_size;
+ unsigned bitmask_data[1];
+ };
+
/**
* Structure to store and retrieve log event information.
* @see @ref secSLogEvents
@@ -305,354 +599,87 @@ extern "C" {
*/
union {
/* CONNECT */
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned node;
- } Connected;
-
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned node;
- } Disconnected;
-
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned node;
- } CommunicationClosed;
-
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned node;
- } CommunicationOpened;
-
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned node;
- unsigned version;
- } ConnectedApiVersion;
+ struct ndb_logevent_Connected Connected;
+ struct ndb_logevent_Disconnected Disconnected;
+ struct ndb_logevent_CommunicationClosed CommunicationClosed;
+ struct ndb_logevent_CommunicationOpened CommunicationOpened;
+ struct ndb_logevent_ConnectedApiVersion ConnectedApiVersion;
/* CHECKPOINT */
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned gci;
- } GlobalCheckpointStarted;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned gci;
- } GlobalCheckpointCompleted;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned lci;
- unsigned keep_gci;
- unsigned restore_gci;
- } LocalCheckpointStarted;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned lci;
- } LocalCheckpointCompleted;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned data;
- } LCPStoppedInCalcKeepGci;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned node;
- unsigned table_id;
- unsigned fragment_id;
- } LCPFragmentCompleted;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned acc_count;
- unsigned tup_count;
- } UndoLogBlocked;
+ struct ndb_logevent_GlobalCheckpointStarted GlobalCheckpointStarted;
+ struct ndb_logevent_GlobalCheckpointCompleted GlobalCheckpointCompleted;
+ struct ndb_logevent_LocalCheckpointStarted LocalCheckpointStarted;
+ struct ndb_logevent_LocalCheckpointCompleted LocalCheckpointCompleted;
+ struct ndb_logevent_LCPStoppedInCalcKeepGci LCPStoppedInCalcKeepGci;
+ struct ndb_logevent_LCPFragmentCompleted LCPFragmentCompleted;
+ struct ndb_logevent_UndoLogBlocked UndoLogBlocked;
/* STARTUP */
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned version;
- } NDBStartStarted;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned version;
- } NDBStartCompleted;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- } STTORRYRecieved;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned phase;
- unsigned starttype;
- } StartPhaseCompleted;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned own_id;
- unsigned president_id;
- unsigned dynamic_id;
- } CM_REGCONF;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned own_id;
- unsigned other_id;
- unsigned cause;
- } CM_REGREF;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned own_id;
- unsigned left_id;
- unsigned right_id;
- unsigned dynamic_id;
- } FIND_NEIGHBOURS;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned stoptype;
- } NDBStopStarted;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned action;
- unsigned signum;
- } NDBStopCompleted;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned action;
- unsigned signum;
- unsigned error;
- unsigned sphase;
- unsigned extra;
- } NDBStopForced;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- } NDBStopAborted;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned node;
- unsigned keep_gci;
- unsigned completed_gci;
- unsigned restorable_gci;
- } StartREDOLog;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned log_part;
- unsigned start_mb;
- unsigned stop_mb;
- unsigned gci;
- } StartLog;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned block;
- unsigned data1;
- unsigned data2;
- unsigned data3;
- unsigned data4;
- unsigned data5;
- unsigned data6;
- unsigned data7;
- unsigned data8;
- unsigned data9;
- unsigned data10;
- } UNDORecordsExecuted;
+ struct ndb_logevent_NDBStartStarted NDBStartStarted;
+ struct ndb_logevent_NDBStartCompleted NDBStartCompleted;
+ struct ndb_logevent_STTORRYRecieved STTORRYRecieved;
+ struct ndb_logevent_StartPhaseCompleted StartPhaseCompleted;
+ struct ndb_logevent_CM_REGCONF CM_REGCONF;
+ struct ndb_logevent_CM_REGREF CM_REGREF;
+ struct ndb_logevent_FIND_NEIGHBOURS FIND_NEIGHBOURS;
+ struct ndb_logevent_NDBStopStarted NDBStopStarted;
+ struct ndb_logevent_NDBStopCompleted NDBStopCompleted;
+ struct ndb_logevent_NDBStopForced NDBStopForced;
+ struct ndb_logevent_NDBStopAborted NDBStopAborted;
+ struct ndb_logevent_StartREDOLog StartREDOLog;
+ struct ndb_logevent_StartLog StartLog;
+ struct ndb_logevent_UNDORecordsExecuted UNDORecordsExecuted;
/* NODERESTART */
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- } NR_CopyDict;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- } NR_CopyDistr;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned dest_node;
- } NR_CopyFragsStarted;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned dest_node;
- unsigned table_id;
- unsigned fragment_id;
- } NR_CopyFragDone;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned dest_node;
- } NR_CopyFragsCompleted;
-
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned block; /* 0 = all */
- unsigned failed_node;
- unsigned completing_node; /* 0 = all */
- } NodeFailCompleted;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned failed_node;
- unsigned failure_state;
- } NODE_FAILREP;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned code; /* code & state << 16 */
- unsigned arbit_node;
- unsigned ticket_0;
- unsigned ticket_1;
- /* TODO */
- } ArbitState;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned code; /* code & state << 16 */
- unsigned arbit_node;
- unsigned ticket_0;
- unsigned ticket_1;
- /* TODO */
- } ArbitResult;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- } GCP_TakeoverStarted;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- } GCP_TakeoverCompleted;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- } LCP_TakeoverStarted;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned state;
- } LCP_TakeoverCompleted;
+ struct ndb_logevent_NR_CopyDict NR_CopyDict;
+ struct ndb_logevent_NR_CopyDistr NR_CopyDistr;
+ struct ndb_logevent_NR_CopyFragsStarted NR_CopyFragsStarted;
+ struct ndb_logevent_NR_CopyFragDone NR_CopyFragDone;
+ struct ndb_logevent_NR_CopyFragsCompleted NR_CopyFragsCompleted;
+
+ struct ndb_logevent_NodeFailCompleted NodeFailCompleted;
+ struct ndb_logevent_NODE_FAILREP NODE_FAILREP;
+ struct ndb_logevent_ArbitState ArbitState;
+ struct ndb_logevent_ArbitResult ArbitResult;
+ struct ndb_logevent_GCP_TakeoverStarted GCP_TakeoverStarted;
+ struct ndb_logevent_GCP_TakeoverCompleted GCP_TakeoverCompleted;
+ struct ndb_logevent_LCP_TakeoverStarted LCP_TakeoverStarted;
+ struct ndb_logevent_LCP_TakeoverCompleted LCP_TakeoverCompleted;
/* STATISTIC */
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned trans_count;
- unsigned commit_count;
- unsigned read_count;
- unsigned simple_read_count;
- unsigned write_count;
- unsigned attrinfo_count;
- unsigned conc_op_count;
- unsigned abort_count;
- unsigned scan_count;
- unsigned range_scan_count;
- } TransReportCounters;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned ops;
- } OperationReportCounters;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned table_id;
- } TableCreated;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned mean_loop_count;
- } JobStatistic;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned to_node;
- unsigned mean_sent_bytes;
- } SendBytesStatistic;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned from_node;
- unsigned mean_received_bytes;
- } ReceiveBytesStatistic;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- int gth;
- /* union is for compatibility backward.
- * page_size_kb member variable should be removed in the future
- */
- union {
- unsigned page_size_kb;
- unsigned page_size_bytes;
- };
- unsigned pages_used;
- unsigned pages_total;
- unsigned block;
- } MemoryUsage;
+ struct ndb_logevent_TransReportCounters TransReportCounters;
+ struct ndb_logevent_OperationReportCounters OperationReportCounters;
+ struct ndb_logevent_TableCreated TableCreated;
+ struct ndb_logevent_JobStatistic JobStatistic;
+ struct ndb_logevent_SendBytesStatistic SendBytesStatistic;
+ struct ndb_logevent_ReceiveBytesStatistic ReceiveBytesStatistic;
+ struct ndb_logevent_MemoryUsage MemoryUsage;
/* ERROR */
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned to_node;
- unsigned code;
- } TransporterError;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned to_node;
- unsigned code;
- } TransporterWarning;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned node;
- unsigned count;
- } MissedHeartbeat;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned node;
- } DeadDueToHeartbeat;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- /* TODO */
- } WarningEvent;
+ struct ndb_logevent_TransporterError TransporterError;
+ struct ndb_logevent_TransporterWarning TransporterWarning;
+ struct ndb_logevent_MissedHeartbeat MissedHeartbeat;
+ struct ndb_logevent_DeadDueToHeartbeat DeadDueToHeartbeat;
+ struct ndb_logevent_WarningEvent WarningEvent;
/* INFO */
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned node;
- } SentHeartbeat;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned node;
- } CreateLogBytes;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- /* TODO */
- } InfoEvent;
- /** Log event specific data for for corresponding NDB_LE_ log event */
- struct {
- unsigned usage;
- unsigned alloc;
- unsigned max;
- unsigned apply_gci_l;
- unsigned apply_gci_h;
- unsigned latest_gci_l;
- unsigned latest_gci_h;
- } EventBufferStatus;
+ struct ndb_logevent_SentHeartbeat SentHeartbeat;
+ struct ndb_logevent_CreateLogBytes CreateLogBytes;
+ struct ndb_logevent_InfoEvent InfoEvent;
+ struct ndb_logevent_EventBufferStatus EventBufferStatus;
/** Log event data for @ref NDB_LE_BackupStarted */
- struct {
- unsigned starting_node;
- unsigned backup_id;
- } BackupStarted;
+ struct ndb_logevent_BackupStarted BackupStarted;
/** Log event data @ref NDB_LE_BackupFailedToStart */
- struct {
- unsigned starting_node;
- unsigned error;
- } BackupFailedToStart;
+ struct ndb_logevent_BackupFailedToStart BackupFailedToStart;
/** Log event data @ref NDB_LE_BackupCompleted */
- struct {
- unsigned starting_node;
- unsigned backup_id;
- unsigned start_gci;
- unsigned stop_gci;
- unsigned n_records;
- unsigned n_log_records;
- unsigned n_bytes;
- unsigned n_log_bytes;
- } BackupCompleted;
+ struct ndb_logevent_BackupCompleted BackupCompleted;
/** Log event data @ref NDB_LE_BackupAborted */
- struct {
- unsigned starting_node;
- unsigned backup_id;
- unsigned error;
- } BackupAborted;
+ struct ndb_logevent_BackupAborted BackupAborted;
/** Log event data @ref NDB_LE_SingleUser */
- struct {
- unsigned type;
- unsigned node_id;
- } SingleUser;
+ struct ndb_logevent_SingleUser SingleUser;
/** Log even data @ref NDB_LE_StartReport */
- struct {
- unsigned report_type;
- unsigned remaining_time;
- unsigned bitmask_size;
- unsigned bitmask_data[1];
- } StartReport;
+ struct ndb_logevent_StartReport StartReport;
#ifndef DOXYGEN_FIX
};
#else
=== modified file 'storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2008-01-04 10:34:23 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2009-09-01 12:32:26 +0000
@@ -7521,8 +7521,8 @@ void Dbdict::execGET_TABINFOREQ(Signal*
return;
}
releaseSections(signal);
-
- DictObject * old_ptr_p = old_ptr_p = get_object(tableName, len);
+
+ DictObject * old_ptr_p = get_object(tableName, len);
if(old_ptr_p)
obj_id = old_ptr_p->m_id;
} else {
=== modified file 'storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp'
--- a/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp 2007-08-27 18:58:49 +0000
+++ b/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp 2009-09-02 11:45:48 +0000
@@ -106,8 +106,13 @@ void
AsyncFile::doStart()
{
// Stacksize for filesystem threads
- // An 8k stack should be enough
+#if !defined(DBUG_OFF) && defined (__hpux)
+ // Empirical evidence indicates at least 32k
+ const NDB_THREAD_STACKSIZE stackSize = 32768;
+#else
+ // Otherwise an 8k stack should be enough
const NDB_THREAD_STACKSIZE stackSize = 8192;
+#endif
char buf[16];
numAsyncFiles++;
=== modified file 'storage/ndb/src/mgmsrv/InitConfigFileParser.cpp'
--- a/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp 2007-05-24 10:24:36 +0000
+++ b/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp 2009-09-01 12:32:26 +0000
@@ -208,11 +208,10 @@ InitConfigFileParser::run_config_rules(C
ctx.m_config->put("NoOfNodes", nNodes);
char tmpLine[MAX_LINE_LENGTH];
- BaseString::snprintf(tmpLine, MAX_LINE_LENGTH, "EXTERNAL SYSTEM_");
- strncat(tmpLine, system, MAX_LINE_LENGTH);
- strncat(tmpLine, ":NoOfConnections", MAX_LINE_LENGTH);
+ BaseString::snprintf(tmpLine, MAX_LINE_LENGTH,
+ "EXTERNAL SYSTEM_%s:NoOfConnections", system);
ctx.m_config->put(tmpLine, nExtConnections);
-
+
Config * ret = new Config();
ret->m_configValues = (struct ndb_mgm_configuration*)ctx.m_configValues.getConfigValues();
ret->m_oldConfig = ctx.m_config; ctx.m_config = 0;
=== modified file 'strings/ctype-ucs2.c'
--- a/strings/ctype-ucs2.c 2009-07-02 10:15:33 +0000
+++ b/strings/ctype-ucs2.c 2009-10-15 21:38:29 +0000
@@ -203,11 +203,10 @@ static int my_strnncoll_ucs2(CHARSET_INF
my_bool t_is_prefix)
{
int s_res,t_res;
- my_wc_t s_wc,t_wc;
+ my_wc_t UNINIT_VAR(s_wc),t_wc;
const uchar *se=s+slen;
const uchar *te=t+tlen;
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
- LINT_INIT(s_wc);
while ( s < se && t < te )
{
@@ -318,12 +317,10 @@ static int my_strncasecmp_ucs2(CHARSET_I
const char *s, const char *t, size_t len)
{
int s_res,t_res;
- my_wc_t s_wc,t_wc;
+ my_wc_t UNINIT_VAR(s_wc),t_wc;
const char *se=s+len;
const char *te=t+len;
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
- LINT_INIT(s_wc);
- LINT_INIT(t_wc);
while ( s < se && t < te )
{
@@ -1387,11 +1384,9 @@ int my_strnncoll_ucs2_bin(CHARSET_INFO *
my_bool t_is_prefix)
{
int s_res,t_res;
- my_wc_t s_wc,t_wc;
+ my_wc_t UNINIT_VAR(s_wc),t_wc;
const uchar *se=s+slen;
const uchar *te=t+tlen;
- LINT_INIT(s_wc);
- LINT_INIT(t_wc);
while ( s < se && t < te )
{
=== modified file 'strings/ctype-utf8.c'
--- a/strings/ctype-utf8.c 2009-07-02 10:15:33 +0000
+++ b/strings/ctype-utf8.c 2009-10-15 21:38:29 +0000
@@ -2310,12 +2310,10 @@ static int my_strnncoll_utf8(CHARSET_INF
my_bool t_is_prefix)
{
int s_res,t_res;
- my_wc_t s_wc,t_wc;
+ my_wc_t UNINIT_VAR(s_wc), t_wc;
const uchar *se=s+slen;
const uchar *te=t+tlen;
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
- LINT_INIT(s_wc);
- LINT_INIT(t_wc);
while ( s < se && t < te )
{
@@ -2382,11 +2380,9 @@ static int my_strnncollsp_utf8(CHARSET_I
my_bool diff_if_only_endspace_difference)
{
int s_res, t_res, res;
- my_wc_t s_wc,t_wc;
+ my_wc_t UNINIT_VAR(s_wc),t_wc;
const uchar *se= s+slen, *te= t+tlen;
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
- LINT_INIT(s_wc);
- LINT_INIT(t_wc);
#ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE
diff_if_only_endspace_difference= 0;
=== modified file 'strings/decimal.c'
--- a/strings/decimal.c 2009-09-15 10:46:35 +0000
+++ b/strings/decimal.c 2009-10-15 21:38:29 +0000
@@ -1365,8 +1365,7 @@ int bin2decimal(const uchar *from, decim
if (intg0x)
{
int i=dig2bytes[intg0x];
- dec1 x;
- LINT_INIT(x);
+ dec1 UNINIT_VAR(x);
switch (i)
{
case 1: x=mi_sint1korr(from); break;
@@ -1407,8 +1406,7 @@ int bin2decimal(const uchar *from, decim
if (frac0x)
{
int i=dig2bytes[frac0x];
- dec1 x;
- LINT_INIT(x);
+ dec1 UNINIT_VAR(x);
switch (i)
{
case 1: x=mi_sint1korr(from); break;
@@ -1486,7 +1484,7 @@ decimal_round(decimal_t *from, decimal_t
decimal_round_mode mode)
{
int frac0=scale>0 ? ROUND_UP(scale) : scale/DIG_PER_DEC1,
- frac1=ROUND_UP(from->frac), round_digit,
+ frac1=ROUND_UP(from->frac), UNINIT_VAR(round_digit),
intg0=ROUND_UP(from->intg), error=E_DEC_OK, len=to->len,
intg1=ROUND_UP(from->intg +
(((intg0 + frac0)>0) && (from->buf[0] == DIG_MAX)));
@@ -1495,7 +1493,6 @@ decimal_round(decimal_t *from, decimal_t
sanity(to);
- LINT_INIT(round_digit);
switch (mode) {
case HALF_UP:
case HALF_EVEN: round_digit=5; break;
@@ -2123,13 +2120,11 @@ static int do_div_mod(decimal_t *from1,
{
int frac1=ROUND_UP(from1->frac)*DIG_PER_DEC1, prec1=from1->intg+frac1,
frac2=ROUND_UP(from2->frac)*DIG_PER_DEC1, prec2=from2->intg+frac2,
- error, i, intg0, frac0, len1, len2, dintg, div_mod=(!mod);
+ UNINIT_VAR(error), i, intg0, frac0, len1, len2, dintg, div_mod=(!mod);
dec1 *buf0, *buf1=from1->buf, *buf2=from2->buf, *tmp1,
*start2, *stop2, *stop1, *stop0, norm2, carry, *start1, dcarry;
dec2 norm_factor, x, guess, y;
- LINT_INIT(error);
-
if (mod)
to=mod;
=== modified file 'support-files/mysql.spec.sh'
--- a/support-files/mysql.spec.sh 2009-09-15 12:12:51 +0000
+++ b/support-files/mysql.spec.sh 2009-10-15 21:38:29 +0000
@@ -926,7 +926,7 @@ fi
- Install plugin libraries in appropriate packages.
- Disable libdaemon_example and ftexample plugins.
-* Thu Aug 20 2009 Jonathan Perkin <jperkin@stripped>
+* Thu Aug 20 2009 Jonathan Perkin <jperkin(a)sun.com>
- Update variable used for mysql-test suite location to match source.
=== modified file 'tests/mysql_client_test.c'
--- a/tests/mysql_client_test.c 2009-09-07 20:50:10 +0000
+++ b/tests/mysql_client_test.c 2009-10-15 21:38:29 +0000
@@ -4267,7 +4267,7 @@ static void test_fetch_date()
myheader("test_fetch_date");
- /* Will not work if sql_mode is NO_ZERO_DATE (implicit if TRADITIONAL) /*/
+ /* Will not work if sql_mode is NO_ZERO_DATE (implicit if TRADITIONAL) */
rc= mysql_query(mysql, "SET SQL_MODE=''");
myquery(rc);
@@ -17004,7 +17004,7 @@ static void test_bug20023()
{
MYSQL con;
- int sql_big_selects_orig;
+ int sql_big_selects_orig= 0;
/*
Type of max_join_size is ha_rows, which might be ulong or off_t
depending on the platform or configure options. Preserve the string
@@ -17012,10 +17012,10 @@ static void test_bug20023()
*/
char max_join_size_orig[32];
- int sql_big_selects_2;
- int sql_big_selects_3;
- int sql_big_selects_4;
- int sql_big_selects_5;
+ int sql_big_selects_2= 0;
+ int sql_big_selects_3= 0;
+ int sql_big_selects_4= 0;
+ int sql_big_selects_5= 0;
char query_buffer[MAX_TEST_QUERY_LENGTH];
@@ -17154,7 +17154,7 @@ static void bug31418_impl()
MYSQL con;
my_bool is_null;
- int rc;
+ int rc= 0;
/* Create a new connection. */
1
0
[Maria-developers] Updated (by Psergey): Windows installer for MariaDB (55)
by worklog-noreply@askmonty.org 15 Oct '09
by worklog-noreply@askmonty.org 15 Oct '09
15 Oct '09
-----------------------------------------------------------------------
WORKLOG TASK
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
TASK...........: Windows installer for MariaDB
CREATION DATE..: Wed, 14 Oct 2009, 00:07
SUPERVISOR.....: Monty
IMPLEMENTOR....:
COPIES TO......:
CATEGORY.......: Server-RawIdeaBin
TASK ID........: 55 (http://askmonty.org/worklog/?tid=55)
VERSION........: Server-9.x
STATUS.........: Un-Assigned
PRIORITY.......: 60
WORKED HOURS...: 0
ESTIMATE.......: 0 (hours remain)
ORIG. ESTIMATE.: 0
PROGRESS NOTES:
-=-=(Psergey - Thu, 15 Oct 2009, 23:46)=-=-
High-Level Specification modified.
--- /tmp/wklog.55.old.23061 2009-10-15 23:46:18.000000000 +0300
+++ /tmp/wklog.55.new.23061 2009-10-15 23:46:18.000000000 +0300
@@ -7,28 +7,25 @@
1.1 Step 1: simple installer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An installer package that
-- Copies files on installation
-- Registers mysqld a service
-- Prompts the user for "essential" configuration options. Preliminary list
- of "essential" options:
+- Presents the user with GPL licence
+- Prompts the user for "essential" configuration options:
* Install directory
- Data directory (see email from Peter Laursen on maria-developers@ dated
14-10-2009 about data directory, Vista and UAC)
* root password
* default character set
- * TODO come up with the final list. The criteria for inclusion are:
- 1. ask for things that are essential to have a working setup as soon as
- the installation is complete
- 2. ask for things without answers for which the newbies can get into
- trouble.
-
+ * [possibly] sql_mode setting.
- Checks if the target installation directory, TCP port, or named pipe are
- busy. If they are, it asks to remove the previous installation first
- and aborts. (that is: upgrades are not supported in step#1)
+ busy. If they are, offers to either change these parameters or abort the
+ installation (that is: no support for any kind of upgrades at this point)
+- Copies installation files to appropriate destination
+- Registers mysqld a service
- Generates appropriate my.cnf file
-- Sets up SQL user with specified password
+- Sets up SQL root user with the specified password
- Adds start menu items
- to start the server manually (with --console)
+ (note: starting server manually requires write access to datadir, which
+ not all users will have. what to do?)
- to start mysql client
- to edit the my.cnf file.
- Registers MariaDB to start as a service with the specified parameters.
@@ -53,7 +50,7 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Installer should include configuration wizard that's similar to what MySQL
installer does.
- TODO come up with options
+ TODO come up with a list of options to set.
1.4 Items not on the wishlist
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-=-=(Psergey - Thu, 15 Oct 2009, 23:40)=-=-
High-Level Specification modified.
--- /tmp/wklog.55.old.22795 2009-10-15 23:40:36.000000000 +0300
+++ /tmp/wklog.55.new.22795 2009-10-15 23:40:36.000000000 +0300
@@ -7,7 +7,8 @@
1.1 Step 1: simple installer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An installer package that
-- Shows GPL Licence
+- Copies files on installation
+- Registers mysqld a service
- Prompts the user for "essential" configuration options. Preliminary list
of "essential" options:
* Install directory
@@ -15,27 +16,28 @@
14-10-2009 about data directory, Vista and UAC)
* root password
* default character set
- * [perhaps] sql_mode setting.
+ * TODO come up with the final list. The criteria for inclusion are:
+ 1. ask for things that are essential to have a working setup as soon as
+ the installation is complete
+ 2. ask for things without answers for which the newbies can get into
+ trouble.
-- Copies files to destination directories
- Checks if the target installation directory, TCP port, or named pipe are
busy. If they are, it asks to remove the previous installation first
and aborts. (that is: upgrades are not supported in step#1)
-- Generates appropriate my.cnf file (from a template)
-- Sets up SQL root user with specified password
+- Generates appropriate my.cnf file
+- Sets up SQL user with specified password
- Adds start menu items
- to start the server manually (with --console)
- (note: will this work from any user, and on any OS? if not, this might
- be omitted)
- to start mysql client
- - to edit the my.cnf file
-- Registers MariaDB to start as a service with the specified parameters
-- Registers MariaDB as installed software, sets up uninstaller
+ - to edit the my.cnf file.
+- Registers MariaDB to start as a service with the specified parameters.
+- Registers MariaDB as installed software, sets up uninstaller.
(TODO: should the uninstaller the datadir or leave it? (or ask the user?))
- Creates installation log, and in case of any failures presents the log to
the user and requests to file it as a bug (How far we should go here depends
- on how complex and error-prone the installation procedure will end up being).
+ on how complex and error-prone the final installation procedure will be).
1.2 Step 2: Upgrades from MySQL or MariaDB
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-=-=(Psergey - Thu, 15 Oct 2009, 23:40)=-=-
High-Level Specification modified.
--- /tmp/wklog.55.old.22774 2009-10-15 23:40:16.000000000 +0300
+++ /tmp/wklog.55.new.22774 2009-10-15 23:40:16.000000000 +0300
@@ -15,13 +15,9 @@
14-10-2009 about data directory, Vista and UAC)
* root password
* default character set
- * TODO come up with the final list. The criteria for inclusion are:
- 1. ask for things that are essential to have a working setup as soon as
- the installation is complete
- 2. ask for things without answers for which the newbies can get into
- trouble.
+ * [perhaps] sql_mode setting.
-- Copies files to destination directory
+- Copies files to destination directories
- Checks if the target installation directory, TCP port, or named pipe are
busy. If they are, it asks to remove the previous installation first
and aborts. (that is: upgrades are not supported in step#1)
@@ -29,6 +25,8 @@
- Sets up SQL root user with specified password
- Adds start menu items
- to start the server manually (with --console)
+ (note: will this work from any user, and on any OS? if not, this might
+ be omitted)
- to start mysql client
- to edit the my.cnf file
- Registers MariaDB to start as a service with the specified parameters
-=-=(Psergey - Thu, 15 Oct 2009, 23:38)=-=-
High-Level Specification modified.
--- /tmp/wklog.55.old.22618 2009-10-15 23:38:06.000000000 +0300
+++ /tmp/wklog.55.new.22618 2009-10-15 23:38:06.000000000 +0300
@@ -7,8 +7,7 @@
1.1 Step 1: simple installer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An installer package that
-- Copies files on installation
-- Registers mysqld a service
+- Shows GPL Licence
- Prompts the user for "essential" configuration options. Preliminary list
of "essential" options:
* Install directory
@@ -22,22 +21,23 @@
2. ask for things without answers for which the newbies can get into
trouble.
+- Copies files to destination directory
- Checks if the target installation directory, TCP port, or named pipe are
busy. If they are, it asks to remove the previous installation first
and aborts. (that is: upgrades are not supported in step#1)
-- Generates appropriate my.cnf file
-- Sets up SQL user with specified password
+- Generates appropriate my.cnf file (from a template)
+- Sets up SQL root user with specified password
- Adds start menu items
- to start the server manually (with --console)
- to start mysql client
- - to edit the my.cnf file.
-- Registers MariaDB to start as a service with the specified parameters.
-- Registers MariaDB as installed software, sets up uninstaller.
+ - to edit the my.cnf file
+- Registers MariaDB to start as a service with the specified parameters
+- Registers MariaDB as installed software, sets up uninstaller
(TODO: should the uninstaller the datadir or leave it? (or ask the user?))
- Creates installation log, and in case of any failures presents the log to
the user and requests to file it as a bug (How far we should go here depends
- on how complex and error-prone the final installation procedure will be).
+ on how complex and error-prone the installation procedure will end up being).
1.2 Step 2: Upgrades from MySQL or MariaDB
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-=-=(Psergey - Thu, 15 Oct 2009, 16:34)=-=-
High-Level Specification modified.
--- /tmp/wklog.55.old.3919 2009-10-15 16:34:22.000000000 +0300
+++ /tmp/wklog.55.new.3919 2009-10-15 16:34:22.000000000 +0300
@@ -81,6 +81,6 @@
3. Other notes
--------------
-* MySQL's logo is the seal. It can be found here:
+* MariaDB's logo is the seal. It can be found here:
http://askmonty.org/wiki/index.php/MariaDB_Logo
-=-=(Bothorsen - Thu, 15 Oct 2009, 15:40)=-=-
High-Level Specification modified.
--- /tmp/wklog.55.old.1396 2009-10-15 15:40:03.000000000 +0300
+++ /tmp/wklog.55.new.1396 2009-10-15 15:40:03.000000000 +0300
@@ -81,6 +81,6 @@
3. Other notes
--------------
-* MySQL's logo is the seal (see e.g. here: https://code.launchpad.net/maria)
- Bo Thorsen has the latest revision of the picture in various formats.
+* MySQL's logo is the seal. It can be found here:
+http://askmonty.org/wiki/index.php/MariaDB_Logo
-=-=(Psergey - Thu, 15 Oct 2009, 15:22)=-=-
High-Level Specification modified.
--- /tmp/wklog.55.old.466 2009-10-15 15:22:05.000000000 +0300
+++ /tmp/wklog.55.new.466 2009-10-15 15:22:05.000000000 +0300
@@ -16,7 +16,7 @@
14-10-2009 about data directory, Vista and UAC)
* root password
* default character set
- * <TODO come up with the final list. The criteria for inclusion are:
+ * TODO come up with the final list. The criteria for inclusion are:
1. ask for things that are essential to have a working setup as soon as
the installation is complete
2. ask for things without answers for which the newbies can get into
@@ -25,11 +25,14 @@
- Checks if the target installation directory, TCP port, or named pipe are
busy. If they are, it asks to remove the previous installation first
and aborts. (that is: upgrades are not supported in step#1)
+- Generates appropriate my.cnf file
+- Sets up SQL user with specified password
- Adds start menu items
- to start the server manually (with --console)
- to start mysql client
- to edit the my.cnf file.
-- Registers MariaDB as installed, sets up uninstaller.
+- Registers MariaDB to start as a service with the specified parameters.
+- Registers MariaDB as installed software, sets up uninstaller.
(TODO: should the uninstaller the datadir or leave it? (or ask the user?))
- Creates installation log, and in case of any failures presents the log to
@@ -54,9 +57,10 @@
1.4 Items not on the wishlist
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-This is a list of things that one might want an installer to do but that are out
-of scope of this WL entry.
-* Calibration of my.cnf parameters based on available memory, number of CPUs, etc.
+This is a list of things that one might want an installer to do but that are
+out of scope of this WL entry:
+* Calibration of my.cnf parameters based on available memory, number of CPUs,
+ etc.
2. Installer wishlist (developer POV)
-=-=(Psergey - Thu, 15 Oct 2009, 15:17)=-=-
High-Level Specification modified.
--- /tmp/wklog.55.old.32703 2009-10-15 15:17:17.000000000 +0300
+++ /tmp/wklog.55.new.32703 2009-10-15 15:17:17.000000000 +0300
@@ -24,7 +24,7 @@
- Checks if the target installation directory, TCP port, or named pipe are
busy. If they are, it asks to remove the previous installation first
- and aborts.
+ and aborts. (that is: upgrades are not supported in step#1)
- Adds start menu items
- to start the server manually (with --console)
- to start mysql client
@@ -36,8 +36,8 @@
the user and requests to file it as a bug (How far we should go here depends
on how complex and error-prone the final installation procedure will be).
-1.2 Step 2: upgrades from MySQL
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+1.2 Step 2: Upgrades from MySQL or MariaDB
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Same as above but with handling of the case where MySQL has been already
installed:
- offer to replace MySQL.
-=-=(Psergey - Thu, 15 Oct 2009, 15:15)=-=-
High-Level Specification modified.
--- /tmp/wklog.55.old.32588 2009-10-15 15:15:27.000000000 +0300
+++ /tmp/wklog.55.new.32588 2009-10-15 15:15:27.000000000 +0300
@@ -52,6 +52,13 @@
installer does.
TODO come up with options
+1.4 Items not on the wishlist
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+This is a list of things that one might want an installer to do but that are out
+of scope of this WL entry.
+* Calibration of my.cnf parameters based on available memory, number of CPUs, etc.
+
+
2. Installer wishlist (developer POV)
-------------------------------------
* Some "installshield-like" tool that's easy to use (suggestion by Webyog:
-=-=(Psergey - Thu, 15 Oct 2009, 13:15)=-=-
High-Level Specification modified.
--- /tmp/wklog.55.old.27290 2009-10-15 13:15:59.000000000 +0300
+++ /tmp/wklog.55.new.27290 2009-10-15 13:15:59.000000000 +0300
@@ -11,7 +11,9 @@
- Registers mysqld a service
- Prompts the user for "essential" configuration options. Preliminary list
of "essential" options:
- * Destination directory
+ * Install directory
+ - Data directory (see email from Peter Laursen on maria-developers@ dated
+ 14-10-2009 about data directory, Vista and UAC)
* root password
* default character set
* <TODO come up with the final list. The criteria for inclusion are:
------------------------------------------------------------
-=-=(View All Progress Notes, 14 total)=-=-
http://askmonty.org/worklog/index.pl?tid=55&nolimit=1
DESCRIPTION:
We need Windows Installer package for MariaDB.
HIGH-LEVEL SPECIFICATION:
Not a spec so far but a list of points to consider:
1. Installer wishlist (user POV)
--------------------------------
>From the user point of view:
1.1 Step 1: simple installer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An installer package that
- Presents the user with GPL licence
- Prompts the user for "essential" configuration options:
* Install directory
- Data directory (see email from Peter Laursen on maria-developers@ dated
14-10-2009 about data directory, Vista and UAC)
* root password
* default character set
* [possibly] sql_mode setting.
- Checks if the target installation directory, TCP port, or named pipe are
busy. If they are, offers to either change these parameters or abort the
installation (that is: no support for any kind of upgrades at this point)
- Copies installation files to appropriate destination
- Registers mysqld a service
- Generates appropriate my.cnf file
- Sets up SQL root user with the specified password
- Adds start menu items
- to start the server manually (with --console)
(note: starting server manually requires write access to datadir, which
not all users will have. what to do?)
- to start mysql client
- to edit the my.cnf file.
- Registers MariaDB to start as a service with the specified parameters.
- Registers MariaDB as installed software, sets up uninstaller.
(TODO: should the uninstaller the datadir or leave it? (or ask the user?))
- Creates installation log, and in case of any failures presents the log to
the user and requests to file it as a bug (How far we should go here depends
on how complex and error-prone the final installation procedure will be).
1.2 Step 2: Upgrades from MySQL or MariaDB
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Same as above but with handling of the case where MySQL has been already
installed:
- offer to replace MySQL.
- upgrade the data directory (todo we should sort out if anything/what is
needed for this).
- Uninstall MySQL
- Install MariaDB.
1.3 Step 3: Configuration wizard
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Installer should include configuration wizard that's similar to what MySQL
installer does.
TODO come up with a list of options to set.
1.4 Items not on the wishlist
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is a list of things that one might want an installer to do but that are
out of scope of this WL entry:
* Calibration of my.cnf parameters based on available memory, number of CPUs,
etc.
2. Installer wishlist (developer POV)
-------------------------------------
* Some "installshield-like" tool that's easy to use (suggestion by Webyog:
NSIS)
* Installation procedure source should reside in MariaDB source repository
* Installation procedure source file is better to be in human-readable text
format.
* It should be possible to automate creation of the installer package, in a way
that can be run from buildbot (e.g. the installer package build process
should print messages to its stdout)
* Any suggestions on how can one automatically test the installation package?
(for example, we'll want to start the installer, install, check that
installation succeeded, then start the server, run some commands, then
uninstall. Any ways to achieve that?)
3. Other notes
--------------
* MariaDB's logo is the seal. It can be found here:
http://askmonty.org/wiki/index.php/MariaDB_Logo
ESTIMATED WORK TIME
ESTIMATED COMPLETION DATE
-----------------------------------------------------------------------
WorkLog (v3.5.9)
1
0
[Maria-developers] Updated (by Psergey): Windows installer for MariaDB (55)
by worklog-noreply@askmonty.org 15 Oct '09
by worklog-noreply@askmonty.org 15 Oct '09
15 Oct '09
-----------------------------------------------------------------------
WORKLOG TASK
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
TASK...........: Windows installer for MariaDB
CREATION DATE..: Wed, 14 Oct 2009, 00:07
SUPERVISOR.....: Monty
IMPLEMENTOR....:
COPIES TO......:
CATEGORY.......: Server-RawIdeaBin
TASK ID........: 55 (http://askmonty.org/worklog/?tid=55)
VERSION........: Server-9.x
STATUS.........: Un-Assigned
PRIORITY.......: 60
WORKED HOURS...: 0
ESTIMATE.......: 0 (hours remain)
ORIG. ESTIMATE.: 0
PROGRESS NOTES:
-=-=(Psergey - Thu, 15 Oct 2009, 23:46)=-=-
High-Level Specification modified.
--- /tmp/wklog.55.old.23061 2009-10-15 23:46:18.000000000 +0300
+++ /tmp/wklog.55.new.23061 2009-10-15 23:46:18.000000000 +0300
@@ -7,28 +7,25 @@
1.1 Step 1: simple installer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An installer package that
-- Copies files on installation
-- Registers mysqld a service
-- Prompts the user for "essential" configuration options. Preliminary list
- of "essential" options:
+- Presents the user with GPL licence
+- Prompts the user for "essential" configuration options:
* Install directory
- Data directory (see email from Peter Laursen on maria-developers@ dated
14-10-2009 about data directory, Vista and UAC)
* root password
* default character set
- * TODO come up with the final list. The criteria for inclusion are:
- 1. ask for things that are essential to have a working setup as soon as
- the installation is complete
- 2. ask for things without answers for which the newbies can get into
- trouble.
-
+ * [possibly] sql_mode setting.
- Checks if the target installation directory, TCP port, or named pipe are
- busy. If they are, it asks to remove the previous installation first
- and aborts. (that is: upgrades are not supported in step#1)
+ busy. If they are, offers to either change these parameters or abort the
+ installation (that is: no support for any kind of upgrades at this point)
+- Copies installation files to appropriate destination
+- Registers mysqld a service
- Generates appropriate my.cnf file
-- Sets up SQL user with specified password
+- Sets up SQL root user with the specified password
- Adds start menu items
- to start the server manually (with --console)
+ (note: starting server manually requires write access to datadir, which
+ not all users will have. what to do?)
- to start mysql client
- to edit the my.cnf file.
- Registers MariaDB to start as a service with the specified parameters.
@@ -53,7 +50,7 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Installer should include configuration wizard that's similar to what MySQL
installer does.
- TODO come up with options
+ TODO come up with a list of options to set.
1.4 Items not on the wishlist
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-=-=(Psergey - Thu, 15 Oct 2009, 23:40)=-=-
High-Level Specification modified.
--- /tmp/wklog.55.old.22795 2009-10-15 23:40:36.000000000 +0300
+++ /tmp/wklog.55.new.22795 2009-10-15 23:40:36.000000000 +0300
@@ -7,7 +7,8 @@
1.1 Step 1: simple installer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An installer package that
-- Shows GPL Licence
+- Copies files on installation
+- Registers mysqld a service
- Prompts the user for "essential" configuration options. Preliminary list
of "essential" options:
* Install directory
@@ -15,27 +16,28 @@
14-10-2009 about data directory, Vista and UAC)
* root password
* default character set
- * [perhaps] sql_mode setting.
+ * TODO come up with the final list. The criteria for inclusion are:
+ 1. ask for things that are essential to have a working setup as soon as
+ the installation is complete
+ 2. ask for things without answers for which the newbies can get into
+ trouble.
-- Copies files to destination directories
- Checks if the target installation directory, TCP port, or named pipe are
busy. If they are, it asks to remove the previous installation first
and aborts. (that is: upgrades are not supported in step#1)
-- Generates appropriate my.cnf file (from a template)
-- Sets up SQL root user with specified password
+- Generates appropriate my.cnf file
+- Sets up SQL user with specified password
- Adds start menu items
- to start the server manually (with --console)
- (note: will this work from any user, and on any OS? if not, this might
- be omitted)
- to start mysql client
- - to edit the my.cnf file
-- Registers MariaDB to start as a service with the specified parameters
-- Registers MariaDB as installed software, sets up uninstaller
+ - to edit the my.cnf file.
+- Registers MariaDB to start as a service with the specified parameters.
+- Registers MariaDB as installed software, sets up uninstaller.
(TODO: should the uninstaller the datadir or leave it? (or ask the user?))
- Creates installation log, and in case of any failures presents the log to
the user and requests to file it as a bug (How far we should go here depends
- on how complex and error-prone the installation procedure will end up being).
+ on how complex and error-prone the final installation procedure will be).
1.2 Step 2: Upgrades from MySQL or MariaDB
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-=-=(Psergey - Thu, 15 Oct 2009, 23:40)=-=-
High-Level Specification modified.
--- /tmp/wklog.55.old.22774 2009-10-15 23:40:16.000000000 +0300
+++ /tmp/wklog.55.new.22774 2009-10-15 23:40:16.000000000 +0300
@@ -15,13 +15,9 @@
14-10-2009 about data directory, Vista and UAC)
* root password
* default character set
- * TODO come up with the final list. The criteria for inclusion are:
- 1. ask for things that are essential to have a working setup as soon as
- the installation is complete
- 2. ask for things without answers for which the newbies can get into
- trouble.
+ * [perhaps] sql_mode setting.
-- Copies files to destination directory
+- Copies files to destination directories
- Checks if the target installation directory, TCP port, or named pipe are
busy. If they are, it asks to remove the previous installation first
and aborts. (that is: upgrades are not supported in step#1)
@@ -29,6 +25,8 @@
- Sets up SQL root user with specified password
- Adds start menu items
- to start the server manually (with --console)
+ (note: will this work from any user, and on any OS? if not, this might
+ be omitted)
- to start mysql client
- to edit the my.cnf file
- Registers MariaDB to start as a service with the specified parameters
-=-=(Psergey - Thu, 15 Oct 2009, 23:38)=-=-
High-Level Specification modified.
--- /tmp/wklog.55.old.22618 2009-10-15 23:38:06.000000000 +0300
+++ /tmp/wklog.55.new.22618 2009-10-15 23:38:06.000000000 +0300
@@ -7,8 +7,7 @@
1.1 Step 1: simple installer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An installer package that
-- Copies files on installation
-- Registers mysqld a service
+- Shows GPL Licence
- Prompts the user for "essential" configuration options. Preliminary list
of "essential" options:
* Install directory
@@ -22,22 +21,23 @@
2. ask for things without answers for which the newbies can get into
trouble.
+- Copies files to destination directory
- Checks if the target installation directory, TCP port, or named pipe are
busy. If they are, it asks to remove the previous installation first
and aborts. (that is: upgrades are not supported in step#1)
-- Generates appropriate my.cnf file
-- Sets up SQL user with specified password
+- Generates appropriate my.cnf file (from a template)
+- Sets up SQL root user with specified password
- Adds start menu items
- to start the server manually (with --console)
- to start mysql client
- - to edit the my.cnf file.
-- Registers MariaDB to start as a service with the specified parameters.
-- Registers MariaDB as installed software, sets up uninstaller.
+ - to edit the my.cnf file
+- Registers MariaDB to start as a service with the specified parameters
+- Registers MariaDB as installed software, sets up uninstaller
(TODO: should the uninstaller the datadir or leave it? (or ask the user?))
- Creates installation log, and in case of any failures presents the log to
the user and requests to file it as a bug (How far we should go here depends
- on how complex and error-prone the final installation procedure will be).
+ on how complex and error-prone the installation procedure will end up being).
1.2 Step 2: Upgrades from MySQL or MariaDB
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-=-=(Psergey - Thu, 15 Oct 2009, 16:34)=-=-
High-Level Specification modified.
--- /tmp/wklog.55.old.3919 2009-10-15 16:34:22.000000000 +0300
+++ /tmp/wklog.55.new.3919 2009-10-15 16:34:22.000000000 +0300
@@ -81,6 +81,6 @@
3. Other notes
--------------
-* MySQL's logo is the seal. It can be found here:
+* MariaDB's logo is the seal. It can be found here:
http://askmonty.org/wiki/index.php/MariaDB_Logo
-=-=(Bothorsen - Thu, 15 Oct 2009, 15:40)=-=-
High-Level Specification modified.
--- /tmp/wklog.55.old.1396 2009-10-15 15:40:03.000000000 +0300
+++ /tmp/wklog.55.new.1396 2009-10-15 15:40:03.000000000 +0300
@@ -81,6 +81,6 @@
3. Other notes
--------------
-* MySQL's logo is the seal (see e.g. here: https://code.launchpad.net/maria)
- Bo Thorsen has the latest revision of the picture in various formats.
+* MySQL's logo is the seal. It can be found here:
+http://askmonty.org/wiki/index.php/MariaDB_Logo
-=-=(Psergey - Thu, 15 Oct 2009, 15:22)=-=-
High-Level Specification modified.
--- /tmp/wklog.55.old.466 2009-10-15 15:22:05.000000000 +0300
+++ /tmp/wklog.55.new.466 2009-10-15 15:22:05.000000000 +0300
@@ -16,7 +16,7 @@
14-10-2009 about data directory, Vista and UAC)
* root password
* default character set
- * <TODO come up with the final list. The criteria for inclusion are:
+ * TODO come up with the final list. The criteria for inclusion are:
1. ask for things that are essential to have a working setup as soon as
the installation is complete
2. ask for things without answers for which the newbies can get into
@@ -25,11 +25,14 @@
- Checks if the target installation directory, TCP port, or named pipe are
busy. If they are, it asks to remove the previous installation first
and aborts. (that is: upgrades are not supported in step#1)
+- Generates appropriate my.cnf file
+- Sets up SQL user with specified password
- Adds start menu items
- to start the server manually (with --console)
- to start mysql client
- to edit the my.cnf file.
-- Registers MariaDB as installed, sets up uninstaller.
+- Registers MariaDB to start as a service with the specified parameters.
+- Registers MariaDB as installed software, sets up uninstaller.
(TODO: should the uninstaller the datadir or leave it? (or ask the user?))
- Creates installation log, and in case of any failures presents the log to
@@ -54,9 +57,10 @@
1.4 Items not on the wishlist
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-This is a list of things that one might want an installer to do but that are out
-of scope of this WL entry.
-* Calibration of my.cnf parameters based on available memory, number of CPUs, etc.
+This is a list of things that one might want an installer to do but that are
+out of scope of this WL entry:
+* Calibration of my.cnf parameters based on available memory, number of CPUs,
+ etc.
2. Installer wishlist (developer POV)
-=-=(Psergey - Thu, 15 Oct 2009, 15:17)=-=-
High-Level Specification modified.
--- /tmp/wklog.55.old.32703 2009-10-15 15:17:17.000000000 +0300
+++ /tmp/wklog.55.new.32703 2009-10-15 15:17:17.000000000 +0300
@@ -24,7 +24,7 @@
- Checks if the target installation directory, TCP port, or named pipe are
busy. If they are, it asks to remove the previous installation first
- and aborts.
+ and aborts. (that is: upgrades are not supported in step#1)
- Adds start menu items
- to start the server manually (with --console)
- to start mysql client
@@ -36,8 +36,8 @@
the user and requests to file it as a bug (How far we should go here depends
on how complex and error-prone the final installation procedure will be).
-1.2 Step 2: upgrades from MySQL
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+1.2 Step 2: Upgrades from MySQL or MariaDB
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Same as above but with handling of the case where MySQL has been already
installed:
- offer to replace MySQL.
-=-=(Psergey - Thu, 15 Oct 2009, 15:15)=-=-
High-Level Specification modified.
--- /tmp/wklog.55.old.32588 2009-10-15 15:15:27.000000000 +0300
+++ /tmp/wklog.55.new.32588 2009-10-15 15:15:27.000000000 +0300
@@ -52,6 +52,13 @@
installer does.
TODO come up with options
+1.4 Items not on the wishlist
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+This is a list of things that one might want an installer to do but that are out
+of scope of this WL entry.
+* Calibration of my.cnf parameters based on available memory, number of CPUs, etc.
+
+
2. Installer wishlist (developer POV)
-------------------------------------
* Some "installshield-like" tool that's easy to use (suggestion by Webyog:
-=-=(Psergey - Thu, 15 Oct 2009, 13:15)=-=-
High-Level Specification modified.
--- /tmp/wklog.55.old.27290 2009-10-15 13:15:59.000000000 +0300
+++ /tmp/wklog.55.new.27290 2009-10-15 13:15:59.000000000 +0300
@@ -11,7 +11,9 @@
- Registers mysqld a service
- Prompts the user for "essential" configuration options. Preliminary list
of "essential" options:
- * Destination directory
+ * Install directory
+ - Data directory (see email from Peter Laursen on maria-developers@ dated
+ 14-10-2009 about data directory, Vista and UAC)
* root password
* default character set
* <TODO come up with the final list. The criteria for inclusion are:
------------------------------------------------------------
-=-=(View All Progress Notes, 14 total)=-=-
http://askmonty.org/worklog/index.pl?tid=55&nolimit=1
DESCRIPTION:
We need Windows Installer package for MariaDB.
HIGH-LEVEL SPECIFICATION:
Not a spec so far but a list of points to consider:
1. Installer wishlist (user POV)
--------------------------------
>From the user point of view:
1.1 Step 1: simple installer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An installer package that
- Presents the user with GPL licence
- Prompts the user for "essential" configuration options:
* Install directory
- Data directory (see email from Peter Laursen on maria-developers@ dated
14-10-2009 about data directory, Vista and UAC)
* root password
* default character set
* [possibly] sql_mode setting.
- Checks if the target installation directory, TCP port, or named pipe are
busy. If they are, offers to either change these parameters or abort the
installation (that is: no support for any kind of upgrades at this point)
- Copies installation files to appropriate destination
- Registers mysqld a service
- Generates appropriate my.cnf file
- Sets up SQL root user with the specified password
- Adds start menu items
- to start the server manually (with --console)
(note: starting server manually requires write access to datadir, which
not all users will have. what to do?)
- to start mysql client
- to edit the my.cnf file.
- Registers MariaDB to start as a service with the specified parameters.
- Registers MariaDB as installed software, sets up uninstaller.
(TODO: should the uninstaller the datadir or leave it? (or ask the user?))
- Creates installation log, and in case of any failures presents the log to
the user and requests to file it as a bug (How far we should go here depends
on how complex and error-prone the final installation procedure will be).
1.2 Step 2: Upgrades from MySQL or MariaDB
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Same as above but with handling of the case where MySQL has been already
installed:
- offer to replace MySQL.
- upgrade the data directory (todo we should sort out if anything/what is
needed for this).
- Uninstall MySQL
- Install MariaDB.
1.3 Step 3: Configuration wizard
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Installer should include configuration wizard that's similar to what MySQL
installer does.
TODO come up with a list of options to set.
1.4 Items not on the wishlist
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is a list of things that one might want an installer to do but that are
out of scope of this WL entry:
* Calibration of my.cnf parameters based on available memory, number of CPUs,
etc.
2. Installer wishlist (developer POV)
-------------------------------------
* Some "installshield-like" tool that's easy to use (suggestion by Webyog:
NSIS)
* Installation procedure source should reside in MariaDB source repository
* Installation procedure source file is better to be in human-readable text
format.
* It should be possible to automate creation of the installer package, in a way
that can be run from buildbot (e.g. the installer package build process
should print messages to its stdout)
* Any suggestions on how can one automatically test the installation package?
(for example, we'll want to start the installer, install, check that
installation succeeded, then start the server, run some commands, then
uninstall. Any ways to achieve that?)
3. Other notes
--------------
* MariaDB's logo is the seal. It can be found here:
http://askmonty.org/wiki/index.php/MariaDB_Logo
ESTIMATED WORK TIME
ESTIMATED COMPLETION DATE
-----------------------------------------------------------------------
WorkLog (v3.5.9)
1
0