We're updating the issue view to help you get more done.Learn more

mysqld crashes when running a query with ONLY_FULL_GROUP_BY

I tried to run this query:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 SELECT b.ekperif, s.short_description, s.imagesXrwma FROM (SELECT ps.synolo, se.id_syndiasmosSeEnotita, se.id_syndiasmos, se.id_perifereiakiEnotita, se.id_eklogikhPerifereia FROM (SELECT SUM(ps.psifoiSyndiasmou) AS synolo, ps.id_syndiasmosSeEnotita FROM psifoiSyndiasmon AS ps WHERE ps.id_diexagogiEklogon = 3 GROUP BY (ps.id_syndiasmosSeEnotita)) AS ps LEFT JOIN syndiasmosSeEnotita se ON ps.id_syndiasmosSeEnotita = se.id_syndiasmosSeEnotita WHERE se.active = 1) AS a INNER JOIN (SELECT MAX(t.synolo) AS maxsynolo, t.id_eklogikhPerifereia AS ekperif FROM (SELECT ps.synolo, se.id_syndiasmosSeEnotita, se.id_syndiasmos, se.id_perifereiakiEnotita, se.id_eklogikhPerifereia FROM (SELECT SUM(ps.psifoiSyndiasmou) AS synolo, ps.id_syndiasmosSeEnotita FROM psifoiSyndiasmon AS ps WHERE ps.id_diexagogiEklogon = 3 GROUP BY (ps.id_syndiasmosSeEnotita)) AS ps LEFT JOIN syndiasmosSeEnotita se ON ps.id_syndiasmosSeEnotita = se.id_syndiasmosSeEnotita WHERE se.active = 1) AS t GROUP BY t.id_eklogikhPerifereia) AS b ON a.id_eklogikhPerifereia = b.ekperif LEFT JOIN syndiasmos s ON a.id_syndiasmos = s.id_syndiasmos WHERE a.synolo = b.maxsynolo;

and the server crashed. Log:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 140205 15:58:42 Percona XtraDB (http://www.percona.com) 5.5.35-MariaDB-33.0 started; log sequence number 151241109 140205 15:58:42 [Note] Event Scheduler: Loaded 0 events 140205 15:58:42 [Note] /usr/sbin/mysqld: ready for connections. Version: '5.5.35-MariaDB-log' socket: '/var/run/mysqld/mysqld.sock' port: 0 Source distribution 140205 17:24:25 [ERROR] mysqld got signal 11 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. To report this bug, see http://kb.askmonty.org/en/reporting-bugs We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail. Server version: 5.5.35-MariaDB-log key_buffer_size=25165824 read_buffer_size=131072 max_used_connections=1 max_threads=52 thread_count=1 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 138638 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. Thread pointer: 0x0x7fb8acac1000 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... stack_bottom = 0x7fb8c88afed8 thread_stack 0x48000 /usr/sbin/mysqld(my_print_stacktrace+0x26)[0x9ca0d6] /usr/sbin/mysqld(handle_fatal_signal+0x398)[0x69a458] /lib64/libpthread.so.0(+0xfbb0)[0x7fb8c9cc1bb0] /usr/sbin/mysqld(_ZN10Item_field10fix_fieldsEP3THDPP4Item+0x19e)[0x6b416e] /usr/sbin/mysqld(_ZN9Item_func10fix_fieldsEP3THDPP4Item+0x180)[0x6dddc0] /usr/sbin/mysqld(_Z11setup_condsP3THDP10TABLE_LISTR4ListIS1_EPP4Item+0x1e6)[0x550fa6] /usr/sbin/mysqld(_ZN4JOIN7prepareEPPP4ItemP10TABLE_LISTjS1_jP8st_orderbS7_S1_S7_P13st_select_lexP18st_select_lex_unit+0x394)[0x5bf8f4] /usr/sbin/mysqld(_ZN18st_select_lex_unit7prepareEP3THDP13select_resultm+0x95d)[0x5feced] /usr/sbin/mysqld(_Z21mysql_derived_prepareP3THDP3LEXP10TABLE_LIST+0x235)[0x56dc45] /usr/sbin/mysqld(_Z27mysql_handle_single_derivedP3LEXP10TABLE_LISTj+0xec)[0x56e92c] /usr/sbin/mysqld(_ZN13st_select_lex14handle_derivedEP3LEXj+0x3e)[0x580bce] /usr/sbin/mysqld(_ZN4JOIN7prepareEPPP4ItemP10TABLE_LISTjS1_jP8st_orderbS7_S1_S7_P13st_select_lexP18st_select_lex_unit+0xea)[0x5bf64a] /usr/sbin/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x8ec)[0x5c9d5c] /usr/sbin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x2cc)[0x5cfabc] /usr/sbin/mysqld[0x58388b] /usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x4a02)[0x58d272] /usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x119)[0x58f479] /usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x135e)[0x59086e] /usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x173)[0x62da93] /usr/sbin/mysqld(handle_one_connection+0x4a)[0x62db6a] /lib64/libpthread.so.0(+0x7fda)[0x7fb8c9cb9fda] /lib64/libc.so.6(clone+0x6d)[0x7fb8c8db99ad] Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (0x7fb8a1c14018): is an invalid pointer Connection ID (thread ID): 13 Status: NOT_KILLED

Status

Assignee

Michael Widenius

Reporter

Vasilis Lourdas

Fix versions

Affects versions

5.5.35

Priority

Critical