lp:~percona-core/percona-xtradb-cluster/bug-1391948

Created by Raghavendra D Prabhu on 2014-11-12 and last modified on 2014-11-12
Get this branch:
bzr branch lp:~percona-core/percona-xtradb-cluster/bug-1391948
Members of Percona core can upload to this branch. Log in for directions.

Branch merges

Related bugs

Related blueprints

Branch information

Recent revisions

926. By Raghavendra D Prabhu on 2014-11-12

Bug#1391948 CREATE TABLE.. SELECT not replicated under TOI.

Fixed by adding WSREP_TO_ISOLATION_BEGIN.

However, this caused the assertion in binlog_cache_data::finalize when UNIV_DEBUG was ON and binlogging OFF.

#0 0x00007ffff5f43967 in raise () from /usr/lib/libc.so.6
#1 0x00007ffff5f44d3a in abort () from /usr/lib/libc.so.6
#2 0x00007ffff5f3c8ad in __assert_fail_base () from /usr/lib/libc.so.6
#3 0x00007ffff5f3c962 in __assert_fail () from /usr/lib/libc.so.6
#4 0x0000000000935667 in binlog_cache_data::finalize (this=this@entry=0x7fff4411cc60, thd=thd@entry=0x2fa4ae0, end_event=end_event@entry=0x7fff90a5eb40)
    at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/binlog.cc:1224
#5 0x00000000009450f2 in MYSQL_BIN_LOG::commit (this=0x15879c0 <mysql_bin_log>, thd=0x2fa4ae0, all=<optimized out>) at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/binlog.cc:6738
#6 0x000000000081b4af in trans_commit_implicit (thd=0x2fa4ae0) at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/transaction.cc:313
#7 0x0000000000775728 in select_create::send_eof (this=0x7fff4410bfa0) at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_insert.cc:4441
#8 0x000000000076bedd in do_select (join=join@entry=0x7fff4410c140) at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_executor.cc:983
#9 0x000000000076c39d in JOIN::exec (this=0x7fff4410c140) at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_executor.cc:194
#10 0x00000000007b10b5 in mysql_execute_select (thd=thd@entry=0x2fa4ae0, select_lex=select_lex@entry=0x2fa7940, free_join=<optimized out>) at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_select.cc:1100
#11 0x00000000007ba744 in mysql_select (thd=thd@entry=0x2fa4ae0, tables=<optimized out>, wild_num=1, fields=..., conds=0x0, order=order@entry=0x2fa7b38, group=0x2fa7a48, having=0x0, select_options=2416184064,
    result=0x7fff4410bfa0, unit=0x2fa72e0, select_lex=0x2fa7940) at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_select.cc:1221
#12 0x00000000007ba907 in handle_select (thd=thd@entry=0x2fa4ae0, result=result@entry=0x7fff4410bfa0, setup_tables_done_option=setup_tables_done_option@entry=0)
    at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_select.cc:110
#13 0x0000000000792f29 in mysql_execute_command (thd=thd@entry=0x2fa4ae0) at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_parse.cc:3749
#14 0x0000000000794018 in mysql_parse (thd=thd@entry=0x2fa4ae0, rawbuf=rawbuf@entry=0x7fff4410f3e0 "create table x4 select * from demo", length=length@entry=34, parser_state=parser_state@entry=0x7fff90a617b0)
    at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_parse.cc:7352
#15 0x0000000000794686 in wsrep_mysql_parse (thd=thd@entry=0x2fa4ae0, rawbuf=0x7fff4410f3e0 "create table x4 select * from demo", length=length@entry=34, parser_state=parser_state@entry=0x7fff90a617b0)
    at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_parse.cc:7103
#16 0x00000000007960ef in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x2fa4ae0, packet=packet@entry=0x2fa8911 "create table x4 select * from demo", packet_length=packet_length@entry=34)
    at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_parse.cc:1625
#17 0x0000000000796969 in do_command (thd=0x2fa4ae0) at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_parse.cc:1129
#18 0x000000000075fc42 in do_handle_one_connection (thd_arg=thd_arg@entry=0x2fa4ae0) at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_connect.cc:1557
#19 0x000000000075fd90 in handle_one_connection (arg=arg@entry=0x2fa4ae0) at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_connect.cc:1461
#20 0x0000000000c239f3 in pfs_spawn_thread (arg=0x2ec4060) at /media/Oort/ncode/percona-xtradb-cluster/pxc56/storage/perfschema/pfs.cc:1860
#21 0x00007ffff7bc6314 in start_thread () from /usr/lib/libpthread.so.0
#22 0x00007ffff5ff83ed in clone () from /usr/lib/libc.so.6

Fixed this by adding cleanup in wsrep_post_commit.

925. By Raghavendra D Prabhu on 2014-11-12

Reverting the fix for bug#1388226 done in revno 920 here

924. By Raghavendra D Prabhu on 2014-11-11

Bug#1391634 Fixing restart logic with systemd during upgrade.

The logic is as follows:

a) Check if any <email address hidden> are running.

    If they are:

        i) Get the number of nodes (numint) in current primary component from gvwstate.dat: https://github.com/codership/documentation/issues/16

        ii) Check if this node is PRIM or not. If not PRIM, then manual restart after upgrade is advised and no restart is done.

        iii) If PRIM:

                A) If numint is greater than 1 and XYZ is not bootstrap, do the usual %systemd_postun_with_restart

                B) If numint is greather than 1 and XYZ is bootstrap, then do this

                            echo "Not bootstrapping with $(( numint-1 )) nodes in cluster"
                            echo "Restarting with mysql.service in its stead"
                            %systemd_postun
                            /usr/bin/systemctl stop <email address hidden>
                            /usr/bin/systemctl start mysql.service

                C) Finally, if numint is 1, then %systemd_postun_with_restart as usual. Note that here we don't bootstrap, that would be second guessing the system administrator and we should never do that!

b) Otherwise, just regular %systemd_postun_with_restart of mysql.service.

923. By Raghavendra D Prabhu on 2014-11-10

Disambiguate the script

922. By Raghavendra D Prabhu on 2014-11-10

Fix the naming

921. By Raghavendra D Prabhu on 2014-11-10

Bumped the version

920. By Raghavendra D Prabhu on 2014-11-10

Bug#1388226 CREATE TABLE.. SELECT not replicated under TOI.

Fixed by adding WSREP_TO_ISOLATION_BEGIN.

However, this caused the assertion in binlog_cache_data::finalize when UNIV_DEBUG was ON and binlogging OFF.

#0 0x00007ffff5f43967 in raise () from /usr/lib/libc.so.6
#1 0x00007ffff5f44d3a in abort () from /usr/lib/libc.so.6
#2 0x00007ffff5f3c8ad in __assert_fail_base () from /usr/lib/libc.so.6
#3 0x00007ffff5f3c962 in __assert_fail () from /usr/lib/libc.so.6
#4 0x0000000000935667 in binlog_cache_data::finalize (this=this@entry=0x7fff4411cc60, thd=thd@entry=0x2fa4ae0, end_event=end_event@entry=0x7fff90a5eb40)
    at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/binlog.cc:1224
#5 0x00000000009450f2 in MYSQL_BIN_LOG::commit (this=0x15879c0 <mysql_bin_log>, thd=0x2fa4ae0, all=<optimized out>) at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/binlog.cc:6738
#6 0x000000000081b4af in trans_commit_implicit (thd=0x2fa4ae0) at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/transaction.cc:313
#7 0x0000000000775728 in select_create::send_eof (this=0x7fff4410bfa0) at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_insert.cc:4441
#8 0x000000000076bedd in do_select (join=join@entry=0x7fff4410c140) at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_executor.cc:983
#9 0x000000000076c39d in JOIN::exec (this=0x7fff4410c140) at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_executor.cc:194
#10 0x00000000007b10b5 in mysql_execute_select (thd=thd@entry=0x2fa4ae0, select_lex=select_lex@entry=0x2fa7940, free_join=<optimized out>) at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_select.cc:1100
#11 0x00000000007ba744 in mysql_select (thd=thd@entry=0x2fa4ae0, tables=<optimized out>, wild_num=1, fields=..., conds=0x0, order=order@entry=0x2fa7b38, group=0x2fa7a48, having=0x0, select_options=2416184064,
    result=0x7fff4410bfa0, unit=0x2fa72e0, select_lex=0x2fa7940) at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_select.cc:1221
#12 0x00000000007ba907 in handle_select (thd=thd@entry=0x2fa4ae0, result=result@entry=0x7fff4410bfa0, setup_tables_done_option=setup_tables_done_option@entry=0)
    at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_select.cc:110
#13 0x0000000000792f29 in mysql_execute_command (thd=thd@entry=0x2fa4ae0) at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_parse.cc:3749
#14 0x0000000000794018 in mysql_parse (thd=thd@entry=0x2fa4ae0, rawbuf=rawbuf@entry=0x7fff4410f3e0 "create table x4 select * from demo", length=length@entry=34, parser_state=parser_state@entry=0x7fff90a617b0)
    at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_parse.cc:7352
#15 0x0000000000794686 in wsrep_mysql_parse (thd=thd@entry=0x2fa4ae0, rawbuf=0x7fff4410f3e0 "create table x4 select * from demo", length=length@entry=34, parser_state=parser_state@entry=0x7fff90a617b0)
    at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_parse.cc:7103
#16 0x00000000007960ef in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x2fa4ae0, packet=packet@entry=0x2fa8911 "create table x4 select * from demo", packet_length=packet_length@entry=34)
    at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_parse.cc:1625
#17 0x0000000000796969 in do_command (thd=0x2fa4ae0) at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_parse.cc:1129
#18 0x000000000075fc42 in do_handle_one_connection (thd_arg=thd_arg@entry=0x2fa4ae0) at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_connect.cc:1557
#19 0x000000000075fd90 in handle_one_connection (arg=arg@entry=0x2fa4ae0) at /media/Oort/ncode/percona-xtradb-cluster/pxc56/sql/sql_connect.cc:1461
#20 0x0000000000c239f3 in pfs_spawn_thread (arg=0x2ec4060) at /media/Oort/ncode/percona-xtradb-cluster/pxc56/storage/perfschema/pfs.cc:1860
#21 0x00007ffff7bc6314 in start_thread () from /usr/lib/libpthread.so.0
#22 0x00007ffff5ff83ed in clone () from /usr/lib/libc.so.6

Fixed this by adding cleanup in wsrep_post_commit.

919. By Raghavendra D Prabhu on 2014-11-08

Merge PS-5.6 upto revno 693

918. By Raghavendra D Prabhu on 2014-11-07

Bug#1390552 Detect older joiner on donors with backup lock support by introducing SST versioning (1 for now) and bailing out early

917. By Raghavendra D Prabhu on 2014-11-07

Bug#1248688 Warn-only and fallback when pv is missing

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:percona-xtradb-cluster
This branch contains Public information 
Everyone can see this information.

Subscribers