@testing.only_on('mysql', 'Multi table update')
    def test_defaults_second_table_same_name(self):
        users, foobar = self.tables.users, self.tables.foobar

        values = {
            foobar.c.data: foobar.c.data + 'a',
            users.c.name: 'ed2'
        }

        ret = testing.db.execute(
            users.update().
            values(values).
            where(users.c.id == foobar.c.user_id).
            where(users.c.name == 'ed'))

        eq_(
            set(ret.prefetch_cols()),
            set([users.c.some_update, foobar.c.some_update])
        )

        expected = [
            (2, 8, 'd1a', 'im the other update'),
            (3, 8, 'd2a', 'im the other update'),
            (4, 9, 'd3', None)]
        self._assert_foobar(foobar, expected)

        expected = [
            (8, 'ed2', 'im the update'),
            (9, 'fred', 'value')]
        self._assert_users(users, expected)
dataset/ETHPy150Open zzzeek/sqlalchemy/test/sql/test_update.py/UpdateFromMultiTableUpdateDefaultsTest.test_defaults_second_table_same_name/original