Merge lp:~laurynas-biveinis/percona-server/5.6-merge-4 into lp:percona-server/5.6

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 366
Proposed branch: lp:~laurynas-biveinis/percona-server/5.6-merge-4
Merge into: lp:percona-server/5.6
Prerequisite: lp:~laurynas-biveinis/percona-server/tree-fixes-5.6
Diff against target: 28652 lines (+8737/-18610)
172 files modified
COPYING.innodb-deadlock-count-patch (+0/-30)
COPYING.show_temp_51 (+13/-0)
Makefile (+2/-2)
Percona-Server/client/mysqldump.c (+121/-21)
Percona-Server/include/errmsg.h (+1/-0)
Percona-Server/libmysql/errmsg.c (+1/-0)
Percona-Server/mysql-test/include/have_pool_of_threads.inc (+0/-4)
Percona-Server/mysql-test/include/log_grep.inc (+0/-41)
Percona-Server/mysql-test/include/percona_query_cache_with_comments.inc (+95/-0)
Percona-Server/mysql-test/include/percona_query_cache_with_comments_begin.inc (+0/-12)
Percona-Server/mysql-test/include/percona_query_cache_with_comments_clear.inc (+5/-0)
Percona-Server/mysql-test/include/percona_query_cache_with_comments_eval.inc (+7/-0)
Percona-Server/mysql-test/include/percona_show_slave_status_nolock.inc (+0/-56)
Percona-Server/mysql-test/r/have_pool_of_threads.require (+2/-0)
Percona-Server/mysql-test/r/percona_bug1170103.result (+19/-0)
Percona-Server/mysql-test/r/percona_bug933969.result (+0/-16)
Percona-Server/mysql-test/r/percona_innodb_deadlock_count.result (+28/-0)
Percona-Server/mysql-test/r/percona_log_slow_admin_statements-config.result (+0/-6)
Percona-Server/mysql-test/r/percona_log_slow_admin_statements-config_foo.result (+7/-0)
Percona-Server/mysql-test/r/percona_log_slow_admin_statements-config_true.result (+0/-6)
Percona-Server/mysql-test/r/percona_log_slow_filter-cl.result (+0/-6)
Percona-Server/mysql-test/r/percona_min_examined_row_limit.result (+0/-35)
Percona-Server/mysql-test/r/percona_mysqldump_innodb_optimize_keys.result (+47/-0)
Percona-Server/mysql-test/r/percona_query_cache_with_comments_crash.result (+21/-0)
Percona-Server/mysql-test/r/percona_query_cache_with_comments_prepared_statements.result (+0/-396)
Percona-Server/mysql-test/r/percona_status_wait_query_cache_mutex.result (+20/-0)
Percona-Server/mysql-test/r/pool_of_threads.result (+2169/-0)
Percona-Server/mysql-test/r/pool_of_threads_high_prio_tickets.result (+2169/-0)
Percona-Server/mysql-test/suite/binlog/r/percona_bug1162085.result (+6/-0)
Percona-Server/mysql-test/suite/binlog/t/percona_bug1162085.test (+30/-0)
Percona-Server/mysql-test/suite/innodb/r/percona_changed_page_bmp.result (+8/-3)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp-master.opt (+1/-1)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp.test (+16/-3)
Percona-Server/mysql-test/suite/rpl/r/percona_bug860910.result (+0/-23)
Percona-Server/mysql-test/suite/rpl/t/percona_bug860910.test (+0/-38)
Percona-Server/mysql-test/suite/sys_vars/r/extra_max_connections_basic.result (+43/-0)
Percona-Server/mysql-test/suite/sys_vars/r/extra_port_basic.result (+21/-0)
Percona-Server/mysql-test/suite/sys_vars/r/query_exec_id_basic.result (+2/-0)
Percona-Server/mysql-test/suite/sys_vars/r/thread_pool_high_prio_tickets_basic.result (+47/-0)
Percona-Server/mysql-test/suite/sys_vars/r/thread_pool_idle_timeout_basic.result (+47/-0)
Percona-Server/mysql-test/suite/sys_vars/r/thread_pool_max_threads_basic.result (+47/-0)
Percona-Server/mysql-test/suite/sys_vars/r/thread_pool_min_threads_basic.result (+49/-0)
Percona-Server/mysql-test/suite/sys_vars/r/thread_pool_oversubscribe_basic.result (+47/-0)
Percona-Server/mysql-test/suite/sys_vars/r/thread_pool_stall_limit_basic.result (+47/-0)
Percona-Server/mysql-test/suite/sys_vars/t/extra_max_connections_basic.test (+0/-42)
Percona-Server/mysql-test/suite/sys_vars/t/query_exec_id_basic.test (+0/-4)
Percona-Server/mysql-test/suite/sys_vars/t/thread_pool_high_prio_tickets_basic.test (+43/-0)
Percona-Server/mysql-test/suite/sys_vars/t/thread_pool_idle_timeout_basic.test (+0/-43)
Percona-Server/mysql-test/suite/sys_vars/t/thread_pool_min_threads_basic.test (+0/-43)
Percona-Server/mysql-test/suite/sys_vars/t/thread_pool_oversubscribe_basic.test (+0/-43)
Percona-Server/mysql-test/suite/sys_vars/t/thread_pool_size_basic.test (+47/-0)
Percona-Server/mysql-test/suite/sys_vars/t/thread_pool_stall_limit_basic.test (+0/-43)
Percona-Server/mysql-test/t/percona_bug1170103-master.opt (+1/-0)
Percona-Server/mysql-test/t/percona_bug1170103.test (+23/-0)
Percona-Server/mysql-test/t/percona_bug933969.test (+0/-42)
Percona-Server/mysql-test/t/percona_log_slow_admin_statements-config_false.test (+2/-0)
Percona-Server/mysql-test/t/percona_log_slow_admin_statements-config_foo.test (+3/-0)
Percona-Server/mysql-test/t/percona_log_slow_admin_statements-config_true.cnf (+4/-0)
Percona-Server/mysql-test/t/percona_log_slow_slave_statements-cl-master.opt (+0/-1)
Percona-Server/mysql-test/t/percona_log_slow_sp_statements-cl-master.opt (+0/-1)
Percona-Server/mysql-test/t/percona_log_slow_sp_statements-cl.test (+2/-0)
Percona-Server/mysql-test/t/percona_log_slow_verbosity-cl-master.opt (+0/-1)
Percona-Server/mysql-test/t/percona_log_slow_verbosity-cl.test (+0/-2)
Percona-Server/mysql-test/t/percona_mysqldump_innodb_optimize_keys.test (+27/-0)
Percona-Server/mysql-test/t/percona_query_cache_with_comments_prepared_statements.test (+0/-208)
Percona-Server/mysql-test/t/percona_status_wait_query_cache_mutex.test (+0/-35)
Percona-Server/mysql-test/t/percona_xtradb_bug317074.test (+47/-0)
Percona-Server/mysql-test/t/pool_of_threads.cnf (+15/-0)
Percona-Server/mysql-test/t/pool_of_threads_high_prio_tickets.cnf (+16/-0)
Percona-Server/mysql-test/t/pool_of_threads_high_prio_tickets.test (+19/-0)
Percona-Server/mysys/mf_cache.c (+5/-3)
Percona-Server/sql/query_strip_comments.h (+37/-0)
Percona-Server/sql/sys_vars.cc (+7/-0)
Percona-Server/sql/threadpool.h (+72/-0)
Percona-Server/sql/threadpool_common.cc (+367/-0)
Percona-Server/sql/threadpool_unix.cc (+1699/-0)
Percona-Server/sql/threadpool_win.cc (+763/-0)
Percona-Server/storage/innobase/handler/ha_innodb.cc (+4/-0)
Percona-Server/storage/innobase/include/srv0srv.h (+5/-0)
Percona-Server/storage/innobase/log/log0log.cc (+7/-1)
Percona-Server/storage/innobase/read/read0read.cc (+9/-0)
Percona-Server/storage/innobase/row/row0sel.cc (+3/-3)
Percona-Server/storage/innobase/srv/srv0srv.cc (+32/-0)
Percona-Server/storage/innobase/trx/trx0sys.cc (+2/-0)
Percona-Server/storage/innobase/trx/trx0trx.cc (+1/-0)
UDF/configure.ac (+1/-0)
build/build-binary.sh (+1/-0)
build/debian/additions/debian-start (+0/-32)
build/debian/additions/debian-start.inc.sh (+0/-72)
build/debian/compat (+0/-1)
build/debian/rules (+3/-1)
build/percona-server.spec (+15/-10)
build/percona-shared-compat.spec (+1/-1)
build/rpm/mysql-dubious-exports.patch (+0/-127)
doc/source/conf.py (+1/-1)
doc/source/development.rst (+0/-266)
doc/source/diagnostics/user_stats.rst (+0/-242)
doc/source/flexibility/buff_read_ahead_area.rst (+36/-0)
doc/source/management/innodb_expanded_fast_index_creation.rst (+0/-82)
doc/source/management/innodb_fake_changes.rst (+70/-0)
doc/source/management/innodb_kill_idle_trx.rst (+0/-2)
doc/source/percona_xtradb.rst (+13/-0)
doc/source/performance/query_cache_enhance.rst (+123/-0)
doc/source/performance/threadpool.rst (+33/-0)
doc/source/reliability/error_pad.rst (+0/-55)
doc/source/reliability/innodb_corrupt_table_action.rst (+0/-35)
doc/source/upstream-bug-fixes.rst (+40/-16)
python-for-subunit2junitxml/BytesIO.py (+0/-136)
python-for-subunit2junitxml/iso8601/LICENSE (+0/-20)
python-for-subunit2junitxml/iso8601/README (+0/-26)
python-for-subunit2junitxml/iso8601/README.subunit (+0/-5)
python-for-subunit2junitxml/iso8601/setup.py (+0/-58)
python-for-subunit2junitxml/iso8601/test_iso8601.py (+0/-111)
python-for-subunit2junitxml/junitxml/__init__.py (+0/-221)
python-for-subunit2junitxml/junitxml/tests/__init__.py (+0/-16)
python-for-subunit2junitxml/junitxml/tests/test_junitxml.py (+0/-327)
python-for-subunit2junitxml/subunit/__init__.py (+0/-1250)
python-for-subunit2junitxml/subunit/chunked.py (+0/-185)
python-for-subunit2junitxml/subunit/details.py (+0/-119)
python-for-subunit2junitxml/subunit/iso8601.py (+0/-133)
python-for-subunit2junitxml/subunit/progress_model.py (+0/-106)
python-for-subunit2junitxml/subunit/run.py (+0/-73)
python-for-subunit2junitxml/subunit/test_results.py (+0/-492)
python-for-subunit2junitxml/subunit/tests/TestUtil.py (+0/-80)
python-for-subunit2junitxml/subunit/tests/__init__.py (+0/-41)
python-for-subunit2junitxml/subunit/tests/sample-script.py (+0/-21)
python-for-subunit2junitxml/subunit/tests/sample-two-script.py (+0/-7)
python-for-subunit2junitxml/subunit/tests/test_chunked.py (+0/-152)
python-for-subunit2junitxml/subunit/tests/test_details.py (+0/-112)
python-for-subunit2junitxml/subunit/tests/test_progress_model.py (+0/-118)
python-for-subunit2junitxml/subunit/tests/test_subunit_filter.py (+0/-208)
python-for-subunit2junitxml/subunit/tests/test_subunit_stats.py (+0/-84)
python-for-subunit2junitxml/subunit/tests/test_subunit_tags.py (+0/-69)
python-for-subunit2junitxml/subunit/tests/test_tap2subunit.py (+0/-445)
python-for-subunit2junitxml/subunit/tests/test_test_protocol.py (+0/-1299)
python-for-subunit2junitxml/subunit/tests/test_test_results.py (+0/-300)
python-for-subunit2junitxml/testtools/__init__.py (+0/-80)
python-for-subunit2junitxml/testtools/_spinner.py (+0/-316)
python-for-subunit2junitxml/testtools/compat.py (+0/-286)
python-for-subunit2junitxml/testtools/content.py (+0/-238)
python-for-subunit2junitxml/testtools/content_type.py (+0/-33)
python-for-subunit2junitxml/testtools/deferredruntest.py (+0/-335)
python-for-subunit2junitxml/testtools/distutilscmd.py (+0/-62)
python-for-subunit2junitxml/testtools/helpers.py (+0/-64)
python-for-subunit2junitxml/testtools/matchers.py (+0/-785)
python-for-subunit2junitxml/testtools/monkey.py (+0/-97)
python-for-subunit2junitxml/testtools/run.py (+0/-332)
python-for-subunit2junitxml/testtools/runtest.py (+0/-200)
python-for-subunit2junitxml/testtools/testcase.py (+0/-724)
python-for-subunit2junitxml/testtools/testresult/__init__.py (+0/-19)
python-for-subunit2junitxml/testtools/testresult/doubles.py (+0/-111)
python-for-subunit2junitxml/testtools/testresult/real.py (+0/-621)
python-for-subunit2junitxml/testtools/tests/__init__.py (+0/-44)
python-for-subunit2junitxml/testtools/tests/helpers.py (+0/-72)
python-for-subunit2junitxml/testtools/tests/test_compat.py (+0/-257)
python-for-subunit2junitxml/testtools/tests/test_content.py (+0/-223)
python-for-subunit2junitxml/testtools/tests/test_content_type.py (+0/-46)
python-for-subunit2junitxml/testtools/tests/test_deferredruntest.py (+0/-738)
python-for-subunit2junitxml/testtools/tests/test_distutilscmd.py (+0/-90)
python-for-subunit2junitxml/testtools/tests/test_fixturesupport.py (+0/-79)
python-for-subunit2junitxml/testtools/tests/test_helpers.py (+0/-106)
python-for-subunit2junitxml/testtools/tests/test_matchers.py (+0/-695)
python-for-subunit2junitxml/testtools/tests/test_monkey.py (+0/-167)
python-for-subunit2junitxml/testtools/tests/test_run.py (+0/-77)
python-for-subunit2junitxml/testtools/tests/test_runtest.py (+0/-300)
python-for-subunit2junitxml/testtools/tests/test_spinner.py (+0/-332)
python-for-subunit2junitxml/testtools/tests/test_testresult.py (+0/-1372)
python-for-subunit2junitxml/testtools/tests/test_testsuite.py (+0/-53)
python-for-subunit2junitxml/testtools/tests/test_testtools.py (+0/-1143)
python-for-subunit2junitxml/testtools/tests/test_with_with.py (+0/-42)
python-for-subunit2junitxml/testtools/testsuite.py (+0/-87)
python-for-subunit2junitxml/testtools/utils.py (+0/-13)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/5.6-merge-4
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Review via email: mp+165869@code.launchpad.net

Description of the change

To post a comment you must log in.
Revision history for this message
Stewart Smith (stewart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'COPYING.innodb-deadlock-count-patch'
2--- COPYING.innodb-deadlock-count-patch 2013-05-27 12:16:36 +0000
3+++ COPYING.innodb-deadlock-count-patch 1970-01-01 00:00:00 +0000
4@@ -1,30 +0,0 @@
5-Portions of this software contain modifications contributed by Eric Bergen.
6-These contributions are used with the following license:
7-
8-Copyright (c) 2010, Eric Bergen. All rights reserved.
9-
10-Redistribution and use in source and binary forms, with or without
11-modification, are permitted provided that the following conditions
12-are met:
13- * Redistributions of source code must retain the above copyright
14- notice, this list of conditions and the following disclaimer.
15- * Redistributions in binary form must reproduce the above
16- copyright notice, this list of conditions and the following
17- disclaimer in the documentation and/or other materials
18- provided with the distribution.
19- * Neither the name of the Eric Bergen. nor the names of its
20- contributors may be used to endorse or promote products
21- derived from this software without specific prior written
22- permission.
23-
24-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35
36=== added file 'COPYING.show_temp_51'
37--- COPYING.show_temp_51 1970-01-01 00:00:00 +0000
38+++ COPYING.show_temp_51 2013-05-27 12:16:38 +0000
39@@ -0,0 +1,13 @@
40+Portions of this software contain modifications contributed by Venu Anuganti.
41+These contributions are used with the following license:
42+
43+Copyright (c) 2010, Venu Anuganti, http://venublog.com/
44+All rights reserved.
45+
46+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
47+
48+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
49+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
50+ * Neither the name of the <ORGANIZATION> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
51+
52+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
53
54=== modified file 'Makefile'
55--- Makefile 2013-05-10 08:51:53 +0000
56+++ Makefile 2013-05-27 12:16:38 +0000
57@@ -1,5 +1,5 @@
58-MYSQL_VERSION=5.6.10
59-PERCONA_SERVER_VERSION=alpha60.2
60+MYSQL_VERSION=5.6.11
61+PERCONA_SERVER_VERSION=alpha60.3
62 PERCONA_SERVER ?=Percona-Server-$(MYSQL_VERSION)-$(PERCONA_SERVER_VERSION)
63 PERCONA_SERVER_SHORT_1 ?=Percona-Server-$(MYSQL_VERSION)
64 PERCONA_SERVER_SHORT_2 ?=Percona-Server
65
66=== modified file 'Percona-Server/client/mysqldump.c'
67--- Percona-Server/client/mysqldump.c 2013-05-13 04:25:56 +0000
68+++ Percona-Server/client/mysqldump.c 2013-05-27 12:16:38 +0000
69@@ -2482,6 +2482,48 @@
70 }
71
72 /*
73+ Find the first occurrence of a quoted identifier in a given string. Returns
74+ the pointer to the opening quote, and stores the pointer to the closing quote
75+ to the memory location pointed to by the 'end' argument,
76+
77+ If no quoted identifiers are found, returns NULL (and the value pointed to by
78+ 'end' is undefined in this case).
79+*/
80+
81+static const char *parse_quoted_identifier(const char *str,
82+ const char **end)
83+{
84+ const char *from;
85+ const char *to;
86+
87+ if (!(from= strchr(str, '`')))
88+ return NULL;
89+
90+ to= from;
91+
92+ while ((to= strchr(to + 1, '`'))) {
93+ /*
94+ Double backticks represent a backtick in identifier, rather than a quote
95+ character.
96+ */
97+ if (to[1] == '`')
98+ {
99+ to++;
100+ continue;
101+ }
102+
103+ break;
104+ }
105+
106+ if (to <= from + 1)
107+ return NULL; /* Empty identifier */
108+
109+ *end= to;
110+
111+ return from;
112+}
113+
114+/*
115 Parse the specified key definition string and check if the key contains an
116 AUTO_INCREMENT column as the first key part. We only check for the first key
117 part, because unlike MyISAM, InnoDB does not allow the AUTO_INCREMENT column
118@@ -2492,32 +2534,22 @@
119 const char *keydef,
120 key_type_t type)
121 {
122- char *from, *to;
123+ const char *from, *to;
124 uint idnum;
125
126 DBUG_ASSERT(type != KEY_TYPE_NONE);
127
128- if (autoinc_column == NULL || !(from= strchr(keydef, '`')))
129+ if (autoinc_column == NULL)
130 return FALSE;
131
132- to= from;
133 idnum= 0;
134
135- while ((to= strchr(to + 1, '`')))
136+ /*
137+ There is only 1 iteration of the following loop for type == KEY_TYPE_PRIMARY
138+ and 2 iterations for type == KEY_TYPE_UNIQUE / KEY_TYPE_NON_UNIQUE.
139+ */
140+ while ((from= parse_quoted_identifier(keydef, &to)))
141 {
142- /*
143- Double backticks represent a backtick in identifier, rather than a quote
144- character.
145- */
146- if (to[1] == '`')
147- {
148- to++;
149- continue;
150- }
151-
152- if (to <= from + 1)
153- break; /* Broken key definition */
154-
155 idnum++;
156
157 /*
158@@ -2532,11 +2564,10 @@
159 Check only the first (for PRIMARY KEY) or the second (for secondary keys)
160 quoted identifier.
161 */
162- if ((idnum == 1 + test(type != KEY_TYPE_PRIMARY)) ||
163- !(from= strchr(to + 1, '`')))
164+ if ((idnum == 1 + test(type != KEY_TYPE_PRIMARY)))
165 break;
166
167- to= from;
168+ keydef= to + 1;
169 }
170
171 return FALSE;
172@@ -2544,6 +2575,42 @@
173
174
175 /*
176+ Find a node in the skipped keys list whose name matches a quoted
177+ identifier specified as 'id_from' and 'id_to' arguments.
178+*/
179+
180+static LIST *find_matching_skipped_key(const char *id_from,
181+ const char *id_to)
182+{
183+ LIST *list;
184+ size_t id_len;
185+
186+ id_len= id_to - id_from + 1;
187+ DBUG_ASSERT(id_len > 2);
188+
189+ for (list= skipped_keys_list; list; list= list_rest(list))
190+ {
191+ const char *keydef;
192+ const char *keyname_from;
193+ const char *keyname_to;
194+ size_t keyname_len;
195+
196+ keydef= list->data;
197+
198+ if ((keyname_from= parse_quoted_identifier(keydef, &keyname_to)))
199+ {
200+ keyname_len= keyname_to - keyname_from + 1;
201+
202+ if (id_len == keyname_len &&
203+ !strncmp(keyname_from, id_from, id_len))
204+ return list;
205+ }
206+ }
207+
208+ return NULL;
209+}
210+
211+/*
212 Remove secondary/foreign key definitions from a given SHOW CREATE TABLE string
213 and store them into a temporary list to be used later.
214
215@@ -2570,6 +2637,9 @@
216 char *autoinc_column= NULL;
217 my_bool has_autoinc= FALSE;
218 key_type_t type;
219+ const char *constr_from;
220+ const char *constr_to;
221+ LIST *keydef_node;
222
223 strend= create_str + strlen(create_str);
224
225@@ -2589,7 +2659,37 @@
226 c= *tmp;
227 *tmp= '\0'; /* so strstr() only processes the current line */
228
229- if (!strncmp(ptr, "UNIQUE KEY ", sizeof("UNIQUE KEY ") - 1))
230+ if (!strncmp(ptr, "CONSTRAINT ", sizeof("CONSTRAINT ") - 1) &&
231+ (constr_from= parse_quoted_identifier(ptr, &constr_to)) &&
232+ (keydef_node= find_matching_skipped_key(constr_from, constr_to)))
233+ {
234+ char *keydef;
235+ size_t keydef_len;
236+
237+ /*
238+ There's a skipped key with the same name as the constraint name. Let's
239+ put it back before the current constraint definition and remove from the
240+ skipped keys list.
241+ */
242+ keydef= keydef_node->data;
243+ keydef_len= strlen(keydef) + 5; /* ", \n " */
244+
245+ memmove(orig_ptr + keydef_len, orig_ptr, strend - orig_ptr + 1);
246+ memcpy(ptr, keydef, keydef_len - 5);
247+ memcpy(ptr + keydef_len - 5, ", \n ", 5);
248+
249+ skipped_keys_list= list_delete(skipped_keys_list, keydef_node);
250+ my_free(keydef);
251+ my_free(keydef_node);
252+
253+ strend+= keydef_len;
254+ orig_ptr+= keydef_len;
255+ ptr+= keydef_len;
256+ tmp+= keydef_len;
257+
258+ type= KEY_TYPE_NONE;
259+ }
260+ else if (!strncmp(ptr, "UNIQUE KEY ", sizeof("UNIQUE KEY ") - 1))
261 type= KEY_TYPE_UNIQUE;
262 else if (!strncmp(ptr, "KEY ", sizeof("KEY ") - 1))
263 type= KEY_TYPE_NON_UNIQUE;
264
265=== modified file 'Percona-Server/include/errmsg.h'
266--- Percona-Server/include/errmsg.h 2013-05-12 06:24:46 +0000
267+++ Percona-Server/include/errmsg.h 2013-05-27 12:16:38 +0000
268@@ -25,6 +25,7 @@
269 void init_client_errs(void);
270 void finish_client_errs(void);
271 extern const char *client_errors[]; /* Error messages */
272+extern const char **mysql_client_errors; /* Error messages */
273 #ifdef __cplusplus
274 }
275 #endif
276
277=== modified file 'Percona-Server/libmysql/errmsg.c'
278--- Percona-Server/libmysql/errmsg.c 2013-05-12 06:24:46 +0000
279+++ Percona-Server/libmysql/errmsg.c 2013-05-27 12:16:38 +0000
280@@ -23,6 +23,7 @@
281 #include <my_sys.h>
282 #include "errmsg.h"
283
284+const char **mysql_client_errors = client_errors;
285 const char *client_errors[]=
286 {
287 "Unknown MySQL error",
288
289=== removed file 'Percona-Server/mysql-test/include/have_pool_of_threads.inc'
290--- Percona-Server/mysql-test/include/have_pool_of_threads.inc 2013-05-27 12:16:36 +0000
291+++ Percona-Server/mysql-test/include/have_pool_of_threads.inc 1970-01-01 00:00:00 +0000
292@@ -1,4 +0,0 @@
293--- require r/have_pool_of_threads.require
294-disable_query_log;
295-show variables like 'thread_handling';
296-enable_query_log;
297
298=== removed file 'Percona-Server/mysql-test/include/log_grep.inc'
299--- Percona-Server/mysql-test/include/log_grep.inc 2013-05-27 12:16:36 +0000
300+++ Percona-Server/mysql-test/include/log_grep.inc 1970-01-01 00:00:00 +0000
301@@ -1,41 +0,0 @@
302---echo [log_grep.inc] file: $log_file pattern: $grep_pattern
303-perl;
304- $log_file= $ENV{'log_file'};
305- $log_file_full_path= $ENV{'log_file_full_path'};
306- $log_slow_rate_test= $ENV{'log_slow_rate_test'};
307- open(FILE, "$log_file_full_path")
308- or die("Cannot open file $log_file_full_path: $!\n");
309-
310- if ($log_slow_rate_test) {
311- $one= 0;
312- $two= 0;
313- $three= 0;
314- while(<FILE>) {
315- $one++ if(/'connection_one'/);
316- $two++ if(/'connection_two'/);
317- $three++ if(/'connection_three'/);
318- }
319- $sum= $one + $two + $three;
320- $zero= 0;
321- if ($one == 0) {
322- $zero++;
323- }
324- if ($two == 0) {
325- $zero++;
326- }
327- if ($three == 0) {
328- $zero++;
329- }
330- print "[log_grep.inc] sum: $sum\n";
331- print "[log_grep.inc] zero: $zero\n";
332- }
333- else {
334- $grep_pattern= $ENV{'grep_pattern'};
335- $lines= 0;
336- while(<FILE>) {
337- $lines++ if (/$grep_pattern/);
338- }
339- print "[log_grep.inc] lines: $lines\n";
340- }
341- close(FILE);
342-EOF
343
344=== added file 'Percona-Server/mysql-test/include/percona_query_cache_with_comments.inc'
345--- Percona-Server/mysql-test/include/percona_query_cache_with_comments.inc 1970-01-01 00:00:00 +0000
346+++ Percona-Server/mysql-test/include/percona_query_cache_with_comments.inc 2013-05-27 12:16:38 +0000
347@@ -0,0 +1,95 @@
348+--source include/percona_query_cache_with_comments_clear.inc
349+let $query=/* with comment first */select * from t1;
350+eval $query;
351+--source include/percona_query_cache_with_comments_eval.inc
352+
353+let $query=# with comment first
354+select * from t1;
355+--source include/percona_query_cache_with_comments_eval.inc
356+
357+let $query=-- with comment first
358+select * from t1;
359+--source include/percona_query_cache_with_comments_eval.inc
360+
361+let $query=/* with comment first and "quote" */select * from t1;
362+--source include/percona_query_cache_with_comments_eval.inc
363+
364+let $query=# with comment first and "quote"
365+select * from t1;
366+--source include/percona_query_cache_with_comments_eval.inc
367+
368+let $query=-- with comment first and "quote"
369+select * from t1;
370+--source include/percona_query_cache_with_comments_eval.inc
371+
372+let $query=
373+ /* with comment and whitespaces first */select * from t1;
374+--source include/percona_query_cache_with_comments_eval.inc
375+
376+let $query=
377+ # with comment and whitespaces first
378+select * from t1;
379+--source include/percona_query_cache_with_comments_eval.inc
380+
381+let $query=
382+ -- with comment and whitespaces first
383+select * from t1;
384+--source include/percona_query_cache_with_comments_eval.inc
385+
386+let $internal=* internal comment *;
387+
388+let $query=select * /$internal/ from t1;
389+--source include/percona_query_cache_with_comments_eval.inc
390+let $query=select */$internal/ from t1;
391+--source include/percona_query_cache_with_comments_eval.inc
392+let $query=select */$internal/from t1;
393+--source include/percona_query_cache_with_comments_eval.inc
394+
395+let $internal=* internal comment with "quote" *;
396+
397+let $query=select * /$internal/ from t1;
398+--source include/percona_query_cache_with_comments_eval.inc
399+let $query=select */$internal/ from t1;
400+--source include/percona_query_cache_with_comments_eval.inc
401+let $query=select */$internal/from t1;
402+--source include/percona_query_cache_with_comments_eval.inc
403+
404+let $query=select * from t1
405+;
406+--source include/percona_query_cache_with_comments_eval.inc
407+
408+let $query=select * from t1 ;
409+--source include/percona_query_cache_with_comments_eval.inc
410+
411+let $query=select * from t1 ;
412+--source include/percona_query_cache_with_comments_eval.inc
413+
414+let $query=select * from t1
415+/* comment in the end */;
416+--source include/percona_query_cache_with_comments_eval.inc
417+
418+let $query=select * from t1
419+/* *\/ */;
420+--source include/percona_query_cache_with_comments_eval.inc
421+
422+let $query=select * from t1
423+/* comment in the end */
424+;
425+--source include/percona_query_cache_with_comments_eval.inc
426+
427+let $query=select * from t1 #comment in the end;
428+--source include/percona_query_cache_with_comments_eval.inc
429+
430+let $query=select * from t1 #comment in the end
431+;
432+--source include/percona_query_cache_with_comments_eval.inc
433+
434+let $query=select * from t1 -- comment in the end;
435+--source include/percona_query_cache_with_comments_eval.inc
436+
437+let $query=select * from t1 -- comment in the end
438+;
439+--source include/percona_query_cache_with_comments_eval.inc
440+
441+let $query=select ' \' ' from t1;
442+--source include/percona_query_cache_with_comments_eval.inc
443
444=== removed file 'Percona-Server/mysql-test/include/percona_query_cache_with_comments_begin.inc'
445--- Percona-Server/mysql-test/include/percona_query_cache_with_comments_begin.inc 2013-05-27 12:16:36 +0000
446+++ Percona-Server/mysql-test/include/percona_query_cache_with_comments_begin.inc 1970-01-01 00:00:00 +0000
447@@ -1,12 +0,0 @@
448--- source include/have_query_cache.inc
449-
450-set GLOBAL query_cache_size=1355776;
451-
452---disable_warnings
453-drop table if exists t1;
454---enable_warnings
455-
456-create table t1 (a int not null);
457-insert into t1 values (1),(2),(3);
458-
459---source include/percona_query_cache_with_comments_clear.inc
460
461=== added file 'Percona-Server/mysql-test/include/percona_query_cache_with_comments_clear.inc'
462--- Percona-Server/mysql-test/include/percona_query_cache_with_comments_clear.inc 1970-01-01 00:00:00 +0000
463+++ Percona-Server/mysql-test/include/percona_query_cache_with_comments_clear.inc 2013-05-27 12:16:38 +0000
464@@ -0,0 +1,5 @@
465+# Reset query cache variables.
466+flush query cache; # This crashed in some versions
467+flush query cache; # This crashed in some versions
468+reset query cache;
469+flush status;
470
471=== added file 'Percona-Server/mysql-test/include/percona_query_cache_with_comments_eval.inc'
472--- Percona-Server/mysql-test/include/percona_query_cache_with_comments_eval.inc 1970-01-01 00:00:00 +0000
473+++ Percona-Server/mysql-test/include/percona_query_cache_with_comments_eval.inc 2013-05-27 12:16:38 +0000
474@@ -0,0 +1,7 @@
475+echo -----------------------------------------------------;
476+echo $query;
477+echo -----------------------------------------------------;
478+--source include/percona_query_cache_with_comments_show.inc
479+eval $query;
480+eval $query;
481+--source include/percona_query_cache_with_comments_show.inc
482
483=== removed file 'Percona-Server/mysql-test/include/percona_show_slave_status_nolock.inc'
484--- Percona-Server/mysql-test/include/percona_show_slave_status_nolock.inc 2013-05-27 12:16:36 +0000
485+++ Percona-Server/mysql-test/include/percona_show_slave_status_nolock.inc 1970-01-01 00:00:00 +0000
486@@ -1,56 +0,0 @@
487---echo
488---disable_result_log
489-connection slave_lock;
490---echo [slave_lock]
491-send SHOW SLAVE STATUS;
492-
493-connection slave;
494---let $condition= 'SHOW SLAVE STATUS'
495---source include/wait_show_condition.inc
496-
497---disable_warnings
498-SET DEBUG_SYNC='now WAIT_FOR signal.after_show_slave_status TIMEOUT 1';
499---enable_warnings
500-
501---let current=`SELECT SUBSTR(Variable_value FROM 22) FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE Variable_name = 'DEBUG_SYNC'`
502---echo SIGNAL after SHOW SLAVE STATUS is $current
503-
504-connection slave;
505---echo [slave]
506-SET DEBUG_SYNC='now SIGNAL signal.empty';
507-
508-connection slave_nolock;
509---echo [slave_nolock]
510-send SHOW SLAVE STATUS NOLOCK;
511-
512-connection slave;
513---let $condition= 'SHOW SLAVE STATUS NOLOCK'
514---source include/wait_show_condition.inc
515-
516---disable_warnings
517-SET DEBUG_SYNC='now WAIT_FOR signal.after_show_slave_status TIMEOUT 1';
518---enable_warnings
519-
520---echo # should be 'signal.after_show_slave_status'
521---let current=`SELECT SUBSTR(Variable_value FROM 22) FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE Variable_name = 'DEBUG_SYNC'`
522---echo SIGNAL after SHOW SLAVE STATUS NOLOCK is $current
523-
524-connection slave;
525---echo [slave]
526-SET DEBUG_SYNC='now SIGNAL signal.continue';
527-
528-connection slave_lock;
529---disable_result_log
530-reap;
531---enable_result_log
532-
533-connection slave_nolock;
534---disable_result_log
535-reap;
536---enable_result_log
537-
538-connection slave;
539---echo [slave]
540-SET DEBUG_SYNC='now SIGNAL signal.empty';
541---enable_result_log
542---echo
543
544=== added file 'Percona-Server/mysql-test/r/have_pool_of_threads.require'
545--- Percona-Server/mysql-test/r/have_pool_of_threads.require 1970-01-01 00:00:00 +0000
546+++ Percona-Server/mysql-test/r/have_pool_of_threads.require 2013-05-27 12:16:38 +0000
547@@ -0,0 +1,2 @@
548+Variable_name Value
549+thread_handling pool-of-threads
550
551=== added file 'Percona-Server/mysql-test/r/percona_bug1170103.result'
552--- Percona-Server/mysql-test/r/percona_bug1170103.result 1970-01-01 00:00:00 +0000
553+++ Percona-Server/mysql-test/r/percona_bug1170103.result 2013-05-27 12:16:38 +0000
554@@ -0,0 +1,19 @@
555+CREATE TABLE t(a INT) ENGINE=InnoDB;
556+INSERT INTO t VALUES (1), (2), (3);
557+SET @old_query_cache_size=@@query_cache_size;
558+SET @old_query_cache_type=@@query_cache_type;
559+SET GLOBAL query_cache_size=1024*1024;
560+SET GLOBAL query_cache_type=1;
561+SELECT * FROM t;
562+a
563+1
564+2
565+3
566+SELECT * FROM t;
567+a
568+1
569+2
570+3
571+SET GLOBAL query_cache_size=@old_query_cache_size;
572+SET GLOBAL query_cache_type=@old_query_cache_type;
573+DROP TABLE t;
574
575=== removed file 'Percona-Server/mysql-test/r/percona_bug933969.result'
576--- Percona-Server/mysql-test/r/percona_bug933969.result 2013-05-27 12:16:36 +0000
577+++ Percona-Server/mysql-test/r/percona_bug933969.result 1970-01-01 00:00:00 +0000
578@@ -1,16 +0,0 @@
579-RESET MASTER;
580-DROP TABLE IF EXISTS t1;
581-CREATE TABLE t1 (word VARCHAR(20));
582-INSERT INTO t1 VALUES ("hamite");
583-INSERT INTO t1 VALUES ("hoho");
584-INSERT INTO t1 VALUES ("znamenito");
585-INSERT INTO t1 VALUES ("mrachny");
586-INSERT INTO t1 VALUES ("mrak");
587-INSERT INTO t1 VALUES ("zhut");
588-INSERT INTO t1 VALUES ("parnisha");
589-INSERT INTO t1 VALUES ("krrasota!");
590-INSERT INTO t1 VALUES ("podumayesh");
591-INSERT INTO t1 VALUES ("ogo!");
592-FLUSH LOGS;
593-DROP TABLE t1;
594-RESET MASTER;
595
596=== added file 'Percona-Server/mysql-test/r/percona_innodb_deadlock_count.result'
597--- Percona-Server/mysql-test/r/percona_innodb_deadlock_count.result 1970-01-01 00:00:00 +0000
598+++ Percona-Server/mysql-test/r/percona_innodb_deadlock_count.result 2013-05-27 12:16:38 +0000
599@@ -0,0 +1,28 @@
600+# Establish connection con1 (user=root)
601+# Establish connection con2 (user=root)
602+# Establish connection con3 (user=root)
603+# Drop test table
604+drop table if exists t;
605+# Create test table
606+create table t(a INT PRIMARY KEY, b INT) engine=InnoDB;
607+# Insert two rows to test table
608+insert into t values(2,1);
609+insert into t values(1,2);
610+# Switch to connection con1
611+BEGIN;
612+SELECT b FROM t WHERE a=1 FOR UPDATE;
613+# Switch to connection con2
614+BEGIN;
615+SELECT b FROM t WHERE a=2 FOR UPDATE;
616+# Switch to connection con1
617+SELECT b FROM t WHERE a=2 FOR UPDATE;
618+# Switch to connection con2
619+SELECT b FROM t WHERE a=1 FOR UPDATE;
620+# Switch to connection con1
621+ROLLBACK;
622+# Switch to connection con2
623+ROLLBACK;
624+# Switch to connection con3
625+Deadlocks: 1
626+# Drop test table
627+drop table t;
628
629=== removed file 'Percona-Server/mysql-test/r/percona_log_slow_admin_statements-config.result'
630--- Percona-Server/mysql-test/r/percona_log_slow_admin_statements-config.result 2013-05-27 12:16:36 +0000
631+++ Percona-Server/mysql-test/r/percona_log_slow_admin_statements-config.result 1970-01-01 00:00:00 +0000
632@@ -1,6 +0,0 @@
633-SHOW GLOBAL VARIABLES like 'log_slow_admin_statements';
634-Variable_name Value
635-log_slow_admin_statements ON
636-SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='log_slow_admin_statements';
637-VARIABLE_NAME VARIABLE_VALUE
638-LOG_SLOW_ADMIN_STATEMENTS ON
639
640=== added file 'Percona-Server/mysql-test/r/percona_log_slow_admin_statements-config_foo.result'
641--- Percona-Server/mysql-test/r/percona_log_slow_admin_statements-config_foo.result 1970-01-01 00:00:00 +0000
642+++ Percona-Server/mysql-test/r/percona_log_slow_admin_statements-config_foo.result 2013-05-27 12:16:38 +0000
643@@ -0,0 +1,7 @@
644+call mtr.add_suppression("option 'log_slow_admin_statements': boolean value 'foo' wasn't recognized. Set to OFF.");
645+SHOW GLOBAL VARIABLES like 'log_slow_admin_statements';
646+Variable_name Value
647+log_slow_admin_statements OFF
648+SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='log_slow_admin_statements';
649+VARIABLE_NAME VARIABLE_VALUE
650+LOG_SLOW_ADMIN_STATEMENTS OFF
651
652=== removed file 'Percona-Server/mysql-test/r/percona_log_slow_admin_statements-config_true.result'
653--- Percona-Server/mysql-test/r/percona_log_slow_admin_statements-config_true.result 2013-05-27 12:16:36 +0000
654+++ Percona-Server/mysql-test/r/percona_log_slow_admin_statements-config_true.result 1970-01-01 00:00:00 +0000
655@@ -1,6 +0,0 @@
656-SHOW GLOBAL VARIABLES like 'log_slow_admin_statements';
657-Variable_name Value
658-log_slow_admin_statements ON
659-SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='log_slow_admin_statements';
660-VARIABLE_NAME VARIABLE_VALUE
661-LOG_SLOW_ADMIN_STATEMENTS ON
662
663=== removed file 'Percona-Server/mysql-test/r/percona_log_slow_filter-cl.result'
664--- Percona-Server/mysql-test/r/percona_log_slow_filter-cl.result 2013-05-27 12:16:36 +0000
665+++ Percona-Server/mysql-test/r/percona_log_slow_filter-cl.result 1970-01-01 00:00:00 +0000
666@@ -1,6 +0,0 @@
667-SHOW VARIABLES LIKE 'log_slow_filter';
668-Variable_name Value
669-log_slow_filter full_join
670-SHOW GLOBAL VARIABLES LIKE 'log_slow_filter';
671-Variable_name Value
672-log_slow_filter full_join
673
674=== removed file 'Percona-Server/mysql-test/r/percona_min_examined_row_limit.result'
675--- Percona-Server/mysql-test/r/percona_min_examined_row_limit.result 2013-05-27 12:16:36 +0000
676+++ Percona-Server/mysql-test/r/percona_min_examined_row_limit.result 1970-01-01 00:00:00 +0000
677@@ -1,35 +0,0 @@
678-drop table if exists t;
679-create table t(id INT PRIMARY KEY);
680-insert into t values(1);
681-insert into t values(2);
682-insert into t values(3);
683-SET GLOBAL long_query_time=2;
684-SET GLOBAL slow_query_log_use_global_control='long_query_time,min_examined_row_limit';
685-[log_start.inc] percona.slow_extended.min_examined_row_limit
686-SET SESSION query_exec_time=2.1;
687-SELECT 1;
688-1
689-1
690-SET GLOBAL min_examined_row_limit=5;
691-SELECT * FROM t AS t1, t AS t2;
692-id id
693-1 1
694-2 1
695-3 1
696-1 2
697-2 2
698-3 2
699-1 3
700-2 3
701-3 3
702-SELECT 1;
703-1
704-1
705-SET SESSION query_exec_time=default;
706-[log_stop.inc] percona.slow_extended.min_examined_row_limit
707-SET GLOBAL min_examined_row_limit=default;
708-SET GLOBAL slow_query_log_use_global_control=default;
709-SET GLOBAL long_query_time=default;
710-[log_grep.inc] file: percona.slow_extended.min_examined_row_limit pattern: Query_time
711-[log_grep.inc] lines: 1
712-DROP TABLE t;
713
714=== modified file 'Percona-Server/mysql-test/r/percona_mysqldump_innodb_optimize_keys.result'
715--- Percona-Server/mysql-test/r/percona_mysqldump_innodb_optimize_keys.result 2013-05-13 04:25:56 +0000
716+++ Percona-Server/mysql-test/r/percona_mysqldump_innodb_optimize_keys.result 2013-05-27 12:16:38 +0000
717@@ -477,3 +477,50 @@
718
719 ######################################
720 DROP TABLE t1;
721+CREATE TABLE `t1` (
722+`id` int(11) NOT NULL AUTO_INCREMENT,
723+`a` int(11) NOT NULL,
724+PRIMARY KEY (`id`),
725+KEY `a` (`a`),
726+CONSTRAINT `a` FOREIGN KEY (`a`) REFERENCES `t1` (`id`)
727+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
728+######################################
729+
730+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
731+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
732+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
733+/*!40101 SET NAMES utf8 */;
734+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
735+/*!40103 SET TIME_ZONE='+00:00' */;
736+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
737+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
738+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
739+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
740+DROP TABLE IF EXISTS `t1`;
741+/*!40101 SET @saved_cs_client = @@character_set_client */;
742+/*!40101 SET character_set_client = utf8 */;
743+CREATE TABLE `t1` (
744+ `id` int(11) NOT NULL AUTO_INCREMENT,
745+ `a` int(11) NOT NULL,
746+ PRIMARY KEY (`id`),
747+ KEY `a` (`a`),
748+ CONSTRAINT `a` FOREIGN KEY (`a`) REFERENCES `t1` (`id`)
749+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
750+/*!40101 SET character_set_client = @saved_cs_client */;
751+
752+LOCK TABLES `t1` WRITE;
753+/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
754+/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
755+UNLOCK TABLES;
756+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
757+
758+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
759+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
760+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
761+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
762+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
763+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
764+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
765+
766+######################################
767+DROP TABLE t1;
768
769=== added file 'Percona-Server/mysql-test/r/percona_query_cache_with_comments_crash.result'
770--- Percona-Server/mysql-test/r/percona_query_cache_with_comments_crash.result 1970-01-01 00:00:00 +0000
771+++ Percona-Server/mysql-test/r/percona_query_cache_with_comments_crash.result 2013-05-27 12:16:38 +0000
772@@ -0,0 +1,21 @@
773+set GLOBAL query_cache_size=1355776;
774+drop table if exists t1;
775+create table t1 (a int not null);
776+insert into t1 values (1),(2),(3);
777+flush query cache;
778+flush query cache;
779+reset query cache;
780+flush status;
781+( select * from t1 );
782+a
783+1
784+2
785+3
786+/*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := REPLACE(REPLACE(@@SQL_MODE, 'ANSI_QUOTES', ''), ',,', ','), @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */;
787+/* only comment */;
788+# only comment
789+;
790+-- only comment
791+;
792+DROP TABLE t1;
793+SET GLOBAL query_cache_size= default;
794
795=== removed file 'Percona-Server/mysql-test/r/percona_query_cache_with_comments_prepared_statements.result'
796--- Percona-Server/mysql-test/r/percona_query_cache_with_comments_prepared_statements.result 2013-05-27 12:16:36 +0000
797+++ Percona-Server/mysql-test/r/percona_query_cache_with_comments_prepared_statements.result 1970-01-01 00:00:00 +0000
798@@ -1,396 +0,0 @@
799-set GLOBAL query_cache_size=1355776;
800-flush query cache;
801-flush query cache;
802-reset query cache;
803-flush status;
804-drop table if exists t1;
805-create table t1 (a int not null);
806-insert into t1 values (1),(2),(3);
807-set global query_cache_strip_comments=ON;
808-show status like "Qcache_queries_in_cache";
809-Variable_name Value
810-Qcache_queries_in_cache 0
811-show status like "Qcache_inserts";
812-Variable_name Value
813-Qcache_inserts 0
814-show status like "Qcache_hits";
815-Variable_name Value
816-Qcache_hits 0
817-prepare stmt from '/* with comment */ select * from t1';
818-execute stmt;
819-a
820-1
821-2
822-3
823-show status like "Qcache_queries_in_cache";
824-Variable_name Value
825-Qcache_queries_in_cache 1
826-show status like "Qcache_inserts";
827-Variable_name Value
828-Qcache_inserts 1
829-show status like "Qcache_hits";
830-Variable_name Value
831-Qcache_hits 0
832-execute stmt;
833-a
834-1
835-2
836-3
837-execute stmt;
838-a
839-1
840-2
841-3
842-execute stmt;
843-a
844-1
845-2
846-3
847-execute stmt;
848-a
849-1
850-2
851-3
852-execute stmt;
853-a
854-1
855-2
856-3
857-show status like "Qcache_queries_in_cache";
858-Variable_name Value
859-Qcache_queries_in_cache 1
860-show status like "Qcache_inserts";
861-Variable_name Value
862-Qcache_inserts 1
863-show status like "Qcache_hits";
864-Variable_name Value
865-Qcache_hits 5
866-prepare stmt from 'select * from t1';
867-execute stmt;
868-a
869-1
870-2
871-3
872-show status like "Qcache_queries_in_cache";
873-Variable_name Value
874-Qcache_queries_in_cache 1
875-show status like "Qcache_inserts";
876-Variable_name Value
877-Qcache_inserts 1
878-show status like "Qcache_hits";
879-Variable_name Value
880-Qcache_hits 6
881-prepare stmt from 'select * /*internal comment*/from t1';
882-execute stmt;
883-a
884-1
885-2
886-3
887-show status like "Qcache_queries_in_cache";
888-Variable_name Value
889-Qcache_queries_in_cache 1
890-show status like "Qcache_inserts";
891-Variable_name Value
892-Qcache_inserts 1
893-show status like "Qcache_hits";
894-Variable_name Value
895-Qcache_hits 7
896-prepare stmt from 'select * /*internal comment*/ from t1';
897-execute stmt;
898-a
899-1
900-2
901-3
902-show status like "Qcache_queries_in_cache";
903-Variable_name Value
904-Qcache_queries_in_cache 1
905-show status like "Qcache_inserts";
906-Variable_name Value
907-Qcache_inserts 1
908-show status like "Qcache_hits";
909-Variable_name Value
910-Qcache_hits 8
911-prepare stmt from 'select * from t1 /* at the end */';
912-execute stmt;
913-a
914-1
915-2
916-3
917-show status like "Qcache_queries_in_cache";
918-Variable_name Value
919-Qcache_queries_in_cache 1
920-show status like "Qcache_inserts";
921-Variable_name Value
922-Qcache_inserts 1
923-show status like "Qcache_hits";
924-Variable_name Value
925-Qcache_hits 9
926-prepare stmt from 'select * from t1 /* with "quote" */';
927-execute stmt;
928-a
929-1
930-2
931-3
932-show status like "Qcache_queries_in_cache";
933-Variable_name Value
934-Qcache_queries_in_cache 1
935-show status like "Qcache_inserts";
936-Variable_name Value
937-Qcache_inserts 1
938-show status like "Qcache_hits";
939-Variable_name Value
940-Qcache_hits 10
941-prepare stmt from 'select * from t1 /* with \'quote\' */';
942-execute stmt;
943-a
944-1
945-2
946-3
947-show status like "Qcache_queries_in_cache";
948-Variable_name Value
949-Qcache_queries_in_cache 1
950-show status like "Qcache_inserts";
951-Variable_name Value
952-Qcache_inserts 1
953-show status like "Qcache_hits";
954-Variable_name Value
955-Qcache_hits 11
956-prepare stmt from 'select * from t1 # 123
957-';
958-execute stmt;
959-a
960-1
961-2
962-3
963-show status like "Qcache_queries_in_cache";
964-Variable_name Value
965-Qcache_queries_in_cache 1
966-show status like "Qcache_inserts";
967-Variable_name Value
968-Qcache_inserts 1
969-show status like "Qcache_hits";
970-Variable_name Value
971-Qcache_hits 12
972-prepare stmt from 'select * from t1 # 123 with "quote"
973-';
974-execute stmt;
975-a
976-1
977-2
978-3
979-show status like "Qcache_queries_in_cache";
980-Variable_name Value
981-Qcache_queries_in_cache 1
982-show status like "Qcache_inserts";
983-Variable_name Value
984-Qcache_inserts 1
985-show status like "Qcache_hits";
986-Variable_name Value
987-Qcache_hits 13
988-prepare stmt from 'select * from t1 # 123 with \'quote\'
989-';
990-execute stmt;
991-a
992-1
993-2
994-3
995-show status like "Qcache_queries_in_cache";
996-Variable_name Value
997-Qcache_queries_in_cache 1
998-show status like "Qcache_inserts";
999-Variable_name Value
1000-Qcache_inserts 1
1001-show status like "Qcache_hits";
1002-Variable_name Value
1003-Qcache_hits 14
1004-prepare stmt from 'select * from t1
1005-# 123
1006-';
1007-execute stmt;
1008-a
1009-1
1010-2
1011-3
1012-show status like "Qcache_queries_in_cache";
1013-Variable_name Value
1014-Qcache_queries_in_cache 1
1015-show status like "Qcache_inserts";
1016-Variable_name Value
1017-Qcache_inserts 1
1018-show status like "Qcache_hits";
1019-Variable_name Value
1020-Qcache_hits 15
1021-prepare stmt from '#456
1022-select * from t1
1023-# 123
1024-';
1025-execute stmt;
1026-a
1027-1
1028-2
1029-3
1030-show status like "Qcache_queries_in_cache";
1031-Variable_name Value
1032-Qcache_queries_in_cache 1
1033-show status like "Qcache_inserts";
1034-Variable_name Value
1035-Qcache_inserts 1
1036-show status like "Qcache_hits";
1037-Variable_name Value
1038-Qcache_hits 16
1039-prepare stmt from 'select * from t1 -- 123
1040-';
1041-execute stmt;
1042-a
1043-1
1044-2
1045-3
1046-show status like "Qcache_queries_in_cache";
1047-Variable_name Value
1048-Qcache_queries_in_cache 1
1049-show status like "Qcache_inserts";
1050-Variable_name Value
1051-Qcache_inserts 1
1052-show status like "Qcache_hits";
1053-Variable_name Value
1054-Qcache_hits 17
1055-prepare stmt from 'select * from t1
1056--- 123
1057-';
1058-execute stmt;
1059-a
1060-1
1061-2
1062-3
1063-show status like "Qcache_queries_in_cache";
1064-Variable_name Value
1065-Qcache_queries_in_cache 1
1066-show status like "Qcache_inserts";
1067-Variable_name Value
1068-Qcache_inserts 1
1069-show status like "Qcache_hits";
1070-Variable_name Value
1071-Qcache_hits 18
1072-prepare stmt from '-- comment in first
1073-select * from t1
1074-# 123
1075-';
1076-execute stmt;
1077-a
1078-1
1079-2
1080-3
1081-show status like "Qcache_queries_in_cache";
1082-Variable_name Value
1083-Qcache_queries_in_cache 1
1084-show status like "Qcache_inserts";
1085-Variable_name Value
1086-Qcache_inserts 1
1087-show status like "Qcache_hits";
1088-Variable_name Value
1089-Qcache_hits 19
1090-prepare stmt from '(#456(
1091-select * from t1
1092-# 123(
1093-)';
1094-execute stmt;
1095-a
1096-1
1097-2
1098-3
1099-show status like "Qcache_queries_in_cache";
1100-Variable_name Value
1101-Qcache_queries_in_cache 2
1102-show status like "Qcache_inserts";
1103-Variable_name Value
1104-Qcache_inserts 2
1105-show status like "Qcache_hits";
1106-Variable_name Value
1107-Qcache_hits 19
1108-prepare stmt from '/*test*/(-- comment in first(
1109-select * from t1
1110--- 123 asdasd
1111-/* test */)';
1112-execute stmt;
1113-a
1114-1
1115-2
1116-3
1117-show status like "Qcache_queries_in_cache";
1118-Variable_name Value
1119-Qcache_queries_in_cache 2
1120-show status like "Qcache_inserts";
1121-Variable_name Value
1122-Qcache_inserts 2
1123-show status like "Qcache_hits";
1124-Variable_name Value
1125-Qcache_hits 20
1126-prepare stmt from 'select "test",a from t1';
1127-execute stmt;
1128-test a
1129-test 1
1130-test 2
1131-test 3
1132-execute stmt;
1133-test a
1134-test 1
1135-test 2
1136-test 3
1137-show status like "Qcache_queries_in_cache";
1138-Variable_name Value
1139-Qcache_queries_in_cache 3
1140-show status like "Qcache_inserts";
1141-Variable_name Value
1142-Qcache_inserts 3
1143-show status like "Qcache_hits";
1144-Variable_name Value
1145-Qcache_hits 21
1146-prepare stmt from 'select "test /* internal \'comment\' */",a from t1';
1147-execute stmt;
1148-test /* internal 'comment' */ a
1149-test /* internal 'comment' */ 1
1150-test /* internal 'comment' */ 2
1151-test /* internal 'comment' */ 3
1152-show status like "Qcache_queries_in_cache";
1153-Variable_name Value
1154-Qcache_queries_in_cache 4
1155-show status like "Qcache_inserts";
1156-Variable_name Value
1157-Qcache_inserts 4
1158-show status like "Qcache_hits";
1159-Variable_name Value
1160-Qcache_hits 21
1161-prepare stmt from 'select "test #internal comment" ,a from t1';
1162-execute stmt;
1163-test #internal comment a
1164-test #internal comment 1
1165-test #internal comment 2
1166-test #internal comment 3
1167-show status like "Qcache_queries_in_cache";
1168-Variable_name Value
1169-Qcache_queries_in_cache 5
1170-show status like "Qcache_inserts";
1171-Variable_name Value
1172-Qcache_inserts 5
1173-show status like "Qcache_hits";
1174-Variable_name Value
1175-Qcache_hits 21
1176-prepare stmt from 'select "test #internal comment" #external comment
1177-,a from t1';
1178-execute stmt;
1179-test #internal comment a
1180-test #internal comment 1
1181-test #internal comment 2
1182-test #internal comment 3
1183-show status like "Qcache_queries_in_cache";
1184-Variable_name Value
1185-Qcache_queries_in_cache 5
1186-show status like "Qcache_inserts";
1187-Variable_name Value
1188-Qcache_inserts 5
1189-show status like "Qcache_hits";
1190-Variable_name Value
1191-Qcache_hits 22
1192-DROP TABLE t1;
1193-SET GLOBAL query_cache_size= default;
1194-set global query_cache_strip_comments=OFF;
1195
1196=== added file 'Percona-Server/mysql-test/r/percona_status_wait_query_cache_mutex.result'
1197--- Percona-Server/mysql-test/r/percona_status_wait_query_cache_mutex.result 1970-01-01 00:00:00 +0000
1198+++ Percona-Server/mysql-test/r/percona_status_wait_query_cache_mutex.result 2013-05-27 12:16:38 +0000
1199@@ -0,0 +1,20 @@
1200+SET GLOBAL query_cache_size=1355776;
1201+flush query cache;
1202+flush query cache;
1203+reset query cache;
1204+flush status;
1205+SET DEBUG_SYNC='after_query_cache_mutex SIGNAL mutex_locked WAIT_FOR unlock_mutex';
1206+SELECT "mutex_locked_query" as action;
1207+SET DEBUG_SYNC='now WAIT_FOR mutex_locked';
1208+SET DEBUG_SYNC='before_query_cache_mutex SIGNAL try_lock_mutex';
1209+SELECT "try_lock_mutex_query" as action;
1210+SET DEBUG_SYNC='now WAIT_FOR try_lock_mutex';
1211+SELECT SQL_NO_CACHE state FROM INFORMATION_SCHEMA.PROCESSLIST WHERE info='SELECT "try_lock_mutex_query" as action';
1212+state
1213+Waiting on query cache mutex
1214+SET DEBUG_SYNC='now SIGNAL unlock_mutex';
1215+action
1216+mutex_locked_query
1217+action
1218+try_lock_mutex_query
1219+SET GLOBAL query_cache_size=default;
1220
1221=== added file 'Percona-Server/mysql-test/r/pool_of_threads.result'
1222--- Percona-Server/mysql-test/r/pool_of_threads.result 1970-01-01 00:00:00 +0000
1223+++ Percona-Server/mysql-test/r/pool_of_threads.result 2013-05-27 12:16:38 +0000
1224@@ -0,0 +1,2169 @@
1225+drop table if exists t1,t2,t3,t4;
1226+CREATE TABLE t1 (
1227+Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
1228+Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
1229+);
1230+INSERT INTO t1 VALUES (9410,9412);
1231+select period from t1;
1232+period
1233+9410
1234+select * from t1;
1235+Period Varor_period
1236+9410 9412
1237+select t1.* from t1;
1238+Period Varor_period
1239+9410 9412
1240+CREATE TABLE t2 (
1241+auto int not null auto_increment,
1242+fld1 int(6) unsigned zerofill DEFAULT '000000' NOT NULL,
1243+companynr tinyint(2) unsigned zerofill DEFAULT '00' NOT NULL,
1244+fld3 char(30) DEFAULT '' NOT NULL,
1245+fld4 char(35) DEFAULT '' NOT NULL,
1246+fld5 char(35) DEFAULT '' NOT NULL,
1247+fld6 char(4) DEFAULT '' NOT NULL,
1248+UNIQUE fld1 (fld1),
1249+KEY fld3 (fld3),
1250+PRIMARY KEY (auto)
1251+);
1252+select t2.fld3 from t2 where companynr = 58 and fld3 like "%imaginable%";
1253+fld3
1254+imaginable
1255+select fld3 from t2 where fld3 like "%cultivation" ;
1256+fld3
1257+cultivation
1258+select t2.fld3,companynr from t2 where companynr = 57+1 order by fld3;
1259+fld3 companynr
1260+concoct 58
1261+druggists 58
1262+engrossing 58
1263+Eurydice 58
1264+exclaimers 58
1265+ferociousness 58
1266+hopelessness 58
1267+Huey 58
1268+imaginable 58
1269+judges 58
1270+merging 58
1271+ostrich 58
1272+peering 58
1273+Phelps 58
1274+presumes 58
1275+Ruth 58
1276+sentences 58
1277+Shylock 58
1278+straggled 58
1279+synergy 58
1280+thanking 58
1281+tying 58
1282+unlocks 58
1283+select fld3,companynr from t2 where companynr = 58 order by fld3;
1284+fld3 companynr
1285+concoct 58
1286+druggists 58
1287+engrossing 58
1288+Eurydice 58
1289+exclaimers 58
1290+ferociousness 58
1291+hopelessness 58
1292+Huey 58
1293+imaginable 58
1294+judges 58
1295+merging 58
1296+ostrich 58
1297+peering 58
1298+Phelps 58
1299+presumes 58
1300+Ruth 58
1301+sentences 58
1302+Shylock 58
1303+straggled 58
1304+synergy 58
1305+thanking 58
1306+tying 58
1307+unlocks 58
1308+select fld3 from t2 order by fld3 desc limit 10;
1309+fld3
1310+youthfulness
1311+yelped
1312+Wotan
1313+workers
1314+Witt
1315+witchcraft
1316+Winsett
1317+Willy
1318+willed
1319+wildcats
1320+select fld3 from t2 order by fld3 desc limit 5;
1321+fld3
1322+youthfulness
1323+yelped
1324+Wotan
1325+workers
1326+Witt
1327+select fld3 from t2 order by fld3 desc limit 5,5;
1328+fld3
1329+witchcraft
1330+Winsett
1331+Willy
1332+willed
1333+wildcats
1334+select t2.fld3 from t2 where fld3 = 'honeysuckle';
1335+fld3
1336+honeysuckle
1337+select t2.fld3 from t2 where fld3 LIKE 'honeysuckl_';
1338+fld3
1339+honeysuckle
1340+select t2.fld3 from t2 where fld3 LIKE 'hon_ysuckl_';
1341+fld3
1342+honeysuckle
1343+select t2.fld3 from t2 where fld3 LIKE 'honeysuckle%';
1344+fld3
1345+honeysuckle
1346+select t2.fld3 from t2 where fld3 LIKE 'h%le';
1347+fld3
1348+honeysuckle
1349+select t2.fld3 from t2 where fld3 LIKE 'honeysuckle_';
1350+fld3
1351+select t2.fld3 from t2 where fld3 LIKE 'don_t_find_me_please%';
1352+fld3
1353+explain select t2.fld3 from t2 where fld3 = 'honeysuckle';
1354+id select_type table type possible_keys key key_len ref rows Extra
1355+1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index
1356+explain select fld3 from t2 ignore index (fld3) where fld3 = 'honeysuckle';
1357+id select_type table type possible_keys key key_len ref rows Extra
1358+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
1359+explain select fld3 from t2 use index (fld1) where fld3 = 'honeysuckle';
1360+id select_type table type possible_keys key key_len ref rows Extra
1361+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
1362+explain select fld3 from t2 use index (fld3) where fld3 = 'honeysuckle';
1363+id select_type table type possible_keys key key_len ref rows Extra
1364+1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index
1365+explain select fld3 from t2 use index (fld1,fld3) where fld3 = 'honeysuckle';
1366+id select_type table type possible_keys key key_len ref rows Extra
1367+1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index
1368+explain select fld3 from t2 ignore index (fld3,not_used);
1369+ERROR 42000: Key 'not_used' doesn't exist in table 't2'
1370+explain select fld3 from t2 use index (not_used);
1371+ERROR 42000: Key 'not_used' doesn't exist in table 't2'
1372+select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3;
1373+fld3
1374+honeysuckle
1375+honoring
1376+explain select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3;
1377+id select_type table type possible_keys key key_len ref rows Extra
1378+1 SIMPLE t2 range fld3 fld3 30 NULL 2 Using where; Using index
1379+select fld1,fld3 from t2 where fld3="Colombo" or fld3 = "nondecreasing" order by fld3;
1380+fld1 fld3
1381+148504 Colombo
1382+068305 Colombo
1383+000000 nondecreasing
1384+select fld1,fld3 from t2 where companynr = 37 and fld3 = 'appendixes';
1385+fld1 fld3
1386+232605 appendixes
1387+1232605 appendixes
1388+1232606 appendixes
1389+1232607 appendixes
1390+1232608 appendixes
1391+1232609 appendixes
1392+select fld1 from t2 where fld1=250501 or fld1="250502";
1393+fld1
1394+250501
1395+250502
1396+explain select fld1 from t2 where fld1=250501 or fld1="250502";
1397+id select_type table type possible_keys key key_len ref rows Extra
1398+1 SIMPLE t2 range fld1 fld1 4 NULL 2 Using where; Using index
1399+select fld1 from t2 where fld1=250501 or fld1=250502 or fld1 >= 250505 and fld1 <= 250601 or fld1 between 250501 and 250502;
1400+fld1
1401+250501
1402+250502
1403+250505
1404+250601
1405+explain select fld1 from t2 where fld1=250501 or fld1=250502 or fld1 >= 250505 and fld1 <= 250601 or fld1 between 250501 and 250502;
1406+id select_type table type possible_keys key key_len ref rows Extra
1407+1 SIMPLE t2 range fld1 fld1 4 NULL 4 Using where; Using index
1408+select fld1,fld3 from t2 where companynr = 37 and fld3 like 'f%';
1409+fld1 fld3
1410+012001 flanking
1411+013602 foldout
1412+013606 fingerings
1413+018007 fanatic
1414+018017 featherweight
1415+018054 fetters
1416+018103 flint
1417+018104 flopping
1418+036002 funereal
1419+038017 fetched
1420+038205 firearm
1421+058004 Fenton
1422+088303 feminine
1423+186002 freakish
1424+188007 flurried
1425+188505 fitting
1426+198006 furthermore
1427+202301 Fitzpatrick
1428+208101 fiftieth
1429+208113 freest
1430+218008 finishers
1431+218022 feed
1432+218401 faithful
1433+226205 foothill
1434+226209 furnishings
1435+228306 forthcoming
1436+228311 fated
1437+231315 freezes
1438+232102 forgivably
1439+238007 filial
1440+238008 fixedly
1441+select fld3 from t2 where fld3 like "L%" and fld3 = "ok";
1442+fld3
1443+select fld3 from t2 where (fld3 like "C%" and fld3 = "Chantilly");
1444+fld3
1445+Chantilly
1446+select fld1,fld3 from t2 where fld1 like "25050%";
1447+fld1 fld3
1448+250501 poisoning
1449+250502 Iraqis
1450+250503 heaving
1451+250504 population
1452+250505 bomb
1453+select fld1,fld3 from t2 where fld1 like "25050_";
1454+fld1 fld3
1455+250501 poisoning
1456+250502 Iraqis
1457+250503 heaving
1458+250504 population
1459+250505 bomb
1460+select distinct companynr from t2;
1461+companynr
1462+00
1463+37
1464+36
1465+50
1466+58
1467+29
1468+40
1469+53
1470+65
1471+41
1472+34
1473+68
1474+select distinct companynr from t2 order by companynr;
1475+companynr
1476+00
1477+29
1478+34
1479+36
1480+37
1481+40
1482+41
1483+50
1484+53
1485+58
1486+65
1487+68
1488+select distinct companynr from t2 order by companynr desc;
1489+companynr
1490+68
1491+65
1492+58
1493+53
1494+50
1495+41
1496+40
1497+37
1498+36
1499+34
1500+29
1501+00
1502+select distinct t2.fld3,period from t2,t1 where companynr=37 and fld3 like "O%";
1503+fld3 period
1504+obliterates 9410
1505+offload 9410
1506+opaquely 9410
1507+organizer 9410
1508+overestimating 9410
1509+overlay 9410
1510+select distinct fld3 from t2 where companynr = 34 order by fld3;
1511+fld3
1512+absentee
1513+accessed
1514+ahead
1515+alphabetic
1516+Asiaticizations
1517+attitude
1518+aye
1519+bankruptcies
1520+belays
1521+Blythe
1522+bomb
1523+boulevard
1524+bulldozes
1525+cannot
1526+caressing
1527+charcoal
1528+checksumming
1529+chess
1530+clubroom
1531+colorful
1532+cosy
1533+creator
1534+crying
1535+Darius
1536+diffusing
1537+duality
1538+Eiffel
1539+Epiphany
1540+Ernestine
1541+explorers
1542+exterminated
1543+famine
1544+forked
1545+Gershwins
1546+heaving
1547+Hodges
1548+Iraqis
1549+Italianization
1550+Lagos
1551+landslide
1552+libretto
1553+Majorca
1554+mastering
1555+narrowed
1556+occurred
1557+offerers
1558+Palestine
1559+Peruvianizes
1560+pharmaceutic
1561+poisoning
1562+population
1563+Pygmalion
1564+rats
1565+realest
1566+recording
1567+regimented
1568+retransmitting
1569+reviver
1570+rouses
1571+scars
1572+sicker
1573+sleepwalk
1574+stopped
1575+sugars
1576+translatable
1577+uncles
1578+unexpected
1579+uprisings
1580+versatility
1581+vest
1582+select distinct fld3 from t2 limit 10;
1583+fld3
1584+abates
1585+abiding
1586+Abraham
1587+abrogating
1588+absentee
1589+abut
1590+accessed
1591+accruing
1592+accumulating
1593+accuracies
1594+select distinct fld3 from t2 having fld3 like "A%" limit 10;
1595+fld3
1596+abates
1597+abiding
1598+Abraham
1599+abrogating
1600+absentee
1601+abut
1602+accessed
1603+accruing
1604+accumulating
1605+accuracies
1606+select distinct substring(fld3,1,3) from t2 where fld3 like "A%";
1607+substring(fld3,1,3)
1608+aba
1609+abi
1610+Abr
1611+abs
1612+abu
1613+acc
1614+acq
1615+acu
1616+Ade
1617+adj
1618+Adl
1619+adm
1620+Ado
1621+ads
1622+adv
1623+aer
1624+aff
1625+afi
1626+afl
1627+afo
1628+agi
1629+ahe
1630+aim
1631+air
1632+Ald
1633+alg
1634+ali
1635+all
1636+alp
1637+alr
1638+ama
1639+ame
1640+amm
1641+ana
1642+and
1643+ane
1644+Ang
1645+ani
1646+Ann
1647+Ant
1648+api
1649+app
1650+aqu
1651+Ara
1652+arc
1653+Arm
1654+arr
1655+Art
1656+Asi
1657+ask
1658+asp
1659+ass
1660+ast
1661+att
1662+aud
1663+Aug
1664+aut
1665+ave
1666+avo
1667+awe
1668+aye
1669+Azt
1670+select distinct substring(fld3,1,3) as a from t2 having a like "A%" order by a limit 10;
1671+a
1672+aba
1673+abi
1674+Abr
1675+abs
1676+abu
1677+acc
1678+acq
1679+acu
1680+Ade
1681+adj
1682+select distinct substring(fld3,1,3) from t2 where fld3 like "A%" limit 10;
1683+substring(fld3,1,3)
1684+aba
1685+abi
1686+Abr
1687+abs
1688+abu
1689+acc
1690+acq
1691+acu
1692+Ade
1693+adj
1694+select distinct substring(fld3,1,3) as a from t2 having a like "A%" limit 10;
1695+a
1696+aba
1697+abi
1698+Abr
1699+abs
1700+abu
1701+acc
1702+acq
1703+acu
1704+Ade
1705+adj
1706+create table t3 (
1707+period int not null,
1708+name char(32) not null,
1709+companynr int not null,
1710+price double(11,0),
1711+price2 double(11,0),
1712+key (period),
1713+key (name)
1714+);
1715+create temporary table tmp engine = myisam select * from t3;
1716+insert into t3 select * from tmp;
1717+insert into tmp select * from t3;
1718+insert into t3 select * from tmp;
1719+insert into tmp select * from t3;
1720+insert into t3 select * from tmp;
1721+insert into tmp select * from t3;
1722+insert into t3 select * from tmp;
1723+insert into tmp select * from t3;
1724+insert into t3 select * from tmp;
1725+insert into tmp select * from t3;
1726+insert into t3 select * from tmp;
1727+insert into tmp select * from t3;
1728+insert into t3 select * from tmp;
1729+insert into tmp select * from t3;
1730+insert into t3 select * from tmp;
1731+insert into tmp select * from t3;
1732+insert into t3 select * from tmp;
1733+alter table t3 add t2nr int not null auto_increment primary key first;
1734+drop table tmp;
1735+SET BIG_TABLES=1;
1736+select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10;
1737+namn
1738+Abraham Abraham
1739+abrogating abrogating
1740+admonishing admonishing
1741+Adolph Adolph
1742+afield afield
1743+aging aging
1744+ammonium ammonium
1745+analyzable analyzable
1746+animals animals
1747+animized animized
1748+SET BIG_TABLES=0;
1749+select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10;
1750+concat(fld3," ",fld3)
1751+Abraham Abraham
1752+abrogating abrogating
1753+admonishing admonishing
1754+Adolph Adolph
1755+afield afield
1756+aging aging
1757+ammonium ammonium
1758+analyzable analyzable
1759+animals animals
1760+animized animized
1761+select distinct fld5 from t2 limit 10;
1762+fld5
1763+neat
1764+Steinberg
1765+jarring
1766+tinily
1767+balled
1768+persist
1769+attainments
1770+fanatic
1771+measures
1772+rightfulness
1773+select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
1774+fld3 count(*)
1775+affixed 1
1776+and 1
1777+annoyers 1
1778+Anthony 1
1779+assayed 1
1780+assurers 1
1781+attendants 1
1782+bedlam 1
1783+bedpost 1
1784+boasted 1
1785+SET BIG_TABLES=1;
1786+select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
1787+fld3 count(*)
1788+affixed 1
1789+and 1
1790+annoyers 1
1791+Anthony 1
1792+assayed 1
1793+assurers 1
1794+attendants 1
1795+bedlam 1
1796+bedpost 1
1797+boasted 1
1798+SET BIG_TABLES=0;
1799+select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10;
1800+fld3 repeat("a",length(fld3)) count(*)
1801+circus aaaaaa 1
1802+cited aaaaa 1
1803+Colombo aaaaaaa 1
1804+congresswoman aaaaaaaaaaaaa 1
1805+contrition aaaaaaaaaa 1
1806+corny aaaaa 1
1807+cultivation aaaaaaaaaaa 1
1808+definiteness aaaaaaaaaaaa 1
1809+demultiplex aaaaaaaaaaa 1
1810+disappointing aaaaaaaaaaaaa 1
1811+select distinct companynr,rtrim(space(512+companynr)) from t3 order by 1,2;
1812+companynr rtrim(space(512+companynr))
1813+37
1814+78
1815+101
1816+154
1817+311
1818+447
1819+512
1820+select distinct fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr order by fld3;
1821+fld3
1822+explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr order by t3.t2nr,fld3;
1823+id select_type table type possible_keys key key_len ref rows Extra
1824+1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort
1825+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index
1826+explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period;
1827+id select_type table type possible_keys key key_len ref rows Extra
1828+1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using temporary; Using filesort
1829+1 SIMPLE t3 ref period period 4 test.t1.period 4181 NULL
1830+explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10;
1831+id select_type table type possible_keys key key_len ref rows Extra
1832+1 SIMPLE t3 index period period 4 NULL 1 NULL
1833+1 SIMPLE t1 ref period period 4 test.t3.period 4181 NULL
1834+explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10;
1835+id select_type table type possible_keys key key_len ref rows Extra
1836+1 SIMPLE t1 index period period 4 NULL 1 NULL
1837+1 SIMPLE t3 ref period period 4 test.t1.period 4181 NULL
1838+select period from t1;
1839+period
1840+9410
1841+select period from t1 where period=1900;
1842+period
1843+select fld3,period from t1,t2 where fld1 = 011401 order by period;
1844+fld3 period
1845+breaking 9410
1846+select fld3,period from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period=1001;
1847+fld3 period
1848+breaking 1001
1849+explain select fld3,period from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period;
1850+id select_type table type possible_keys key key_len ref rows Extra
1851+1 SIMPLE t2 const fld1 fld1 4 const 1 NULL
1852+1 SIMPLE t3 const PRIMARY,period PRIMARY 4 const 1 NULL
1853+select fld3,period from t2,t1 where companynr*10 = 37*10;
1854+fld3 period
1855+breaking 9410
1856+Romans 9410
1857+intercepted 9410
1858+bewilderingly 9410
1859+astound 9410
1860+admonishing 9410
1861+sumac 9410
1862+flanking 9410
1863+combed 9410
1864+subjective 9410
1865+scatterbrain 9410
1866+Eulerian 9410
1867+Kane 9410
1868+overlay 9410
1869+perturb 9410
1870+goblins 9410
1871+annihilates 9410
1872+Wotan 9410
1873+snatching 9410
1874+concludes 9410
1875+laterally 9410
1876+yelped 9410
1877+grazing 9410
1878+Baird 9410
1879+celery 9410
1880+misunderstander 9410
1881+handgun 9410
1882+foldout 9410
1883+mystic 9410
1884+succumbed 9410
1885+Nabisco 9410
1886+fingerings 9410
1887+aging 9410
1888+afield 9410
1889+ammonium 9410
1890+boat 9410
1891+intelligibility 9410
1892+Augustine 9410
1893+teethe 9410
1894+dreaded 9410
1895+scholastics 9410
1896+audiology 9410
1897+wallet 9410
1898+parters 9410
1899+eschew 9410
1900+quitter 9410
1901+neat 9410
1902+Steinberg 9410
1903+jarring 9410
1904+tinily 9410
1905+balled 9410
1906+persist 9410
1907+attainments 9410
1908+fanatic 9410
1909+measures 9410
1910+rightfulness 9410
1911+capably 9410
1912+impulsive 9410
1913+starlet 9410
1914+terminators 9410
1915+untying 9410
1916+announces 9410
1917+featherweight 9410
1918+pessimist 9410
1919+daughter 9410
1920+decliner 9410
1921+lawgiver 9410
1922+stated 9410
1923+readable 9410
1924+attrition 9410
1925+cascade 9410
1926+motors 9410
1927+interrogate 9410
1928+pests 9410
1929+stairway 9410
1930+dopers 9410
1931+testicle 9410
1932+Parsifal 9410
1933+leavings 9410
1934+postulation 9410
1935+squeaking 9410
1936+contrasted 9410
1937+leftover 9410
1938+whiteners 9410
1939+erases 9410
1940+Punjab 9410
1941+Merritt 9410
1942+Quixotism 9410
1943+sweetish 9410
1944+dogging 9410
1945+scornfully 9410
1946+bellow 9410
1947+bills 9410
1948+cupboard 9410
1949+sureties 9410
1950+puddings 9410
1951+fetters 9410
1952+bivalves 9410
1953+incurring 9410
1954+Adolph 9410
1955+pithed 9410
1956+Miles 9410
1957+trimmings 9410
1958+tragedies 9410
1959+skulking 9410
1960+flint 9410
1961+flopping 9410
1962+relaxing 9410
1963+offload 9410
1964+suites 9410
1965+lists 9410
1966+animized 9410
1967+multilayer 9410
1968+standardizes 9410
1969+Judas 9410
1970+vacuuming 9410
1971+dentally 9410
1972+humanness 9410
1973+inch 9410
1974+Weissmuller 9410
1975+irresponsibly 9410
1976+luckily 9410
1977+culled 9410
1978+medical 9410
1979+bloodbath 9410
1980+subschema 9410
1981+animals 9410
1982+Micronesia 9410
1983+repetitions 9410
1984+Antares 9410
1985+ventilate 9410
1986+pityingly 9410
1987+interdependent 9410
1988+Graves 9410
1989+neonatal 9410
1990+chafe 9410
1991+honoring 9410
1992+realtor 9410
1993+elite 9410
1994+funereal 9410
1995+abrogating 9410
1996+sorters 9410
1997+Conley 9410
1998+lectured 9410
1999+Abraham 9410
2000+Hawaii 9410
2001+cage 9410
2002+hushes 9410
2003+Simla 9410
2004+reporters 9410
2005+Dutchman 9410
2006+descendants 9410
2007+groupings 9410
2008+dissociate 9410
2009+coexist 9410
2010+Beebe 9410
2011+Taoism 9410
2012+Connally 9410
2013+fetched 9410
2014+checkpoints 9410
2015+rusting 9410
2016+galling 9410
2017+obliterates 9410
2018+traitor 9410
2019+resumes 9410
2020+analyzable 9410
2021+terminator 9410
2022+gritty 9410
2023+firearm 9410
2024+minima 9410
2025+Selfridge 9410
2026+disable 9410
2027+witchcraft 9410
2028+betroth 9410
2029+Manhattanize 9410
2030+imprint 9410
2031+peeked 9410
2032+swelling 9410
2033+interrelationships 9410
2034+riser 9410
2035+Gandhian 9410
2036+peacock 9410
2037+bee 9410
2038+kanji 9410
2039+dental 9410
2040+scarf 9410
2041+chasm 9410
2042+insolence 9410
2043+syndicate 9410
2044+alike 9410
2045+imperial 9410
2046+convulsion 9410
2047+railway 9410
2048+validate 9410
2049+normalizes 9410
2050+comprehensive 9410
2051+chewing 9410
2052+denizen 9410
2053+schemer 9410
2054+chronicle 9410
2055+Kline 9410
2056+Anatole 9410
2057+partridges 9410
2058+brunch 9410
2059+recruited 9410
2060+dimensions 9410
2061+Chicana 9410
2062+announced 9410
2063+praised 9410
2064+employing 9410
2065+linear 9410
2066+quagmire 9410
2067+western 9410
2068+relishing 9410
2069+serving 9410
2070+scheduling 9410
2071+lore 9410
2072+eventful 9410
2073+arteriole 9410
2074+disentangle 9410
2075+cured 9410
2076+Fenton 9410
2077+avoidable 9410
2078+drains 9410
2079+detectably 9410
2080+husky 9410
2081+impelling 9410
2082+undoes 9410
2083+evened 9410
2084+squeezes 9410
2085+destroyer 9410
2086+rudeness 9410
2087+beaner 9410
2088+boorish 9410
2089+Everhart 9410
2090+encompass 9410
2091+mushrooms 9410
2092+Alison 9410
2093+externally 9410
2094+pellagra 9410
2095+cult 9410
2096+creek 9410
2097+Huffman 9410
2098+Majorca 9410
2099+governing 9410
2100+gadfly 9410
2101+reassigned 9410
2102+intentness 9410
2103+craziness 9410
2104+psychic 9410
2105+squabbled 9410
2106+burlesque 9410
2107+capped 9410
2108+extracted 9410
2109+DiMaggio 9410
2110+exclamation 9410
2111+subdirectory 9410
2112+Gothicism 9410
2113+feminine 9410
2114+metaphysically 9410
2115+sanding 9410
2116+Miltonism 9410
2117+freakish 9410
2118+index 9410
2119+straight 9410
2120+flurried 9410
2121+denotative 9410
2122+coming 9410
2123+commencements 9410
2124+gentleman 9410
2125+gifted 9410
2126+Shanghais 9410
2127+sportswriting 9410
2128+sloping 9410
2129+navies 9410
2130+leaflet 9410
2131+shooter 9410
2132+Joplin 9410
2133+babies 9410
2134+assails 9410
2135+admiring 9410
2136+swaying 9410
2137+Goldstine 9410
2138+fitting 9410
2139+Norwalk 9410
2140+analogy 9410
2141+deludes 9410
2142+cokes 9410
2143+Clayton 9410
2144+exhausts 9410
2145+causality 9410
2146+sating 9410
2147+icon 9410
2148+throttles 9410
2149+communicants 9410
2150+dehydrate 9410
2151+priceless 9410
2152+publicly 9410
2153+incidentals 9410
2154+commonplace 9410
2155+mumbles 9410
2156+furthermore 9410
2157+cautioned 9410
2158+parametrized 9410
2159+registration 9410
2160+sadly 9410
2161+positioning 9410
2162+babysitting 9410
2163+eternal 9410
2164+hoarder 9410
2165+congregates 9410
2166+rains 9410
2167+workers 9410
2168+sags 9410
2169+unplug 9410
2170+garage 9410
2171+boulder 9410
2172+specifics 9410
2173+Teresa 9410
2174+Winsett 9410
2175+convenient 9410
2176+buckboards 9410
2177+amenities 9410
2178+resplendent 9410
2179+sews 9410
2180+participated 9410
2181+Simon 9410
2182+certificates 9410
2183+Fitzpatrick 9410
2184+Evanston 9410
2185+misted 9410
2186+textures 9410
2187+save 9410
2188+count 9410
2189+rightful 9410
2190+chaperone 9410
2191+Lizzy 9410
2192+clenched 9410
2193+effortlessly 9410
2194+accessed 9410
2195+beaters 9410
2196+Hornblower 9410
2197+vests 9410
2198+indulgences 9410
2199+infallibly 9410
2200+unwilling 9410
2201+excrete 9410
2202+spools 9410
2203+crunches 9410
2204+overestimating 9410
2205+ineffective 9410
2206+humiliation 9410
2207+sophomore 9410
2208+star 9410
2209+rifles 9410
2210+dialysis 9410
2211+arriving 9410
2212+indulge 9410
2213+clockers 9410
2214+languages 9410
2215+Antarctica 9410
2216+percentage 9410
2217+ceiling 9410
2218+specification 9410
2219+regimented 9410
2220+ciphers 9410
2221+pictures 9410
2222+serpents 9410
2223+allot 9410
2224+realized 9410
2225+mayoral 9410
2226+opaquely 9410
2227+hostess 9410
2228+fiftieth 9410
2229+incorrectly 9410
2230+decomposition 9410
2231+stranglings 9410
2232+mixture 9410
2233+electroencephalography 9410
2234+similarities 9410
2235+charges 9410
2236+freest 9410
2237+Greenberg 9410
2238+tinting 9410
2239+expelled 9410
2240+warm 9410
2241+smoothed 9410
2242+deductions 9410
2243+Romano 9410
2244+bitterroot 9410
2245+corset 9410
2246+securing 9410
2247+environing 9410
2248+cute 9410
2249+Crays 9410
2250+heiress 9410
2251+inform 9410
2252+avenge 9410
2253+universals 9410
2254+Kinsey 9410
2255+ravines 9410
2256+bestseller 9410
2257+equilibrium 9410
2258+extents 9410
2259+relatively 9410
2260+pressure 9410
2261+critiques 9410
2262+befouled 9410
2263+rightfully 9410
2264+mechanizing 9410
2265+Latinizes 9410
2266+timesharing 9410
2267+Aden 9410
2268+embassies 9410
2269+males 9410
2270+shapelessly 9410
2271+mastering 9410
2272+Newtonian 9410
2273+finishers 9410
2274+abates 9410
2275+teem 9410
2276+kiting 9410
2277+stodgy 9410
2278+feed 9410
2279+guitars 9410
2280+airships 9410
2281+store 9410
2282+denounces 9410
2283+Pyle 9410
2284+Saxony 9410
2285+serializations 9410
2286+Peruvian 9410
2287+taxonomically 9410
2288+kingdom 9410
2289+stint 9410
2290+Sault 9410
2291+faithful 9410
2292+Ganymede 9410
2293+tidiness 9410
2294+gainful 9410
2295+contrary 9410
2296+Tipperary 9410
2297+tropics 9410
2298+theorizers 9410
2299+renew 9410
2300+already 9410
2301+terminal 9410
2302+Hegelian 9410
2303+hypothesizer 9410
2304+warningly 9410
2305+journalizing 9410
2306+nested 9410
2307+Lars 9410
2308+saplings 9410
2309+foothill 9410
2310+labeled 9410
2311+imperiously 9410
2312+reporters 9410
2313+furnishings 9410
2314+precipitable 9410
2315+discounts 9410
2316+excises 9410
2317+Stalin 9410
2318+despot 9410
2319+ripeness 9410
2320+Arabia 9410
2321+unruly 9410
2322+mournfulness 9410
2323+boom 9410
2324+slaughter 9410
2325+Sabine 9410
2326+handy 9410
2327+rural 9410
2328+organizer 9410
2329+shipyard 9410
2330+civics 9410
2331+inaccuracy 9410
2332+rules 9410
2333+juveniles 9410
2334+comprised 9410
2335+investigations 9410
2336+stabilizes 9410
2337+seminaries 9410
2338+Hunter 9410
2339+sporty 9410
2340+test 9410
2341+weasels 9410
2342+CERN 9410
2343+tempering 9410
2344+afore 9410
2345+Galatean 9410
2346+techniques 9410
2347+error 9410
2348+veranda 9410
2349+severely 9410
2350+Cassites 9410
2351+forthcoming 9410
2352+guides 9410
2353+vanish 9410
2354+lied 9410
2355+sawtooth 9410
2356+fated 9410
2357+gradually 9410
2358+widens 9410
2359+preclude 9410
2360+evenhandedly 9410
2361+percentage 9410
2362+disobedience 9410
2363+humility 9410
2364+gleaning 9410
2365+petted 9410
2366+bloater 9410
2367+minion 9410
2368+marginal 9410
2369+apiary 9410
2370+measures 9410
2371+precaution 9410
2372+repelled 9410
2373+primary 9410
2374+coverings 9410
2375+Artemia 9410
2376+navigate 9410
2377+spatial 9410
2378+Gurkha 9410
2379+meanwhile 9410
2380+Melinda 9410
2381+Butterfield 9410
2382+Aldrich 9410
2383+previewing 9410
2384+glut 9410
2385+unaffected 9410
2386+inmate 9410
2387+mineral 9410
2388+impending 9410
2389+meditation 9410
2390+ideas 9410
2391+miniaturizes 9410
2392+lewdly 9410
2393+title 9410
2394+youthfulness 9410
2395+creak 9410
2396+Chippewa 9410
2397+clamored 9410
2398+freezes 9410
2399+forgivably 9410
2400+reduce 9410
2401+McGovern 9410
2402+Nazis 9410
2403+epistle 9410
2404+socializes 9410
2405+conceptions 9410
2406+Kevin 9410
2407+uncovering 9410
2408+chews 9410
2409+appendixes 9410
2410+appendixes 9410
2411+appendixes 9410
2412+appendixes 9410
2413+appendixes 9410
2414+appendixes 9410
2415+raining 9410
2416+infest 9410
2417+compartment 9410
2418+minting 9410
2419+ducks 9410
2420+roped 9410
2421+waltz 9410
2422+Lillian 9410
2423+repressions 9410
2424+chillingly 9410
2425+noncritical 9410
2426+lithograph 9410
2427+spongers 9410
2428+parenthood 9410
2429+posed 9410
2430+instruments 9410
2431+filial 9410
2432+fixedly 9410
2433+relives 9410
2434+Pandora 9410
2435+watering 9410
2436+ungrateful 9410
2437+secures 9410
2438+poison 9410
2439+dusted 9410
2440+encompasses 9410
2441+presentation 9410
2442+Kantian 9410
2443+select fld3,period,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period >= 1001 and period <= 1002 and t2.companynr = 37 order by fld3,period, price;
2444+fld3 period price price2
2445+admonishing 1002 28357832 8723648
2446+analyzable 1002 28357832 8723648
2447+annihilates 1001 5987435 234724
2448+Antares 1002 28357832 8723648
2449+astound 1001 5987435 234724
2450+audiology 1001 5987435 234724
2451+Augustine 1002 28357832 8723648
2452+Baird 1002 28357832 8723648
2453+bewilderingly 1001 5987435 234724
2454+breaking 1001 5987435 234724
2455+Conley 1001 5987435 234724
2456+dentally 1002 28357832 8723648
2457+dissociate 1002 28357832 8723648
2458+elite 1001 5987435 234724
2459+eschew 1001 5987435 234724
2460+Eulerian 1001 5987435 234724
2461+flanking 1001 5987435 234724
2462+foldout 1002 28357832 8723648
2463+funereal 1002 28357832 8723648
2464+galling 1002 28357832 8723648
2465+Graves 1001 5987435 234724
2466+grazing 1001 5987435 234724
2467+groupings 1001 5987435 234724
2468+handgun 1001 5987435 234724
2469+humility 1002 28357832 8723648
2470+impulsive 1002 28357832 8723648
2471+inch 1001 5987435 234724
2472+intelligibility 1001 5987435 234724
2473+jarring 1001 5987435 234724
2474+lawgiver 1001 5987435 234724
2475+lectured 1002 28357832 8723648
2476+Merritt 1002 28357832 8723648
2477+neonatal 1001 5987435 234724
2478+offload 1002 28357832 8723648
2479+parters 1002 28357832 8723648
2480+pityingly 1002 28357832 8723648
2481+puddings 1002 28357832 8723648
2482+Punjab 1001 5987435 234724
2483+quitter 1002 28357832 8723648
2484+realtor 1001 5987435 234724
2485+relaxing 1001 5987435 234724
2486+repetitions 1001 5987435 234724
2487+resumes 1001 5987435 234724
2488+Romans 1002 28357832 8723648
2489+rusting 1001 5987435 234724
2490+scholastics 1001 5987435 234724
2491+skulking 1002 28357832 8723648
2492+stated 1002 28357832 8723648
2493+suites 1002 28357832 8723648
2494+sureties 1001 5987435 234724
2495+testicle 1002 28357832 8723648
2496+tinily 1002 28357832 8723648
2497+tragedies 1001 5987435 234724
2498+trimmings 1001 5987435 234724
2499+vacuuming 1001 5987435 234724
2500+ventilate 1001 5987435 234724
2501+wallet 1001 5987435 234724
2502+Weissmuller 1002 28357832 8723648
2503+Wotan 1002 28357832 8723648
2504+select t2.fld1,fld3,period,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period = 1001 and t2.companynr = 37;
2505+fld1 fld3 period price price2
2506+018201 relaxing 1001 5987435 234724
2507+018601 vacuuming 1001 5987435 234724
2508+018801 inch 1001 5987435 234724
2509+018811 repetitions 1001 5987435 234724
2510+create table t4 (
2511+companynr tinyint(2) unsigned zerofill NOT NULL default '00',
2512+companyname char(30) NOT NULL default '',
2513+PRIMARY KEY (companynr),
2514+UNIQUE KEY companyname(companyname)
2515+) ENGINE=MyISAM MAX_ROWS=50 PACK_KEYS=1 COMMENT='companynames';
2516+select STRAIGHT_JOIN t2.companynr,companyname from t4,t2 where t2.companynr=t4.companynr group by t2.companynr;
2517+companynr companyname
2518+00 Unknown
2519+29 company 1
2520+34 company 2
2521+36 company 3
2522+37 company 4
2523+40 company 5
2524+41 company 6
2525+50 company 11
2526+53 company 7
2527+58 company 8
2528+65 company 9
2529+68 company 10
2530+select SQL_SMALL_RESULT t2.companynr,companyname from t4,t2 where t2.companynr=t4.companynr group by t2.companynr;
2531+companynr companyname
2532+00 Unknown
2533+29 company 1
2534+34 company 2
2535+36 company 3
2536+37 company 4
2537+40 company 5
2538+41 company 6
2539+50 company 11
2540+53 company 7
2541+58 company 8
2542+65 company 9
2543+68 company 10
2544+select * from t1,t1 t12;
2545+Period Varor_period Period Varor_period
2546+9410 9412 9410 9412
2547+select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505;
2548+fld1 fld1
2549+250501 250501
2550+250502 250501
2551+250503 250501
2552+250504 250501
2553+250505 250501
2554+250501 250502
2555+250502 250502
2556+250503 250502
2557+250504 250502
2558+250505 250502
2559+250501 250503
2560+250502 250503
2561+250503 250503
2562+250504 250503
2563+250505 250503
2564+250501 250504
2565+250502 250504
2566+250503 250504
2567+250504 250504
2568+250505 250504
2569+250501 250505
2570+250502 250505
2571+250503 250505
2572+250504 250505
2573+250505 250505
2574+insert into t2 (fld1, companynr) values (999999,99);
2575+select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
2576+companynr companyname
2577+99 NULL
2578+select count(*) from t2 left join t4 using (companynr) where t4.companynr is not null;
2579+count(*)
2580+1199
2581+explain select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
2582+id select_type table type possible_keys key key_len ref rows Extra
2583+1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 NULL
2584+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using where; Not exists
2585+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr is null;
2586+id select_type table type possible_keys key key_len ref rows Extra
2587+1 SIMPLE t4 ALL NULL NULL NULL NULL 12 NULL
2588+1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where; Not exists; Using join buffer (Block Nested Loop)
2589+select companynr,companyname from t2 left join t4 using (companynr) where companynr is null;
2590+companynr companyname
2591+select count(*) from t2 left join t4 using (companynr) where companynr is not null;
2592+count(*)
2593+1200
2594+explain select companynr,companyname from t2 left join t4 using (companynr) where companynr is null;
2595+id select_type table type possible_keys key key_len ref rows Extra
2596+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
2597+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr is null;
2598+id select_type table type possible_keys key key_len ref rows Extra
2599+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
2600+delete from t2 where fld1=999999;
2601+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0;
2602+id select_type table type possible_keys key key_len ref rows Extra
2603+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
2604+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 NULL
2605+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0;
2606+id select_type table type possible_keys key key_len ref rows Extra
2607+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
2608+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 NULL
2609+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 and t4.companynr > 0;
2610+id select_type table type possible_keys key key_len ref rows Extra
2611+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
2612+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 NULL
2613+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0;
2614+id select_type table type possible_keys key key_len ref rows Extra
2615+1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
2616+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop)
2617+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0;
2618+id select_type table type possible_keys key key_len ref rows Extra
2619+1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
2620+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop)
2621+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 and companynr > 0;
2622+id select_type table type possible_keys key key_len ref rows Extra
2623+1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
2624+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop)
2625+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr is null;
2626+id select_type table type possible_keys key key_len ref rows Extra
2627+1 SIMPLE t4 ALL NULL NULL NULL NULL 12 NULL
2628+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop)
2629+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0 or t4.companynr > 0;
2630+id select_type table type possible_keys key key_len ref rows Extra
2631+1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 NULL
2632+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop)
2633+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where ifnull(t2.companynr,1)>0;
2634+id select_type table type possible_keys key key_len ref rows Extra
2635+1 SIMPLE t4 ALL NULL NULL NULL NULL 12 NULL
2636+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop)
2637+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr is null;
2638+id select_type table type possible_keys key key_len ref rows Extra
2639+1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
2640+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop)
2641+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0;
2642+id select_type table type possible_keys key key_len ref rows Extra
2643+1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
2644+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop)
2645+explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0;
2646+id select_type table type possible_keys key key_len ref rows Extra
2647+1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
2648+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop)
2649+select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
2650+companynr companynr
2651+37 36
2652+41 40
2653+explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
2654+id select_type table type possible_keys key key_len ref rows Extra
2655+1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary
2656+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop)
2657+select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008;
2658+fld1 companynr fld3 period
2659+038008 37 reporters 1008
2660+038208 37 Selfridge 1008
2661+select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009;
2662+fld1 companynr fld3 period
2663+038008 37 reporters 1008
2664+038208 37 Selfridge 1008
2665+select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009;
2666+fld1 companynr fld3 period
2667+038008 37 reporters 1008
2668+038208 37 Selfridge 1008
2669+select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909);
2670+period
2671+9410
2672+select period from t1 where ((period > 0 and period < 1) or (((period > 0 and period < 100) and (period > 10)) or (period > 10)) or (period > 0 and (period > 5 or period > 6)));
2673+period
2674+9410
2675+select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1;
2676+fld1
2677+250501
2678+250502
2679+250503
2680+250505
2681+select fld1 from t2 where fld1 in (250502,98005,98006,250503,250605,250606) and fld1 >=250502 and fld1 not in (250605,250606);
2682+fld1
2683+250502
2684+250503
2685+select fld1 from t2 where fld1 between 250502 and 250504;
2686+fld1
2687+250502
2688+250503
2689+250504
2690+select fld3 from t2 where (((fld3 like "_%L%" ) or (fld3 like "%ok%")) and ( fld3 like "L%" or fld3 like "G%")) and fld3 like "L%" ;
2691+fld3
2692+label
2693+labeled
2694+labeled
2695+landslide
2696+laterally
2697+leaflet
2698+lewdly
2699+Lillian
2700+luckily
2701+select count(*) from t1;
2702+count(*)
2703+1
2704+select companynr,count(*),sum(fld1) from t2 group by companynr;
2705+companynr count(*) sum(fld1)
2706+00 82 10355753
2707+29 95 14473298
2708+34 70 17788966
2709+36 215 22786296
2710+37 588 83602098
2711+40 37 6618386
2712+41 52 12816335
2713+50 11 1595438
2714+53 4 793210
2715+58 23 2254293
2716+65 10 2284055
2717+68 12 3097288
2718+select companynr,count(*) from t2 group by companynr order by companynr desc limit 5;
2719+companynr count(*)
2720+68 12
2721+65 10
2722+58 23
2723+53 4
2724+50 11
2725+select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 where companynr = 34 and fld4<>"";
2726+count(*) min(fld4) max(fld4) sum(fld1) avg(fld1) std(fld1) variance(fld1)
2727+70 absentee vest 17788966 254128.0857 3272.5939722090234 10709871.306938833
2728+explain extended select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 where companynr = 34 and fld4<>"";
2729+id select_type table type possible_keys key key_len ref rows filtered Extra
2730+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 100.00 Using where
2731+Warnings:
2732+Note 1003 /* select#1 */ select count(0) AS `count(*)`,min(`test`.`t2`.`fld4`) AS `min(fld4)`,max(`test`.`t2`.`fld4`) AS `max(fld4)`,sum(`test`.`t2`.`fld1`) AS `sum(fld1)`,avg(`test`.`t2`.`fld1`) AS `avg(fld1)`,std(`test`.`t2`.`fld1`) AS `std(fld1)`,variance(`test`.`t2`.`fld1`) AS `variance(fld1)` from `test`.`t2` where ((`test`.`t2`.`companynr` = 34) and (`test`.`t2`.`fld4` <> ''))
2733+select companynr,count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 group by companynr limit 3;
2734+companynr count(*) min(fld4) max(fld4) sum(fld1) avg(fld1) std(fld1) variance(fld1)
2735+00 82 Anthony windmills 10355753 126289.6707 115550.97568479746 13352027981.708656
2736+29 95 abut wetness 14473298 152350.5053 8368.547956641249 70032594.90260443
2737+34 70 absentee vest 17788966 254128.0857 3272.5939722090234 10709871.306938833
2738+select companynr,t2nr,count(price),sum(price),min(price),max(price),avg(price) from t3 where companynr = 37 group by companynr,t2nr limit 10;
2739+companynr t2nr count(price) sum(price) min(price) max(price) avg(price)
2740+37 1 1 5987435 5987435 5987435 5987435.0000
2741+37 2 1 28357832 28357832 28357832 28357832.0000
2742+37 3 1 39654943 39654943 39654943 39654943.0000
2743+37 11 1 5987435 5987435 5987435 5987435.0000
2744+37 12 1 28357832 28357832 28357832 28357832.0000
2745+37 13 1 39654943 39654943 39654943 39654943.0000
2746+37 21 1 5987435 5987435 5987435 5987435.0000
2747+37 22 1 28357832 28357832 28357832 28357832.0000
2748+37 23 1 39654943 39654943 39654943 39654943.0000
2749+37 31 1 5987435 5987435 5987435 5987435.0000
2750+select /*! SQL_SMALL_RESULT */ companynr,t2nr,count(price),sum(price),min(price),max(price),avg(price) from t3 where companynr = 37 group by companynr,t2nr limit 10;
2751+companynr t2nr count(price) sum(price) min(price) max(price) avg(price)
2752+37 1 1 5987435 5987435 5987435 5987435.0000
2753+37 2 1 28357832 28357832 28357832 28357832.0000
2754+37 3 1 39654943 39654943 39654943 39654943.0000
2755+37 11 1 5987435 5987435 5987435 5987435.0000
2756+37 12 1 28357832 28357832 28357832 28357832.0000
2757+37 13 1 39654943 39654943 39654943 39654943.0000
2758+37 21 1 5987435 5987435 5987435 5987435.0000
2759+37 22 1 28357832 28357832 28357832 28357832.0000
2760+37 23 1 39654943 39654943 39654943 39654943.0000
2761+37 31 1 5987435 5987435 5987435 5987435.0000
2762+select companynr,count(price),sum(price),min(price),max(price),avg(price) from t3 group by companynr ;
2763+companynr count(price) sum(price) min(price) max(price) avg(price)
2764+37 12543 309394878010 5987435 39654943 24666736.6667
2765+78 8362 414611089292 726498 98439034 49582766.0000
2766+101 4181 3489454238 834598 834598 834598.0000
2767+154 4181 4112197254950 983543950 983543950 983543950.0000
2768+311 4181 979599938 234298 234298 234298.0000
2769+447 4181 9929180954 2374834 2374834 2374834.0000
2770+512 4181 3288532102 786542 786542 786542.0000
2771+select distinct mod(companynr,10) from t4 group by companynr;
2772+mod(companynr,10)
2773+0
2774+9
2775+4
2776+6
2777+7
2778+1
2779+3
2780+8
2781+5
2782+select distinct 1 from t4 group by companynr;
2783+1
2784+1
2785+select count(distinct fld1) from t2;
2786+count(distinct fld1)
2787+1199
2788+select companynr,count(distinct fld1) from t2 group by companynr;
2789+companynr count(distinct fld1)
2790+00 82
2791+29 95
2792+34 70
2793+36 215
2794+37 588
2795+40 37
2796+41 52
2797+50 11
2798+53 4
2799+58 23
2800+65 10
2801+68 12
2802+select companynr,count(*) from t2 group by companynr;
2803+companynr count(*)
2804+00 82
2805+29 95
2806+34 70
2807+36 215
2808+37 588
2809+40 37
2810+41 52
2811+50 11
2812+53 4
2813+58 23
2814+65 10
2815+68 12
2816+select companynr,count(distinct concat(fld1,repeat(65,1000))) from t2 group by companynr;
2817+companynr count(distinct concat(fld1,repeat(65,1000)))
2818+00 82
2819+29 95
2820+34 70
2821+36 215
2822+37 588
2823+40 37
2824+41 52
2825+50 11
2826+53 4
2827+58 23
2828+65 10
2829+68 12
2830+select companynr,count(distinct concat(fld1,repeat(65,200))) from t2 group by companynr;
2831+companynr count(distinct concat(fld1,repeat(65,200)))
2832+00 82
2833+29 95
2834+34 70
2835+36 215
2836+37 588
2837+40 37
2838+41 52
2839+50 11
2840+53 4
2841+58 23
2842+65 10
2843+68 12
2844+select companynr,count(distinct floor(fld1/100)) from t2 group by companynr;
2845+companynr count(distinct floor(fld1/100))
2846+00 47
2847+29 35
2848+34 14
2849+36 69
2850+37 108
2851+40 16
2852+41 11
2853+50 9
2854+53 1
2855+58 1
2856+65 1
2857+68 1
2858+select companynr,count(distinct concat(repeat(65,1000),floor(fld1/100))) from t2 group by companynr;
2859+companynr count(distinct concat(repeat(65,1000),floor(fld1/100)))
2860+00 47
2861+29 35
2862+34 14
2863+36 69
2864+37 108
2865+40 16
2866+41 11
2867+50 9
2868+53 1
2869+58 1
2870+65 1
2871+68 1
2872+select sum(fld1),fld3 from t2 where fld3="Romans" group by fld1 limit 10;
2873+sum(fld1) fld3
2874+11402 Romans
2875+select name,count(*) from t3 where name='cloakroom' group by name;
2876+name count(*)
2877+cloakroom 4181
2878+select name,count(*) from t3 where name='cloakroom' and price>10 group by name;
2879+name count(*)
2880+cloakroom 4181
2881+select count(*) from t3 where name='cloakroom' and price2=823742;
2882+count(*)
2883+4181
2884+select name,count(*) from t3 where name='cloakroom' and price2=823742 group by name;
2885+name count(*)
2886+cloakroom 4181
2887+select name,count(*) from t3 where name >= "extramarital" and price <= 39654943 group by name;
2888+name count(*)
2889+extramarital 4181
2890+gazer 4181
2891+gems 4181
2892+Iranizes 4181
2893+spates 4181
2894+tucked 4181
2895+violinist 4181
2896+select t2.fld3,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name;
2897+fld3 count(*)
2898+spates 4181
2899+select companynr|0,companyname from t4 group by 1;
2900+companynr|0 companyname
2901+0 Unknown
2902+29 company 1
2903+34 company 2
2904+36 company 3
2905+37 company 4
2906+40 company 5
2907+41 company 6
2908+50 company 11
2909+53 company 7
2910+58 company 8
2911+65 company 9
2912+68 company 10
2913+select t2.companynr,companyname,count(*) from t2,t4 where t2.companynr=t4.companynr group by t2.companynr order by companyname;
2914+companynr companyname count(*)
2915+29 company 1 95
2916+68 company 10 12
2917+50 company 11 11
2918+34 company 2 70
2919+36 company 3 215
2920+37 company 4 588
2921+40 company 5 37
2922+41 company 6 52
2923+53 company 7 4
2924+58 company 8 23
2925+65 company 9 10
2926+00 Unknown 82
2927+select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name;
2928+fld1 count(*)
2929+158402 4181
2930+select sum(Period)/count(*) from t1;
2931+sum(Period)/count(*)
2932+9410.0000
2933+select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr;
2934+companynr count sum diff func
2935+37 12543 309394878010 0.0000 464091
2936+78 8362 414611089292 0.0000 652236
2937+101 4181 3489454238 0.0000 422281
2938+154 4181 4112197254950 0.0000 643874
2939+311 4181 979599938 0.0000 1300291
2940+447 4181 9929180954 0.0000 1868907
2941+512 4181 3288532102 0.0000 2140672
2942+select companynr,sum(price)/count(price) as avg from t3 group by companynr having avg > 70000000 order by avg;
2943+companynr avg
2944+154 983543950.0000
2945+select companynr,count(*) from t2 group by companynr order by 2 desc;
2946+companynr count(*)
2947+37 588
2948+36 215
2949+29 95
2950+00 82
2951+34 70
2952+41 52
2953+40 37
2954+58 23
2955+68 12
2956+50 11
2957+65 10
2958+53 4
2959+select companynr,count(*) from t2 where companynr > 40 group by companynr order by 2 desc;
2960+companynr count(*)
2961+41 52
2962+58 23
2963+68 12
2964+50 11
2965+65 10
2966+53 4
2967+select t2.fld4,t2.fld1,count(price),sum(price),min(price),max(price),avg(price) from t3,t2 where t3.companynr = 37 and t2.fld1 = t3.t2nr group by fld1,t2.fld4;
2968+fld4 fld1 count(price) sum(price) min(price) max(price) avg(price)
2969+teethe 000001 1 5987435 5987435 5987435 5987435.0000
2970+dreaded 011401 1 5987435 5987435 5987435 5987435.0000
2971+scholastics 011402 1 28357832 28357832 28357832 28357832.0000
2972+audiology 011403 1 39654943 39654943 39654943 39654943.0000
2973+wallet 011501 1 5987435 5987435 5987435 5987435.0000
2974+parters 011701 1 5987435 5987435 5987435 5987435.0000
2975+eschew 011702 1 28357832 28357832 28357832 28357832.0000
2976+quitter 011703 1 39654943 39654943 39654943 39654943.0000
2977+neat 012001 1 5987435 5987435 5987435 5987435.0000
2978+Steinberg 012003 1 39654943 39654943 39654943 39654943.0000
2979+balled 012301 1 5987435 5987435 5987435 5987435.0000
2980+persist 012302 1 28357832 28357832 28357832 28357832.0000
2981+attainments 012303 1 39654943 39654943 39654943 39654943.0000
2982+capably 012501 1 5987435 5987435 5987435 5987435.0000
2983+impulsive 012602 1 28357832 28357832 28357832 28357832.0000
2984+starlet 012603 1 39654943 39654943 39654943 39654943.0000
2985+featherweight 012701 1 5987435 5987435 5987435 5987435.0000
2986+pessimist 012702 1 28357832 28357832 28357832 28357832.0000
2987+daughter 012703 1 39654943 39654943 39654943 39654943.0000
2988+lawgiver 013601 1 5987435 5987435 5987435 5987435.0000
2989+stated 013602 1 28357832 28357832 28357832 28357832.0000
2990+readable 013603 1 39654943 39654943 39654943 39654943.0000
2991+testicle 013801 1 5987435 5987435 5987435 5987435.0000
2992+Parsifal 013802 1 28357832 28357832 28357832 28357832.0000
2993+leavings 013803 1 39654943 39654943 39654943 39654943.0000
2994+squeaking 013901 1 5987435 5987435 5987435 5987435.0000
2995+contrasted 016001 1 5987435 5987435 5987435 5987435.0000
2996+leftover 016201 1 5987435 5987435 5987435 5987435.0000
2997+whiteners 016202 1 28357832 28357832 28357832 28357832.0000
2998+erases 016301 1 5987435 5987435 5987435 5987435.0000
2999+Punjab 016302 1 28357832 28357832 28357832 28357832.0000
3000+Merritt 016303 1 39654943 39654943 39654943 39654943.0000
3001+sweetish 018001 1 5987435 5987435 5987435 5987435.0000
3002+dogging 018002 1 28357832 28357832 28357832 28357832.0000
3003+scornfully 018003 1 39654943 39654943 39654943 39654943.0000
3004+fetters 018012 1 28357832 28357832 28357832 28357832.0000
3005+bivalves 018013 1 39654943 39654943 39654943 39654943.0000
3006+skulking 018021 1 5987435 5987435 5987435 5987435.0000
3007+flint 018022 1 28357832 28357832 28357832 28357832.0000
3008+flopping 018023 1 39654943 39654943 39654943 39654943.0000
3009+Judas 018032 1 28357832 28357832 28357832 28357832.0000
3010+vacuuming 018033 1 39654943 39654943 39654943 39654943.0000
3011+medical 018041 1 5987435 5987435 5987435 5987435.0000
3012+bloodbath 018042 1 28357832 28357832 28357832 28357832.0000
3013+subschema 018043 1 39654943 39654943 39654943 39654943.0000
3014+interdependent 018051 1 5987435 5987435 5987435 5987435.0000
3015+Graves 018052 1 28357832 28357832 28357832 28357832.0000
3016+neonatal 018053 1 39654943 39654943 39654943 39654943.0000
3017+sorters 018061 1 5987435 5987435 5987435 5987435.0000
3018+epistle 018062 1 28357832 28357832 28357832 28357832.0000
3019+Conley 018101 1 5987435 5987435 5987435 5987435.0000
3020+lectured 018102 1 28357832 28357832 28357832 28357832.0000
3021+Abraham 018103 1 39654943 39654943 39654943 39654943.0000
3022+cage 018201 1 5987435 5987435 5987435 5987435.0000
3023+hushes 018202 1 28357832 28357832 28357832 28357832.0000
3024+Simla 018402 1 28357832 28357832 28357832 28357832.0000
3025+reporters 018403 1 39654943 39654943 39654943 39654943.0000
3026+coexist 018601 1 5987435 5987435 5987435 5987435.0000
3027+Beebe 018602 1 28357832 28357832 28357832 28357832.0000
3028+Taoism 018603 1 39654943 39654943 39654943 39654943.0000
3029+Connally 018801 1 5987435 5987435 5987435 5987435.0000
3030+fetched 018802 1 28357832 28357832 28357832 28357832.0000
3031+checkpoints 018803 1 39654943 39654943 39654943 39654943.0000
3032+gritty 018811 1 5987435 5987435 5987435 5987435.0000
3033+firearm 018812 1 28357832 28357832 28357832 28357832.0000
3034+minima 019101 1 5987435 5987435 5987435 5987435.0000
3035+Selfridge 019102 1 28357832 28357832 28357832 28357832.0000
3036+disable 019103 1 39654943 39654943 39654943 39654943.0000
3037+witchcraft 019201 1 5987435 5987435 5987435 5987435.0000
3038+betroth 030501 1 5987435 5987435 5987435 5987435.0000
3039+Manhattanize 030502 1 28357832 28357832 28357832 28357832.0000
3040+imprint 030503 1 39654943 39654943 39654943 39654943.0000
3041+swelling 031901 1 5987435 5987435 5987435 5987435.0000
3042+interrelationships 036001 1 5987435 5987435 5987435 5987435.0000
3043+riser 036002 1 28357832 28357832 28357832 28357832.0000
3044+bee 038001 1 5987435 5987435 5987435 5987435.0000
3045+kanji 038002 1 28357832 28357832 28357832 28357832.0000
3046+dental 038003 1 39654943 39654943 39654943 39654943.0000
3047+railway 038011 1 5987435 5987435 5987435 5987435.0000
3048+validate 038012 1 28357832 28357832 28357832 28357832.0000
3049+normalizes 038013 1 39654943 39654943 39654943 39654943.0000
3050+Kline 038101 1 5987435 5987435 5987435 5987435.0000
3051+Anatole 038102 1 28357832 28357832 28357832 28357832.0000
3052+partridges 038103 1 39654943 39654943 39654943 39654943.0000
3053+recruited 038201 1 5987435 5987435 5987435 5987435.0000
3054+dimensions 038202 1 28357832 28357832 28357832 28357832.0000
3055+Chicana 038203 1 39654943 39654943 39654943 39654943.0000
3056+select t3.companynr,fld3,sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 512 group by companynr,fld3;
3057+companynr fld3 sum(price)
3058+512 boat 786542
3059+512 capably 786542
3060+512 cupboard 786542
3061+512 decliner 786542
3062+512 descendants 786542
3063+512 dopers 786542
3064+512 erases 786542
3065+512 Micronesia 786542
3066+512 Miles 786542
3067+512 skies 786542
3068+select t2.companynr,count(*),min(fld3),max(fld3),sum(price),avg(price) from t2,t3 where t3.companynr >= 30 and t3.companynr <= 58 and t3.t2nr = t2.fld1 and 1+1=2 group by t2.companynr;
3069+companynr count(*) min(fld3) max(fld3) sum(price) avg(price)
3070+00 1 Omaha Omaha 5987435 5987435.0000
3071+36 1 dubbed dubbed 28357832 28357832.0000
3072+37 83 Abraham Wotan 1908978016 22999735.1325
3073+50 2 scribbled tapestry 68012775 34006387.5000
3074+select t3.companynr+0,t3.t2nr,fld3,sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 37 group by 1,t3.t2nr,fld3,fld3,fld3,fld3,fld3 order by fld1;
3075+t3.companynr+0 t2nr fld3 sum(price)
3076+37 1 Omaha 5987435
3077+37 11401 breaking 5987435
3078+37 11402 Romans 28357832
3079+37 11403 intercepted 39654943
3080+37 11501 bewilderingly 5987435
3081+37 11701 astound 5987435
3082+37 11702 admonishing 28357832
3083+37 11703 sumac 39654943
3084+37 12001 flanking 5987435
3085+37 12003 combed 39654943
3086+37 12301 Eulerian 5987435
3087+37 12302 dubbed 28357832
3088+37 12303 Kane 39654943
3089+37 12501 annihilates 5987435
3090+37 12602 Wotan 28357832
3091+37 12603 snatching 39654943
3092+37 12701 grazing 5987435
3093+37 12702 Baird 28357832
3094+37 12703 celery 39654943
3095+37 13601 handgun 5987435
3096+37 13602 foldout 28357832
3097+37 13603 mystic 39654943
3098+37 13801 intelligibility 5987435
3099+37 13802 Augustine 28357832
3100+37 13803 teethe 39654943
3101+37 13901 scholastics 5987435
3102+37 16001 audiology 5987435
3103+37 16201 wallet 5987435
3104+37 16202 parters 28357832
3105+37 16301 eschew 5987435
3106+37 16302 quitter 28357832
3107+37 16303 neat 39654943
3108+37 18001 jarring 5987435
3109+37 18002 tinily 28357832
3110+37 18003 balled 39654943
3111+37 18012 impulsive 28357832
3112+37 18013 starlet 39654943
3113+37 18021 lawgiver 5987435
3114+37 18022 stated 28357832
3115+37 18023 readable 39654943
3116+37 18032 testicle 28357832
3117+37 18033 Parsifal 39654943
3118+37 18041 Punjab 5987435
3119+37 18042 Merritt 28357832
3120+37 18043 Quixotism 39654943
3121+37 18051 sureties 5987435
3122+37 18052 puddings 28357832
3123+37 18053 tapestry 39654943
3124+37 18061 trimmings 5987435
3125+37 18062 humility 28357832
3126+37 18101 tragedies 5987435
3127+37 18102 skulking 28357832
3128+37 18103 flint 39654943
3129+37 18201 relaxing 5987435
3130+37 18202 offload 28357832
3131+37 18402 suites 28357832
3132+37 18403 lists 39654943
3133+37 18601 vacuuming 5987435
3134+37 18602 dentally 28357832
3135+37 18603 humanness 39654943
3136+37 18801 inch 5987435
3137+37 18802 Weissmuller 28357832
3138+37 18803 irresponsibly 39654943
3139+37 18811 repetitions 5987435
3140+37 18812 Antares 28357832
3141+37 19101 ventilate 5987435
3142+37 19102 pityingly 28357832
3143+37 19103 interdependent 39654943
3144+37 19201 Graves 5987435
3145+37 30501 neonatal 5987435
3146+37 30502 scribbled 28357832
3147+37 30503 chafe 39654943
3148+37 31901 realtor 5987435
3149+37 36001 elite 5987435
3150+37 36002 funereal 28357832
3151+37 38001 Conley 5987435
3152+37 38002 lectured 28357832
3153+37 38003 Abraham 39654943
3154+37 38011 groupings 5987435
3155+37 38012 dissociate 28357832
3156+37 38013 coexist 39654943
3157+37 38101 rusting 5987435
3158+37 38102 galling 28357832
3159+37 38103 obliterates 39654943
3160+37 38201 resumes 5987435
3161+37 38202 analyzable 28357832
3162+37 38203 terminator 39654943
3163+select sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 512 and t3.t2nr = 38008 and t2.fld1 = 38008 or t2.fld1= t3.t2nr and t3.t2nr = 38008 and t2.fld1 = 38008;
3164+sum(price)
3165+234298
3166+select t2.fld1,sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 512 and t3.t2nr = 38008 and t2.fld1 = 38008 or t2.fld1 = t3.t2nr and t3.t2nr = 38008 and t2.fld1 = 38008 or t3.t2nr = t2.fld1 and t2.fld1 = 38008 group by t2.fld1;
3167+fld1 sum(price)
3168+038008 234298
3169+explain select fld3 from t2 where 1>2 or 2>3;
3170+id select_type table type possible_keys key key_len ref rows Extra
3171+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
3172+explain select fld3 from t2 where fld1=fld1;
3173+id select_type table type possible_keys key key_len ref rows Extra
3174+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 NULL
3175+select companynr,fld1 from t2 HAVING fld1=250501 or fld1=250502;
3176+companynr fld1
3177+34 250501
3178+34 250502
3179+select companynr,fld1 from t2 WHERE fld1>=250501 HAVING fld1<=250502;
3180+companynr fld1
3181+34 250501
3182+34 250502
3183+select companynr,count(*) as count,sum(fld1) as sum from t2 group by companynr having count > 40 and sum/count >= 120000;
3184+companynr count sum
3185+00 82 10355753
3186+29 95 14473298
3187+34 70 17788966
3188+37 588 83602098
3189+41 52 12816335
3190+select companynr from t2 group by companynr having count(*) > 40 and sum(fld1)/count(*) >= 120000 ;
3191+companynr
3192+00
3193+29
3194+34
3195+37
3196+41
3197+select t2.companynr,companyname,count(*) from t2,t4 where t2.companynr=t4.companynr group by companyname having t2.companynr >= 40;
3198+companynr companyname count(*)
3199+68 company 10 12
3200+50 company 11 11
3201+40 company 5 37
3202+41 company 6 52
3203+53 company 7 4
3204+58 company 8 23
3205+65 company 9 10
3206+select count(*) from t2;
3207+count(*)
3208+1199
3209+select count(*) from t2 where fld1 < 098024;
3210+count(*)
3211+387
3212+select min(fld1) from t2 where fld1>= 098024;
3213+min(fld1)
3214+98024
3215+select max(fld1) from t2 where fld1>= 098024;
3216+max(fld1)
3217+1232609
3218+select count(*) from t3 where price2=76234234;
3219+count(*)
3220+4181
3221+select count(*) from t3 where companynr=512 and price2=76234234;
3222+count(*)
3223+4181
3224+explain select min(fld1),max(fld1),count(*) from t2;
3225+id select_type table type possible_keys key key_len ref rows Extra
3226+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
3227+select min(fld1),max(fld1),count(*) from t2;
3228+min(fld1) max(fld1) count(*)
3229+0 1232609 1199
3230+select min(t2nr),max(t2nr) from t3 where t2nr=2115 and price2=823742;
3231+min(t2nr) max(t2nr)
3232+2115 2115
3233+select count(*),min(t2nr),max(t2nr) from t3 where name='spates' and companynr=78;
3234+count(*) min(t2nr) max(t2nr)
3235+4181 4 41804
3236+select t2nr,count(*) from t3 where name='gems' group by t2nr limit 20;
3237+t2nr count(*)
3238+9 1
3239+19 1
3240+29 1
3241+39 1
3242+49 1
3243+59 1
3244+69 1
3245+79 1
3246+89 1
3247+99 1
3248+109 1
3249+119 1
3250+129 1
3251+139 1
3252+149 1
3253+159 1
3254+169 1
3255+179 1
3256+189 1
3257+199 1
3258+select max(t2nr) from t3 where price=983543950;
3259+max(t2nr)
3260+41807
3261+select t1.period from t3 = t1 limit 1;
3262+period
3263+1001
3264+select t1.period from t1 as t1 limit 1;
3265+period
3266+9410
3267+select t1.period as "Nuvarande period" from t1 as t1 limit 1;
3268+Nuvarande period
3269+9410
3270+select period as ok_period from t1 limit 1;
3271+ok_period
3272+9410
3273+select period as ok_period from t1 group by ok_period limit 1;
3274+ok_period
3275+9410
3276+select 1+1 as summa from t1 group by summa limit 1;
3277+summa
3278+2
3279+select period as "Nuvarande period" from t1 group by "Nuvarande period" limit 1;
3280+Nuvarande period
3281+9410
3282+show tables;
3283+Tables_in_test
3284+t1
3285+t2
3286+t3
3287+t4
3288+show tables from test like "s%";
3289+Tables_in_test (s%)
3290+show tables from test like "t?";
3291+Tables_in_test (t?)
3292+show full columns from t2;
3293+Field Type Collation Null Key Default Extra Privileges Comment
3294+auto int(11) NULL NO PRI NULL auto_increment #
3295+fld1 int(6) unsigned zerofill NULL NO UNI 000000 #
3296+companynr tinyint(2) unsigned zerofill NULL NO 00 #
3297+fld3 char(30) latin1_swedish_ci NO MUL #
3298+fld4 char(35) latin1_swedish_ci NO #
3299+fld5 char(35) latin1_swedish_ci NO #
3300+fld6 char(4) latin1_swedish_ci NO #
3301+show full columns from t2 from test like 'f%';
3302+Field Type Collation Null Key Default Extra Privileges Comment
3303+fld1 int(6) unsigned zerofill NULL NO UNI 000000 #
3304+fld3 char(30) latin1_swedish_ci NO MUL #
3305+fld4 char(35) latin1_swedish_ci NO #
3306+fld5 char(35) latin1_swedish_ci NO #
3307+fld6 char(4) latin1_swedish_ci NO #
3308+show full columns from t2 from test like 's%';
3309+Field Type Collation Null Key Default Extra Privileges Comment
3310+show keys from t2;
3311+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
3312+t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE
3313+t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE
3314+t2 1 fld3 1 fld3 A NULL NULL NULL BTREE
3315+drop table t4, t3, t2, t1;
3316+CREATE TABLE t1 (
3317+cont_nr int(11) NOT NULL auto_increment,
3318+ver_nr int(11) NOT NULL default '0',
3319+aufnr int(11) NOT NULL default '0',
3320+username varchar(50) NOT NULL default '',
3321+hdl_nr int(11) NOT NULL default '0',
3322+eintrag date NOT NULL default '0000-00-00',
3323+st_klasse varchar(40) NOT NULL default '',
3324+st_wert varchar(40) NOT NULL default '',
3325+st_zusatz varchar(40) NOT NULL default '',
3326+st_bemerkung varchar(255) NOT NULL default '',
3327+kunden_art varchar(40) NOT NULL default '',
3328+mcbs_knr int(11) default NULL,
3329+mcbs_aufnr int(11) NOT NULL default '0',
3330+schufa_status char(1) default '?',
3331+bemerkung text,
3332+wirknetz text,
3333+wf_igz int(11) NOT NULL default '0',
3334+tarifcode varchar(80) default NULL,
3335+recycle char(1) default NULL,
3336+sim varchar(30) default NULL,
3337+mcbs_tpl varchar(30) default NULL,
3338+emp_nr int(11) NOT NULL default '0',
3339+laufzeit int(11) default NULL,
3340+hdl_name varchar(30) default NULL,
3341+prov_hdl_nr int(11) NOT NULL default '0',
3342+auto_wirknetz varchar(50) default NULL,
3343+auto_billing varchar(50) default NULL,
3344+touch timestamp NOT NULL,
3345+kategorie varchar(50) default NULL,
3346+kundentyp varchar(20) NOT NULL default '',
3347+sammel_rech_msisdn varchar(30) NOT NULL default '',
3348+p_nr varchar(9) NOT NULL default '',
3349+suffix char(3) NOT NULL default '',
3350+PRIMARY KEY (cont_nr),
3351+KEY idx_aufnr(aufnr),
3352+KEY idx_hdl_nr(hdl_nr),
3353+KEY idx_st_klasse(st_klasse),
3354+KEY ver_nr(ver_nr),
3355+KEY eintrag_idx(eintrag),
3356+KEY emp_nr_idx(emp_nr),
3357+KEY wf_igz(wf_igz),
3358+KEY touch(touch),
3359+KEY hdl_tag(eintrag,hdl_nr),
3360+KEY prov_hdl_nr(prov_hdl_nr),
3361+KEY mcbs_aufnr(mcbs_aufnr),
3362+KEY kundentyp(kundentyp),
3363+KEY p_nr(p_nr,suffix)
3364+) ENGINE=MyISAM;
3365+INSERT INTO t1 VALUES (3359356,405,3359356,'Mustermann Musterfrau',52500,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1485525,2122316,'+','','N',1909160,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',3,24,'MobilCom Shop Koeln',52500,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
3366+INSERT INTO t1 VALUES (3359357,468,3359357,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1503580,2139699,'+','','P',1909171,'MobilComSuper9D1T10SFreisprech(Akquise)',NULL,NULL,'MS9NS1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
3367+INSERT INTO t1 VALUES (3359358,407,3359358,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1501358,2137473,'N','','N',1909159,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',325,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
3368+INSERT INTO t1 VALUES (3359359,468,3359359,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1507831,2143894,'+','','P',1909162,'MobilComSuper9D1T10SFreisprech(Akquise)',NULL,NULL,'MS9NS1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
3369+INSERT INTO t1 VALUES (3359360,0,0,'Mustermann Musterfrau',29674907,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1900169997,2414578,'+',NULL,'N',1909148,'',NULL,NULL,'RV99066_2',20,NULL,'POS',29674907,NULL,NULL,20010202105916,'Mobilfunk','','','97317481','007');
3370+INSERT INTO t1 VALUES (3359361,406,3359361,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag storniert','','(7001-84):Storno, Kd. möchte nicht mehr','privat',NULL,0,'+','','P',1909150,'MobilComSuper92000D1(Akquise)',NULL,NULL,'MS9ND1',325,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
3371+INSERT INTO t1 VALUES (3359362,406,3359362,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1509984,2145874,'+','','P',1909154,'MobilComSuper92000D1(Akquise)',NULL,NULL,'MS9ND1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
3372+SELECT ELT(FIELD(kundentyp,'PP','PPA','PG','PGA','FK','FKA','FP','FPA','K','KA','V','VA',''), 'Privat (Private Nutzung)','Privat (Private Nutzung) Sitz im Ausland','Privat (geschaeftliche Nutzung)','Privat (geschaeftliche Nutzung) Sitz im Ausland','Firma (Kapitalgesellschaft)','Firma (Kapitalgesellschaft) Sitz im Ausland','Firma (Personengesellschaft)','Firma (Personengesellschaft) Sitz im Ausland','oeff. rechtl. Koerperschaft','oeff. rechtl. Koerperschaft Sitz im Ausland','Eingetragener Verein','Eingetragener Verein Sitz im Ausland','Typ unbekannt') AS Kundentyp ,kategorie FROM t1 WHERE hdl_nr < 2000000 AND kategorie IN ('Prepaid','Mobilfunk') AND st_klasse = 'Workflow' GROUP BY kundentyp ORDER BY kategorie;
3373+Kundentyp kategorie
3374+Privat (Private Nutzung) Mobilfunk
3375+Warnings:
3376+Warning 1052 Column 'kundentyp' in group statement is ambiguous
3377+drop table t1;
3378+SELECT sleep(50000);
3379+SELECT sleep(50000);
3380+# -- Success: more than --thread_pool_max_threads normal connections not possible
3381+SELECT 'Connection on extra port ok';
3382+Connection on extra port ok
3383+Connection on extra port ok
3384+KILL QUERY @id;
3385+KILL QUERY @id;
3386+SELECT 'Connection on extra port 2 ok';
3387+Connection on extra port 2 ok
3388+Connection on extra port 2 ok
3389+# -- Success: more than --extra-max-connections + 1 normal connections not possible
3390+sleep(50000)
3391+1
3392+sleep(50000)
3393+1
3394
3395=== added file 'Percona-Server/mysql-test/r/pool_of_threads_high_prio_tickets.result'
3396--- Percona-Server/mysql-test/r/pool_of_threads_high_prio_tickets.result 1970-01-01 00:00:00 +0000
3397+++ Percona-Server/mysql-test/r/pool_of_threads_high_prio_tickets.result 2013-05-27 12:16:38 +0000
3398@@ -0,0 +1,2169 @@
3399+SELECT @@thread_pool_high_prio_tickets;
3400+@@thread_pool_high_prio_tickets
3401+2
3402+drop table if exists t1,t2,t3,t4;
3403+CREATE TABLE t1 (
3404+Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
3405+Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL
3406+);
3407+INSERT INTO t1 VALUES (9410,9412);
3408+select period from t1;
3409+period
3410+9410
3411+select * from t1;
3412+Period Varor_period
3413+9410 9412
3414+select t1.* from t1;
3415+Period Varor_period
3416+9410 9412
3417+CREATE TABLE t2 (
3418+auto int not null auto_increment,
3419+fld1 int(6) unsigned zerofill DEFAULT '000000' NOT NULL,
3420+companynr tinyint(2) unsigned zerofill DEFAULT '00' NOT NULL,
3421+fld3 char(30) DEFAULT '' NOT NULL,
3422+fld4 char(35) DEFAULT '' NOT NULL,
3423+fld5 char(35) DEFAULT '' NOT NULL,
3424+fld6 char(4) DEFAULT '' NOT NULL,
3425+UNIQUE fld1 (fld1),
3426+KEY fld3 (fld3),
3427+PRIMARY KEY (auto)
3428+);
3429+select t2.fld3 from t2 where companynr = 58 and fld3 like "%imaginable%";
3430+fld3
3431+imaginable
3432+select fld3 from t2 where fld3 like "%cultivation" ;
3433+fld3
3434+cultivation
3435+select t2.fld3,companynr from t2 where companynr = 57+1 order by fld3;
3436+fld3 companynr
3437+concoct 58
3438+druggists 58
3439+engrossing 58
3440+Eurydice 58
3441+exclaimers 58
3442+ferociousness 58
3443+hopelessness 58
3444+Huey 58
3445+imaginable 58
3446+judges 58
3447+merging 58
3448+ostrich 58
3449+peering 58
3450+Phelps 58
3451+presumes 58
3452+Ruth 58
3453+sentences 58
3454+Shylock 58
3455+straggled 58
3456+synergy 58
3457+thanking 58
3458+tying 58
3459+unlocks 58
3460+select fld3,companynr from t2 where companynr = 58 order by fld3;
3461+fld3 companynr
3462+concoct 58
3463+druggists 58
3464+engrossing 58
3465+Eurydice 58
3466+exclaimers 58
3467+ferociousness 58
3468+hopelessness 58
3469+Huey 58
3470+imaginable 58
3471+judges 58
3472+merging 58
3473+ostrich 58
3474+peering 58
3475+Phelps 58
3476+presumes 58
3477+Ruth 58
3478+sentences 58
3479+Shylock 58
3480+straggled 58
3481+synergy 58
3482+thanking 58
3483+tying 58
3484+unlocks 58
3485+select fld3 from t2 order by fld3 desc limit 10;
3486+fld3
3487+youthfulness
3488+yelped
3489+Wotan
3490+workers
3491+Witt
3492+witchcraft
3493+Winsett
3494+Willy
3495+willed
3496+wildcats
3497+select fld3 from t2 order by fld3 desc limit 5;
3498+fld3
3499+youthfulness
3500+yelped
3501+Wotan
3502+workers
3503+Witt
3504+select fld3 from t2 order by fld3 desc limit 5,5;
3505+fld3
3506+witchcraft
3507+Winsett
3508+Willy
3509+willed
3510+wildcats
3511+select t2.fld3 from t2 where fld3 = 'honeysuckle';
3512+fld3
3513+honeysuckle
3514+select t2.fld3 from t2 where fld3 LIKE 'honeysuckl_';
3515+fld3
3516+honeysuckle
3517+select t2.fld3 from t2 where fld3 LIKE 'hon_ysuckl_';
3518+fld3
3519+honeysuckle
3520+select t2.fld3 from t2 where fld3 LIKE 'honeysuckle%';
3521+fld3
3522+honeysuckle
3523+select t2.fld3 from t2 where fld3 LIKE 'h%le';
3524+fld3
3525+honeysuckle
3526+select t2.fld3 from t2 where fld3 LIKE 'honeysuckle_';
3527+fld3
3528+select t2.fld3 from t2 where fld3 LIKE 'don_t_find_me_please%';
3529+fld3
3530+explain select t2.fld3 from t2 where fld3 = 'honeysuckle';
3531+id select_type table type possible_keys key key_len ref rows Extra
3532+1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index
3533+explain select fld3 from t2 ignore index (fld3) where fld3 = 'honeysuckle';
3534+id select_type table type possible_keys key key_len ref rows Extra
3535+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
3536+explain select fld3 from t2 use index (fld1) where fld3 = 'honeysuckle';
3537+id select_type table type possible_keys key key_len ref rows Extra
3538+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
3539+explain select fld3 from t2 use index (fld3) where fld3 = 'honeysuckle';
3540+id select_type table type possible_keys key key_len ref rows Extra
3541+1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index
3542+explain select fld3 from t2 use index (fld1,fld3) where fld3 = 'honeysuckle';
3543+id select_type table type possible_keys key key_len ref rows Extra
3544+1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index
3545+explain select fld3 from t2 ignore index (fld3,not_used);
3546+ERROR 42000: Key 'not_used' doesn't exist in table 't2'
3547+explain select fld3 from t2 use index (not_used);
3548+ERROR 42000: Key 'not_used' doesn't exist in table 't2'
3549+select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3;
3550+fld3
3551+honeysuckle
3552+honoring
3553+explain select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3;
3554+id select_type table type possible_keys key key_len ref rows Extra
3555+1 SIMPLE t2 range fld3 fld3 30 NULL 2 Using where; Using index
3556+select fld1,fld3 from t2 where fld3="Colombo" or fld3 = "nondecreasing" order by fld3;
3557+fld1 fld3
3558+148504 Colombo
3559+068305 Colombo
3560+000000 nondecreasing
3561+select fld1,fld3 from t2 where companynr = 37 and fld3 = 'appendixes';
3562+fld1 fld3
3563+232605 appendixes
3564+1232605 appendixes
3565+1232606 appendixes
3566+1232607 appendixes
3567+1232608 appendixes
3568+1232609 appendixes
3569+select fld1 from t2 where fld1=250501 or fld1="250502";
3570+fld1
3571+250501
3572+250502
3573+explain select fld1 from t2 where fld1=250501 or fld1="250502";
3574+id select_type table type possible_keys key key_len ref rows Extra
3575+1 SIMPLE t2 range fld1 fld1 4 NULL 2 Using where; Using index
3576+select fld1 from t2 where fld1=250501 or fld1=250502 or fld1 >= 250505 and fld1 <= 250601 or fld1 between 250501 and 250502;
3577+fld1
3578+250501
3579+250502
3580+250505
3581+250601
3582+explain select fld1 from t2 where fld1=250501 or fld1=250502 or fld1 >= 250505 and fld1 <= 250601 or fld1 between 250501 and 250502;
3583+id select_type table type possible_keys key key_len ref rows Extra
3584+1 SIMPLE t2 range fld1 fld1 4 NULL 4 Using where; Using index
3585+select fld1,fld3 from t2 where companynr = 37 and fld3 like 'f%';
3586+fld1 fld3
3587+012001 flanking
3588+013602 foldout
3589+013606 fingerings
3590+018007 fanatic
3591+018017 featherweight
3592+018054 fetters
3593+018103 flint
3594+018104 flopping
3595+036002 funereal
3596+038017 fetched
3597+038205 firearm
3598+058004 Fenton
3599+088303 feminine
3600+186002 freakish
3601+188007 flurried
3602+188505 fitting
3603+198006 furthermore
3604+202301 Fitzpatrick
3605+208101 fiftieth
3606+208113 freest
3607+218008 finishers
3608+218022 feed
3609+218401 faithful
3610+226205 foothill
3611+226209 furnishings
3612+228306 forthcoming
3613+228311 fated
3614+231315 freezes
3615+232102 forgivably
3616+238007 filial
3617+238008 fixedly
3618+select fld3 from t2 where fld3 like "L%" and fld3 = "ok";
3619+fld3
3620+select fld3 from t2 where (fld3 like "C%" and fld3 = "Chantilly");
3621+fld3
3622+Chantilly
3623+select fld1,fld3 from t2 where fld1 like "25050%";
3624+fld1 fld3
3625+250501 poisoning
3626+250502 Iraqis
3627+250503 heaving
3628+250504 population
3629+250505 bomb
3630+select fld1,fld3 from t2 where fld1 like "25050_";
3631+fld1 fld3
3632+250501 poisoning
3633+250502 Iraqis
3634+250503 heaving
3635+250504 population
3636+250505 bomb
3637+select distinct companynr from t2;
3638+companynr
3639+00
3640+37
3641+36
3642+50
3643+58
3644+29
3645+40
3646+53
3647+65
3648+41
3649+34
3650+68
3651+select distinct companynr from t2 order by companynr;
3652+companynr
3653+00
3654+29
3655+34
3656+36
3657+37
3658+40
3659+41
3660+50
3661+53
3662+58
3663+65
3664+68
3665+select distinct companynr from t2 order by companynr desc;
3666+companynr
3667+68
3668+65
3669+58
3670+53
3671+50
3672+41
3673+40
3674+37
3675+36
3676+34
3677+29
3678+00
3679+select distinct t2.fld3,period from t2,t1 where companynr=37 and fld3 like "O%";
3680+fld3 period
3681+obliterates 9410
3682+offload 9410
3683+opaquely 9410
3684+organizer 9410
3685+overestimating 9410
3686+overlay 9410
3687+select distinct fld3 from t2 where companynr = 34 order by fld3;
3688+fld3
3689+absentee
3690+accessed
3691+ahead
3692+alphabetic
3693+Asiaticizations
3694+attitude
3695+aye
3696+bankruptcies
3697+belays
3698+Blythe
3699+bomb
3700+boulevard
3701+bulldozes
3702+cannot
3703+caressing
3704+charcoal
3705+checksumming
3706+chess
3707+clubroom
3708+colorful
3709+cosy
3710+creator
3711+crying
3712+Darius
3713+diffusing
3714+duality
3715+Eiffel
3716+Epiphany
3717+Ernestine
3718+explorers
3719+exterminated
3720+famine
3721+forked
3722+Gershwins
3723+heaving
3724+Hodges
3725+Iraqis
3726+Italianization
3727+Lagos
3728+landslide
3729+libretto
3730+Majorca
3731+mastering
3732+narrowed
3733+occurred
3734+offerers
3735+Palestine
3736+Peruvianizes
3737+pharmaceutic
3738+poisoning
3739+population
3740+Pygmalion
3741+rats
3742+realest
3743+recording
3744+regimented
3745+retransmitting
3746+reviver
3747+rouses
3748+scars
3749+sicker
3750+sleepwalk
3751+stopped
3752+sugars
3753+translatable
3754+uncles
3755+unexpected
3756+uprisings
3757+versatility
3758+vest
3759+select distinct fld3 from t2 limit 10;
3760+fld3
3761+abates
3762+abiding
3763+Abraham
3764+abrogating
3765+absentee
3766+abut
3767+accessed
3768+accruing
3769+accumulating
3770+accuracies
3771+select distinct fld3 from t2 having fld3 like "A%" limit 10;
3772+fld3
3773+abates
3774+abiding
3775+Abraham
3776+abrogating
3777+absentee
3778+abut
3779+accessed
3780+accruing
3781+accumulating
3782+accuracies
3783+select distinct substring(fld3,1,3) from t2 where fld3 like "A%";
3784+substring(fld3,1,3)
3785+aba
3786+abi
3787+Abr
3788+abs
3789+abu
3790+acc
3791+acq
3792+acu
3793+Ade
3794+adj
3795+Adl
3796+adm
3797+Ado
3798+ads
3799+adv
3800+aer
3801+aff
3802+afi
3803+afl
3804+afo
3805+agi
3806+ahe
3807+aim
3808+air
3809+Ald
3810+alg
3811+ali
3812+all
3813+alp
3814+alr
3815+ama
3816+ame
3817+amm
3818+ana
3819+and
3820+ane
3821+Ang
3822+ani
3823+Ann
3824+Ant
3825+api
3826+app
3827+aqu
3828+Ara
3829+arc
3830+Arm
3831+arr
3832+Art
3833+Asi
3834+ask
3835+asp
3836+ass
3837+ast
3838+att
3839+aud
3840+Aug
3841+aut
3842+ave
3843+avo
3844+awe
3845+aye
3846+Azt
3847+select distinct substring(fld3,1,3) as a from t2 having a like "A%" order by a limit 10;
3848+a
3849+aba
3850+abi
3851+Abr
3852+abs
3853+abu
3854+acc
3855+acq
3856+acu
3857+Ade
3858+adj
3859+select distinct substring(fld3,1,3) from t2 where fld3 like "A%" limit 10;
3860+substring(fld3,1,3)
3861+aba
3862+abi
3863+Abr
3864+abs
3865+abu
3866+acc
3867+acq
3868+acu
3869+Ade
3870+adj
3871+select distinct substring(fld3,1,3) as a from t2 having a like "A%" limit 10;
3872+a
3873+aba
3874+abi
3875+Abr
3876+abs
3877+abu
3878+acc
3879+acq
3880+acu
3881+Ade
3882+adj
3883+create table t3 (
3884+period int not null,
3885+name char(32) not null,
3886+companynr int not null,
3887+price double(11,0),
3888+price2 double(11,0),
3889+key (period),
3890+key (name)
3891+);
3892+create temporary table tmp engine = myisam select * from t3;
3893+insert into t3 select * from tmp;
3894+insert into tmp select * from t3;
3895+insert into t3 select * from tmp;
3896+insert into tmp select * from t3;
3897+insert into t3 select * from tmp;
3898+insert into tmp select * from t3;
3899+insert into t3 select * from tmp;
3900+insert into tmp select * from t3;
3901+insert into t3 select * from tmp;
3902+insert into tmp select * from t3;
3903+insert into t3 select * from tmp;
3904+insert into tmp select * from t3;
3905+insert into t3 select * from tmp;
3906+insert into tmp select * from t3;
3907+insert into t3 select * from tmp;
3908+insert into tmp select * from t3;
3909+insert into t3 select * from tmp;
3910+alter table t3 add t2nr int not null auto_increment primary key first;
3911+drop table tmp;
3912+SET BIG_TABLES=1;
3913+select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10;
3914+namn
3915+Abraham Abraham
3916+abrogating abrogating
3917+admonishing admonishing
3918+Adolph Adolph
3919+afield afield
3920+aging aging
3921+ammonium ammonium
3922+analyzable analyzable
3923+animals animals
3924+animized animized
3925+SET BIG_TABLES=0;
3926+select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10;
3927+concat(fld3," ",fld3)
3928+Abraham Abraham
3929+abrogating abrogating
3930+admonishing admonishing
3931+Adolph Adolph
3932+afield afield
3933+aging aging
3934+ammonium ammonium
3935+analyzable analyzable
3936+animals animals
3937+animized animized
3938+select distinct fld5 from t2 limit 10;
3939+fld5
3940+neat
3941+Steinberg
3942+jarring
3943+tinily
3944+balled
3945+persist
3946+attainments
3947+fanatic
3948+measures
3949+rightfulness
3950+select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
3951+fld3 count(*)
3952+affixed 1
3953+and 1
3954+annoyers 1
3955+Anthony 1
3956+assayed 1
3957+assurers 1
3958+attendants 1
3959+bedlam 1
3960+bedpost 1
3961+boasted 1
3962+SET BIG_TABLES=1;
3963+select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
3964+fld3 count(*)
3965+affixed 1
3966+and 1
3967+annoyers 1
3968+Anthony 1
3969+assayed 1
3970+assurers 1
3971+attendants 1
3972+bedlam 1
3973+bedpost 1
3974+boasted 1
3975+SET BIG_TABLES=0;
3976+select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10;
3977+fld3 repeat("a",length(fld3)) count(*)
3978+circus aaaaaa 1
3979+cited aaaaa 1
3980+Colombo aaaaaaa 1
3981+congresswoman aaaaaaaaaaaaa 1
3982+contrition aaaaaaaaaa 1
3983+corny aaaaa 1
3984+cultivation aaaaaaaaaaa 1
3985+definiteness aaaaaaaaaaaa 1
3986+demultiplex aaaaaaaaaaa 1
3987+disappointing aaaaaaaaaaaaa 1
3988+select distinct companynr,rtrim(space(512+companynr)) from t3 order by 1,2;
3989+companynr rtrim(space(512+companynr))
3990+37
3991+78
3992+101
3993+154
3994+311
3995+447
3996+512
3997+select distinct fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr order by fld3;
3998+fld3
3999+explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr order by t3.t2nr,fld3;
4000+id select_type table type possible_keys key key_len ref rows Extra
4001+1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort
4002+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index
4003+explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period;
4004+id select_type table type possible_keys key key_len ref rows Extra
4005+1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using temporary; Using filesort
4006+1 SIMPLE t3 ref period period 4 test.t1.period 4181 NULL
4007+explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10;
4008+id select_type table type possible_keys key key_len ref rows Extra
4009+1 SIMPLE t3 index period period 4 NULL 1 NULL
4010+1 SIMPLE t1 ref period period 4 test.t3.period 4181 NULL
4011+explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10;
4012+id select_type table type possible_keys key key_len ref rows Extra
4013+1 SIMPLE t1 index period period 4 NULL 1 NULL
4014+1 SIMPLE t3 ref period period 4 test.t1.period 4181 NULL
4015+select period from t1;
4016+period
4017+9410
4018+select period from t1 where period=1900;
4019+period
4020+select fld3,period from t1,t2 where fld1 = 011401 order by period;
4021+fld3 period
4022+breaking 9410
4023+select fld3,period from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period=1001;
4024+fld3 period
4025+breaking 1001
4026+explain select fld3,period from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period;
4027+id select_type table type possible_keys key key_len ref rows Extra
4028+1 SIMPLE t2 const fld1 fld1 4 const 1 NULL
4029+1 SIMPLE t3 const PRIMARY,period PRIMARY 4 const 1 NULL
4030+select fld3,period from t2,t1 where companynr*10 = 37*10;
4031+fld3 period
4032+breaking 9410
4033+Romans 9410
4034+intercepted 9410
4035+bewilderingly 9410
4036+astound 9410
4037+admonishing 9410
4038+sumac 9410
4039+flanking 9410
4040+combed 9410
4041+subjective 9410
4042+scatterbrain 9410
4043+Eulerian 9410
4044+Kane 9410
4045+overlay 9410
4046+perturb 9410
4047+goblins 9410
4048+annihilates 9410
4049+Wotan 9410
4050+snatching 9410
4051+concludes 9410
4052+laterally 9410
4053+yelped 9410
4054+grazing 9410
4055+Baird 9410
4056+celery 9410
4057+misunderstander 9410
4058+handgun 9410
4059+foldout 9410
4060+mystic 9410
4061+succumbed 9410
4062+Nabisco 9410
4063+fingerings 9410
4064+aging 9410
4065+afield 9410
4066+ammonium 9410
4067+boat 9410
4068+intelligibility 9410
4069+Augustine 9410
4070+teethe 9410
4071+dreaded 9410
4072+scholastics 9410
4073+audiology 9410
4074+wallet 9410
4075+parters 9410
4076+eschew 9410
4077+quitter 9410
4078+neat 9410
4079+Steinberg 9410
4080+jarring 9410
4081+tinily 9410
4082+balled 9410
4083+persist 9410
4084+attainments 9410
4085+fanatic 9410
4086+measures 9410
4087+rightfulness 9410
4088+capably 9410
4089+impulsive 9410
4090+starlet 9410
4091+terminators 9410
4092+untying 9410
4093+announces 9410
4094+featherweight 9410
4095+pessimist 9410
4096+daughter 9410
4097+decliner 9410
4098+lawgiver 9410
4099+stated 9410
4100+readable 9410
4101+attrition 9410
4102+cascade 9410
4103+motors 9410
4104+interrogate 9410
4105+pests 9410
4106+stairway 9410
4107+dopers 9410
4108+testicle 9410
4109+Parsifal 9410
4110+leavings 9410
4111+postulation 9410
4112+squeaking 9410
4113+contrasted 9410
4114+leftover 9410
4115+whiteners 9410
4116+erases 9410
4117+Punjab 9410
4118+Merritt 9410
4119+Quixotism 9410
4120+sweetish 9410
4121+dogging 9410
4122+scornfully 9410
4123+bellow 9410
4124+bills 9410
4125+cupboard 9410
4126+sureties 9410
4127+puddings 9410
4128+fetters 9410
4129+bivalves 9410
4130+incurring 9410
4131+Adolph 9410
4132+pithed 9410
4133+Miles 9410
4134+trimmings 9410
4135+tragedies 9410
4136+skulking 9410
4137+flint 9410
4138+flopping 9410
4139+relaxing 9410
4140+offload 9410
4141+suites 9410
4142+lists 9410
4143+animized 9410
4144+multilayer 9410
4145+standardizes 9410
4146+Judas 9410
4147+vacuuming 9410
4148+dentally 9410
4149+humanness 9410
4150+inch 9410
4151+Weissmuller 9410
4152+irresponsibly 9410
4153+luckily 9410
4154+culled 9410
4155+medical 9410
4156+bloodbath 9410
4157+subschema 9410
4158+animals 9410
4159+Micronesia 9410
4160+repetitions 9410
4161+Antares 9410
4162+ventilate 9410
4163+pityingly 9410
4164+interdependent 9410
4165+Graves 9410
4166+neonatal 9410
4167+chafe 9410
4168+honoring 9410
4169+realtor 9410
4170+elite 9410
4171+funereal 9410
4172+abrogating 9410
4173+sorters 9410
4174+Conley 9410
4175+lectured 9410
4176+Abraham 9410
4177+Hawaii 9410
4178+cage 9410
4179+hushes 9410
4180+Simla 9410
4181+reporters 9410
4182+Dutchman 9410
4183+descendants 9410
4184+groupings 9410
4185+dissociate 9410
4186+coexist 9410
4187+Beebe 9410
4188+Taoism 9410
4189+Connally 9410
4190+fetched 9410
4191+checkpoints 9410
4192+rusting 9410
4193+galling 9410
4194+obliterates 9410
4195+traitor 9410
4196+resumes 9410
4197+analyzable 9410
4198+terminator 9410
4199+gritty 9410
4200+firearm 9410
4201+minima 9410
4202+Selfridge 9410
4203+disable 9410
4204+witchcraft 9410
4205+betroth 9410
4206+Manhattanize 9410
4207+imprint 9410
4208+peeked 9410
4209+swelling 9410
4210+interrelationships 9410
4211+riser 9410
4212+Gandhian 9410
4213+peacock 9410
4214+bee 9410
4215+kanji 9410
4216+dental 9410
4217+scarf 9410
4218+chasm 9410
4219+insolence 9410
4220+syndicate 9410
4221+alike 9410
4222+imperial 9410
4223+convulsion 9410
4224+railway 9410
4225+validate 9410
4226+normalizes 9410
4227+comprehensive 9410
4228+chewing 9410
4229+denizen 9410
4230+schemer 9410
4231+chronicle 9410
4232+Kline 9410
4233+Anatole 9410
4234+partridges 9410
4235+brunch 9410
4236+recruited 9410
4237+dimensions 9410
4238+Chicana 9410
4239+announced 9410
4240+praised 9410
4241+employing 9410
4242+linear 9410
4243+quagmire 9410
4244+western 9410
4245+relishing 9410
4246+serving 9410
4247+scheduling 9410
4248+lore 9410
4249+eventful 9410
4250+arteriole 9410
4251+disentangle 9410
4252+cured 9410
4253+Fenton 9410
4254+avoidable 9410
4255+drains 9410
4256+detectably 9410
4257+husky 9410
4258+impelling 9410
4259+undoes 9410
4260+evened 9410
4261+squeezes 9410
4262+destroyer 9410
4263+rudeness 9410
4264+beaner 9410
4265+boorish 9410
4266+Everhart 9410
4267+encompass 9410
4268+mushrooms 9410
4269+Alison 9410
4270+externally 9410
4271+pellagra 9410
4272+cult 9410
4273+creek 9410
4274+Huffman 9410
4275+Majorca 9410
4276+governing 9410
4277+gadfly 9410
4278+reassigned 9410
4279+intentness 9410
4280+craziness 9410
4281+psychic 9410
4282+squabbled 9410
4283+burlesque 9410
4284+capped 9410
4285+extracted 9410
4286+DiMaggio 9410
4287+exclamation 9410
4288+subdirectory 9410
4289+Gothicism 9410
4290+feminine 9410
4291+metaphysically 9410
4292+sanding 9410
4293+Miltonism 9410
4294+freakish 9410
4295+index 9410
4296+straight 9410
4297+flurried 9410
4298+denotative 9410
4299+coming 9410
4300+commencements 9410
4301+gentleman 9410
4302+gifted 9410
4303+Shanghais 9410
4304+sportswriting 9410
4305+sloping 9410
4306+navies 9410
4307+leaflet 9410
4308+shooter 9410
4309+Joplin 9410
4310+babies 9410
4311+assails 9410
4312+admiring 9410
4313+swaying 9410
4314+Goldstine 9410
4315+fitting 9410
4316+Norwalk 9410
4317+analogy 9410
4318+deludes 9410
4319+cokes 9410
4320+Clayton 9410
4321+exhausts 9410
4322+causality 9410
4323+sating 9410
4324+icon 9410
4325+throttles 9410
4326+communicants 9410
4327+dehydrate 9410
4328+priceless 9410
4329+publicly 9410
4330+incidentals 9410
4331+commonplace 9410
4332+mumbles 9410
4333+furthermore 9410
4334+cautioned 9410
4335+parametrized 9410
4336+registration 9410
4337+sadly 9410
4338+positioning 9410
4339+babysitting 9410
4340+eternal 9410
4341+hoarder 9410
4342+congregates 9410
4343+rains 9410
4344+workers 9410
4345+sags 9410
4346+unplug 9410
4347+garage 9410
4348+boulder 9410
4349+specifics 9410
4350+Teresa 9410
4351+Winsett 9410
4352+convenient 9410
4353+buckboards 9410
4354+amenities 9410
4355+resplendent 9410
4356+sews 9410
4357+participated 9410
4358+Simon 9410
4359+certificates 9410
4360+Fitzpatrick 9410
4361+Evanston 9410
4362+misted 9410
4363+textures 9410
4364+save 9410
4365+count 9410
4366+rightful 9410
4367+chaperone 9410
4368+Lizzy 9410
4369+clenched 9410
4370+effortlessly 9410
4371+accessed 9410
4372+beaters 9410
4373+Hornblower 9410
4374+vests 9410
4375+indulgences 9410
4376+infallibly 9410
4377+unwilling 9410
4378+excrete 9410
4379+spools 9410
4380+crunches 9410
4381+overestimating 9410
4382+ineffective 9410
4383+humiliation 9410
4384+sophomore 9410
4385+star 9410
4386+rifles 9410
4387+dialysis 9410
4388+arriving 9410
4389+indulge 9410
4390+clockers 9410
4391+languages 9410
4392+Antarctica 9410
4393+percentage 9410
4394+ceiling 9410
4395+specification 9410
4396+regimented 9410
4397+ciphers 9410
4398+pictures 9410
4399+serpents 9410
4400+allot 9410
4401+realized 9410
4402+mayoral 9410
4403+opaquely 9410
4404+hostess 9410
4405+fiftieth 9410
4406+incorrectly 9410
4407+decomposition 9410
4408+stranglings 9410
4409+mixture 9410
4410+electroencephalography 9410
4411+similarities 9410
4412+charges 9410
4413+freest 9410
4414+Greenberg 9410
4415+tinting 9410
4416+expelled 9410
4417+warm 9410
4418+smoothed 9410
4419+deductions 9410
4420+Romano 9410
4421+bitterroot 9410
4422+corset 9410
4423+securing 9410
4424+environing 9410
4425+cute 9410
4426+Crays 9410
4427+heiress 9410
4428+inform 9410
4429+avenge 9410
4430+universals 9410
4431+Kinsey 9410
4432+ravines 9410
4433+bestseller 9410
4434+equilibrium 9410
4435+extents 9410
4436+relatively 9410
4437+pressure 9410
4438+critiques 9410
4439+befouled 9410
4440+rightfully 9410
4441+mechanizing 9410
4442+Latinizes 9410
4443+timesharing 9410
4444+Aden 9410
4445+embassies 9410
4446+males 9410
4447+shapelessly 9410
4448+mastering 9410
4449+Newtonian 9410
4450+finishers 9410
4451+abates 9410
4452+teem 9410
4453+kiting 9410
4454+stodgy 9410
4455+feed 9410
4456+guitars 9410
4457+airships 9410
4458+store 9410
4459+denounces 9410
4460+Pyle 9410
4461+Saxony 9410
4462+serializations 9410
4463+Peruvian 9410
4464+taxonomically 9410
4465+kingdom 9410
4466+stint 9410
4467+Sault 9410
4468+faithful 9410
4469+Ganymede 9410
4470+tidiness 9410
4471+gainful 9410
4472+contrary 9410
4473+Tipperary 9410
4474+tropics 9410
4475+theorizers 9410
4476+renew 9410
4477+already 9410
4478+terminal 9410
4479+Hegelian 9410
4480+hypothesizer 9410
4481+warningly 9410
4482+journalizing 9410
4483+nested 9410
4484+Lars 9410
4485+saplings 9410
4486+foothill 9410
4487+labeled 9410
4488+imperiously 9410
4489+reporters 9410
4490+furnishings 9410
4491+precipitable 9410
4492+discounts 9410
4493+excises 9410
4494+Stalin 9410
4495+despot 9410
4496+ripeness 9410
4497+Arabia 9410
4498+unruly 9410
4499+mournfulness 9410
4500+boom 9410
4501+slaughter 9410
4502+Sabine 9410
4503+handy 9410
4504+rural 9410
4505+organizer 9410
4506+shipyard 9410
4507+civics 9410
4508+inaccuracy 9410
4509+rules 9410
4510+juveniles 9410
4511+comprised 9410
4512+investigations 9410
4513+stabilizes 9410
4514+seminaries 9410
4515+Hunter 9410
4516+sporty 9410
4517+test 9410
4518+weasels 9410
4519+CERN 9410
4520+tempering 9410
4521+afore 9410
4522+Galatean 9410
4523+techniques 9410
4524+error 9410
4525+veranda 9410
4526+severely 9410
4527+Cassites 9410
4528+forthcoming 9410
4529+guides 9410
4530+vanish 9410
4531+lied 9410
4532+sawtooth 9410
4533+fated 9410
4534+gradually 9410
4535+widens 9410
4536+preclude 9410
4537+evenhandedly 9410
4538+percentage 9410
4539+disobedience 9410
4540+humility 9410
4541+gleaning 9410
4542+petted 9410
4543+bloater 9410
4544+minion 9410
4545+marginal 9410
4546+apiary 9410
4547+measures 9410
4548+precaution 9410
4549+repelled 9410
4550+primary 9410
4551+coverings 9410
4552+Artemia 9410
4553+navigate 9410
4554+spatial 9410
4555+Gurkha 9410
4556+meanwhile 9410
4557+Melinda 9410
4558+Butterfield 9410
4559+Aldrich 9410
4560+previewing 9410
4561+glut 9410
4562+unaffected 9410
4563+inmate 9410
4564+mineral 9410
4565+impending 9410
4566+meditation 9410
4567+ideas 9410
4568+miniaturizes 9410
4569+lewdly 9410
4570+title 9410
4571+youthfulness 9410
4572+creak 9410
4573+Chippewa 9410
4574+clamored 9410
4575+freezes 9410
4576+forgivably 9410
4577+reduce 9410
4578+McGovern 9410
4579+Nazis 9410
4580+epistle 9410
4581+socializes 9410
4582+conceptions 9410
4583+Kevin 9410
4584+uncovering 9410
4585+chews 9410
4586+appendixes 9410
4587+appendixes 9410
4588+appendixes 9410
4589+appendixes 9410
4590+appendixes 9410
4591+appendixes 9410
4592+raining 9410
4593+infest 9410
4594+compartment 9410
4595+minting 9410
4596+ducks 9410
4597+roped 9410
4598+waltz 9410
4599+Lillian 9410
4600+repressions 9410
4601+chillingly 9410
4602+noncritical 9410
4603+lithograph 9410
4604+spongers 9410
4605+parenthood 9410
4606+posed 9410
4607+instruments 9410
4608+filial 9410
4609+fixedly 9410
4610+relives 9410
4611+Pandora 9410
4612+watering 9410
4613+ungrateful 9410
4614+secures 9410
4615+poison 9410
4616+dusted 9410
4617+encompasses 9410
4618+presentation 9410
4619+Kantian 9410
4620+select fld3,period,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period >= 1001 and period <= 1002 and t2.companynr = 37 order by fld3,period, price;
4621+fld3 period price price2
4622+admonishing 1002 28357832 8723648
4623+analyzable 1002 28357832 8723648
4624+annihilates 1001 5987435 234724
4625+Antares 1002 28357832 8723648
4626+astound 1001 5987435 234724
4627+audiology 1001 5987435 234724
4628+Augustine 1002 28357832 8723648
4629+Baird 1002 28357832 8723648
4630+bewilderingly 1001 5987435 234724
4631+breaking 1001 5987435 234724
4632+Conley 1001 5987435 234724
4633+dentally 1002 28357832 8723648
4634+dissociate 1002 28357832 8723648
4635+elite 1001 5987435 234724
4636+eschew 1001 5987435 234724
4637+Eulerian 1001 5987435 234724
4638+flanking 1001 5987435 234724
4639+foldout 1002 28357832 8723648
4640+funereal 1002 28357832 8723648
4641+galling 1002 28357832 8723648
4642+Graves 1001 5987435 234724
4643+grazing 1001 5987435 234724
4644+groupings 1001 5987435 234724
4645+handgun 1001 5987435 234724
4646+humility 1002 28357832 8723648
4647+impulsive 1002 28357832 8723648
4648+inch 1001 5987435 234724
4649+intelligibility 1001 5987435 234724
4650+jarring 1001 5987435 234724
4651+lawgiver 1001 5987435 234724
4652+lectured 1002 28357832 8723648
4653+Merritt 1002 28357832 8723648
4654+neonatal 1001 5987435 234724
4655+offload 1002 28357832 8723648
4656+parters 1002 28357832 8723648
4657+pityingly 1002 28357832 8723648
4658+puddings 1002 28357832 8723648
4659+Punjab 1001 5987435 234724
4660+quitter 1002 28357832 8723648
4661+realtor 1001 5987435 234724
4662+relaxing 1001 5987435 234724
4663+repetitions 1001 5987435 234724
4664+resumes 1001 5987435 234724
4665+Romans 1002 28357832 8723648
4666+rusting 1001 5987435 234724
4667+scholastics 1001 5987435 234724
4668+skulking 1002 28357832 8723648
4669+stated 1002 28357832 8723648
4670+suites 1002 28357832 8723648
4671+sureties 1001 5987435 234724
4672+testicle 1002 28357832 8723648
4673+tinily 1002 28357832 8723648
4674+tragedies 1001 5987435 234724
4675+trimmings 1001 5987435 234724
4676+vacuuming 1001 5987435 234724
4677+ventilate 1001 5987435 234724
4678+wallet 1001 5987435 234724
4679+Weissmuller 1002 28357832 8723648
4680+Wotan 1002 28357832 8723648
4681+select t2.fld1,fld3,period,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period = 1001 and t2.companynr = 37;
4682+fld1 fld3 period price price2
4683+018201 relaxing 1001 5987435 234724
4684+018601 vacuuming 1001 5987435 234724
4685+018801 inch 1001 5987435 234724
4686+018811 repetitions 1001 5987435 234724
4687+create table t4 (
4688+companynr tinyint(2) unsigned zerofill NOT NULL default '00',
4689+companyname char(30) NOT NULL default '',
4690+PRIMARY KEY (companynr),
4691+UNIQUE KEY companyname(companyname)
4692+) ENGINE=MyISAM MAX_ROWS=50 PACK_KEYS=1 COMMENT='companynames';
4693+select STRAIGHT_JOIN t2.companynr,companyname from t4,t2 where t2.companynr=t4.companynr group by t2.companynr;
4694+companynr companyname
4695+00 Unknown
4696+29 company 1
4697+34 company 2
4698+36 company 3
4699+37 company 4
4700+40 company 5
4701+41 company 6
4702+50 company 11
4703+53 company 7
4704+58 company 8
4705+65 company 9
4706+68 company 10
4707+select SQL_SMALL_RESULT t2.companynr,companyname from t4,t2 where t2.companynr=t4.companynr group by t2.companynr;
4708+companynr companyname
4709+00 Unknown
4710+29 company 1
4711+34 company 2
4712+36 company 3
4713+37 company 4
4714+40 company 5
4715+41 company 6
4716+50 company 11
4717+53 company 7
4718+58 company 8
4719+65 company 9
4720+68 company 10
4721+select * from t1,t1 t12;
4722+Period Varor_period Period Varor_period
4723+9410 9412 9410 9412
4724+select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505;
4725+fld1 fld1
4726+250501 250501
4727+250502 250501
4728+250503 250501
4729+250504 250501
4730+250505 250501
4731+250501 250502
4732+250502 250502
4733+250503 250502
4734+250504 250502
4735+250505 250502
4736+250501 250503
4737+250502 250503
4738+250503 250503
4739+250504 250503
4740+250505 250503
4741+250501 250504
4742+250502 250504
4743+250503 250504
4744+250504 250504
4745+250505 250504
4746+250501 250505
4747+250502 250505
4748+250503 250505
4749+250504 250505
4750+250505 250505
4751+insert into t2 (fld1, companynr) values (999999,99);
4752+select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
4753+companynr companyname
4754+99 NULL
4755+select count(*) from t2 left join t4 using (companynr) where t4.companynr is not null;
4756+count(*)
4757+1199
4758+explain select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
4759+id select_type table type possible_keys key key_len ref rows Extra
4760+1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 NULL
4761+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using where; Not exists
4762+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr is null;
4763+id select_type table type possible_keys key key_len ref rows Extra
4764+1 SIMPLE t4 ALL NULL NULL NULL NULL 12 NULL
4765+1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where; Not exists; Using join buffer (Block Nested Loop)
4766+select companynr,companyname from t2 left join t4 using (companynr) where companynr is null;
4767+companynr companyname
4768+select count(*) from t2 left join t4 using (companynr) where companynr is not null;
4769+count(*)
4770+1200
4771+explain select companynr,companyname from t2 left join t4 using (companynr) where companynr is null;
4772+id select_type table type possible_keys key key_len ref rows Extra
4773+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
4774+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr is null;
4775+id select_type table type possible_keys key key_len ref rows Extra
4776+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
4777+delete from t2 where fld1=999999;
4778+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0;
4779+id select_type table type possible_keys key key_len ref rows Extra
4780+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
4781+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 NULL
4782+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0;
4783+id select_type table type possible_keys key key_len ref rows Extra
4784+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
4785+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 NULL
4786+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 and t4.companynr > 0;
4787+id select_type table type possible_keys key key_len ref rows Extra
4788+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
4789+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 NULL
4790+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0;
4791+id select_type table type possible_keys key key_len ref rows Extra
4792+1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
4793+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop)
4794+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0;
4795+id select_type table type possible_keys key key_len ref rows Extra
4796+1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
4797+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop)
4798+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 and companynr > 0;
4799+id select_type table type possible_keys key key_len ref rows Extra
4800+1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
4801+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop)
4802+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr is null;
4803+id select_type table type possible_keys key key_len ref rows Extra
4804+1 SIMPLE t4 ALL NULL NULL NULL NULL 12 NULL
4805+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop)
4806+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0 or t4.companynr > 0;
4807+id select_type table type possible_keys key key_len ref rows Extra
4808+1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 NULL
4809+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop)
4810+explain select t2.companynr,companyname from t4 left join t2 using (companynr) where ifnull(t2.companynr,1)>0;
4811+id select_type table type possible_keys key key_len ref rows Extra
4812+1 SIMPLE t4 ALL NULL NULL NULL NULL 12 NULL
4813+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop)
4814+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr is null;
4815+id select_type table type possible_keys key key_len ref rows Extra
4816+1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
4817+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop)
4818+explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0;
4819+id select_type table type possible_keys key key_len ref rows Extra
4820+1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
4821+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop)
4822+explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0;
4823+id select_type table type possible_keys key key_len ref rows Extra
4824+1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
4825+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop)
4826+select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
4827+companynr companynr
4828+37 36
4829+41 40
4830+explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
4831+id select_type table type possible_keys key key_len ref rows Extra
4832+1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary
4833+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop)
4834+select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008;
4835+fld1 companynr fld3 period
4836+038008 37 reporters 1008
4837+038208 37 Selfridge 1008
4838+select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009;
4839+fld1 companynr fld3 period
4840+038008 37 reporters 1008
4841+038208 37 Selfridge 1008
4842+select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009;
4843+fld1 companynr fld3 period
4844+038008 37 reporters 1008
4845+038208 37 Selfridge 1008
4846+select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909);
4847+period
4848+9410
4849+select period from t1 where ((period > 0 and period < 1) or (((period > 0 and period < 100) and (period > 10)) or (period > 10)) or (period > 0 and (period > 5 or period > 6)));
4850+period
4851+9410
4852+select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1;
4853+fld1
4854+250501
4855+250502
4856+250503
4857+250505
4858+select fld1 from t2 where fld1 in (250502,98005,98006,250503,250605,250606) and fld1 >=250502 and fld1 not in (250605,250606);
4859+fld1
4860+250502
4861+250503
4862+select fld1 from t2 where fld1 between 250502 and 250504;
4863+fld1
4864+250502
4865+250503
4866+250504
4867+select fld3 from t2 where (((fld3 like "_%L%" ) or (fld3 like "%ok%")) and ( fld3 like "L%" or fld3 like "G%")) and fld3 like "L%" ;
4868+fld3
4869+label
4870+labeled
4871+labeled
4872+landslide
4873+laterally
4874+leaflet
4875+lewdly
4876+Lillian
4877+luckily
4878+select count(*) from t1;
4879+count(*)
4880+1
4881+select companynr,count(*),sum(fld1) from t2 group by companynr;
4882+companynr count(*) sum(fld1)
4883+00 82 10355753
4884+29 95 14473298
4885+34 70 17788966
4886+36 215 22786296
4887+37 588 83602098
4888+40 37 6618386
4889+41 52 12816335
4890+50 11 1595438
4891+53 4 793210
4892+58 23 2254293
4893+65 10 2284055
4894+68 12 3097288
4895+select companynr,count(*) from t2 group by companynr order by companynr desc limit 5;
4896+companynr count(*)
4897+68 12
4898+65 10
4899+58 23
4900+53 4
4901+50 11
4902+select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 where companynr = 34 and fld4<>"";
4903+count(*) min(fld4) max(fld4) sum(fld1) avg(fld1) std(fld1) variance(fld1)
4904+70 absentee vest 17788966 254128.0857 3272.5939722090234 10709871.306938833
4905+explain extended select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 where companynr = 34 and fld4<>"";
4906+id select_type table type possible_keys key key_len ref rows filtered Extra
4907+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 100.00 Using where
4908+Warnings:
4909+Note 1003 /* select#1 */ select count(0) AS `count(*)`,min(`test`.`t2`.`fld4`) AS `min(fld4)`,max(`test`.`t2`.`fld4`) AS `max(fld4)`,sum(`test`.`t2`.`fld1`) AS `sum(fld1)`,avg(`test`.`t2`.`fld1`) AS `avg(fld1)`,std(`test`.`t2`.`fld1`) AS `std(fld1)`,variance(`test`.`t2`.`fld1`) AS `variance(fld1)` from `test`.`t2` where ((`test`.`t2`.`companynr` = 34) and (`test`.`t2`.`fld4` <> ''))
4910+select companynr,count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 group by companynr limit 3;
4911+companynr count(*) min(fld4) max(fld4) sum(fld1) avg(fld1) std(fld1) variance(fld1)
4912+00 82 Anthony windmills 10355753 126289.6707 115550.97568479746 13352027981.708656
4913+29 95 abut wetness 14473298 152350.5053 8368.547956641249 70032594.90260443
4914+34 70 absentee vest 17788966 254128.0857 3272.5939722090234 10709871.306938833
4915+select companynr,t2nr,count(price),sum(price),min(price),max(price),avg(price) from t3 where companynr = 37 group by companynr,t2nr limit 10;
4916+companynr t2nr count(price) sum(price) min(price) max(price) avg(price)
4917+37 1 1 5987435 5987435 5987435 5987435.0000
4918+37 2 1 28357832 28357832 28357832 28357832.0000
4919+37 3 1 39654943 39654943 39654943 39654943.0000
4920+37 11 1 5987435 5987435 5987435 5987435.0000
4921+37 12 1 28357832 28357832 28357832 28357832.0000
4922+37 13 1 39654943 39654943 39654943 39654943.0000
4923+37 21 1 5987435 5987435 5987435 5987435.0000
4924+37 22 1 28357832 28357832 28357832 28357832.0000
4925+37 23 1 39654943 39654943 39654943 39654943.0000
4926+37 31 1 5987435 5987435 5987435 5987435.0000
4927+select /*! SQL_SMALL_RESULT */ companynr,t2nr,count(price),sum(price),min(price),max(price),avg(price) from t3 where companynr = 37 group by companynr,t2nr limit 10;
4928+companynr t2nr count(price) sum(price) min(price) max(price) avg(price)
4929+37 1 1 5987435 5987435 5987435 5987435.0000
4930+37 2 1 28357832 28357832 28357832 28357832.0000
4931+37 3 1 39654943 39654943 39654943 39654943.0000
4932+37 11 1 5987435 5987435 5987435 5987435.0000
4933+37 12 1 28357832 28357832 28357832 28357832.0000
4934+37 13 1 39654943 39654943 39654943 39654943.0000
4935+37 21 1 5987435 5987435 5987435 5987435.0000
4936+37 22 1 28357832 28357832 28357832 28357832.0000
4937+37 23 1 39654943 39654943 39654943 39654943.0000
4938+37 31 1 5987435 5987435 5987435 5987435.0000
4939+select companynr,count(price),sum(price),min(price),max(price),avg(price) from t3 group by companynr ;
4940+companynr count(price) sum(price) min(price) max(price) avg(price)
4941+37 12543 309394878010 5987435 39654943 24666736.6667
4942+78 8362 414611089292 726498 98439034 49582766.0000
4943+101 4181 3489454238 834598 834598 834598.0000
4944+154 4181 4112197254950 983543950 983543950 983543950.0000
4945+311 4181 979599938 234298 234298 234298.0000
4946+447 4181 9929180954 2374834 2374834 2374834.0000
4947+512 4181 3288532102 786542 786542 786542.0000
4948+select distinct mod(companynr,10) from t4 group by companynr;
4949+mod(companynr,10)
4950+0
4951+9
4952+4
4953+6
4954+7
4955+1
4956+3
4957+8
4958+5
4959+select distinct 1 from t4 group by companynr;
4960+1
4961+1
4962+select count(distinct fld1) from t2;
4963+count(distinct fld1)
4964+1199
4965+select companynr,count(distinct fld1) from t2 group by companynr;
4966+companynr count(distinct fld1)
4967+00 82
4968+29 95
4969+34 70
4970+36 215
4971+37 588
4972+40 37
4973+41 52
4974+50 11
4975+53 4
4976+58 23
4977+65 10
4978+68 12
4979+select companynr,count(*) from t2 group by companynr;
4980+companynr count(*)
4981+00 82
4982+29 95
4983+34 70
4984+36 215
4985+37 588
4986+40 37
4987+41 52
4988+50 11
4989+53 4
4990+58 23
4991+65 10
4992+68 12
4993+select companynr,count(distinct concat(fld1,repeat(65,1000))) from t2 group by companynr;
4994+companynr count(distinct concat(fld1,repeat(65,1000)))
4995+00 82
4996+29 95
4997+34 70
4998+36 215
4999+37 588
5000+40 37
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches