150617 8:42:00 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.43-0ubuntu0.14.04.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
150617 8:42:00 InnoDB: Assertion failure in thread 139884593407744 in file trx0purge.c line 840
InnoDB: Failing assertion: purge_sys->purge_trx_no <= purge_sys->rseg->last_trx_no
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: dev.mysql.com/doc/refman/5.5/en/forcing-innodb-rec...
InnoDB: about forcing recovery.
select *
from t1
inner join t2 on t1.link_field = t2.link_field and t2.some_field <> 0 and t2.other_field <> 0
мне нужно, для которых нет ни одного значения равного нулю
select * from t1 where id not in (select id_field from t2 where some_field = 0)
Вообще таблицы такие:
questions(id, text), answers(id, question_id, answer, text), history(id, user_id, answer_id, question_id, test_id), history_tests(id, date), нужно вывести все вопросы, на которые все существующие ответы верны.
select q.*
from questions q
inner join history h on h.question_id = q.id
where q.id not in (
select a.question_id
from answers a
inner join history h on a.id = h.answer_id and a.answer = 0
)
select birthday
from some_table
order by dayofyear(birthday - interval dayofyear(now()) -1 day) asc
limit 3
select * from info_table info
left join main_table main on info.id = main.info_id and cond2 = 'cond2'
where info.id = 'cond1'
SELECT * FROM `regions` WHERE
' . $x1 .' > LEAST(Ax, Bx) AND ' . $x1 .' < GREATEST(Ax, Bx) AND
' . $y1 . ' > LEAST(Ay, By) AND ' . $y1 . ' < GREATEST(Ay, By) AND
' . $z1 . ' > LEAST(Az, Bz) AND ' . $z1 . ' < GREATEST(Az, Bz)